diff --git a/CHANGES.md b/CHANGES.md index 699db164efe..34a2f28caf0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,18 @@ # Changes +## [0.166.0](https://github.com/googleapis/google-api-go-client/compare/v0.165.0...v0.166.0) (2024-02-21) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2417](https://github.com/googleapis/google-api-go-client/issues/2417)) ([260fc1e](https://github.com/googleapis/google-api-go-client/commit/260fc1ef78c67de11cc5d654fcbe08edd8c01843)) +* **all:** Auto-regenerate discovery clients ([#2419](https://github.com/googleapis/google-api-go-client/issues/2419)) ([c969083](https://github.com/googleapis/google-api-go-client/commit/c96908374e9b394e34b94768e006100b1a48ab4c)) +* **all:** Auto-regenerate discovery clients ([#2420](https://github.com/googleapis/google-api-go-client/issues/2420)) ([762eb61](https://github.com/googleapis/google-api-go-client/commit/762eb619b72aa10d7b177398df86c53a3ac4e9f0)) +* **all:** Auto-regenerate discovery clients ([#2421](https://github.com/googleapis/google-api-go-client/issues/2421)) ([af6aa38](https://github.com/googleapis/google-api-go-client/commit/af6aa38b90461f3a5d1bfe13a86aa788f4b08da1)) +* **all:** Auto-regenerate discovery clients ([#2424](https://github.com/googleapis/google-api-go-client/issues/2424)) ([b3f9c38](https://github.com/googleapis/google-api-go-client/commit/b3f9c38b88e452ef2c90a7cd1bf09be9d4b2cdbd)) +* **all:** Auto-regenerate discovery clients ([#2425](https://github.com/googleapis/google-api-go-client/issues/2425)) ([124a535](https://github.com/googleapis/google-api-go-client/commit/124a535e30e079b1b0f240ebbd5a638e7207f275)) +* **all:** Auto-regenerate discovery clients ([#2426](https://github.com/googleapis/google-api-go-client/issues/2426)) ([446a6bd](https://github.com/googleapis/google-api-go-client/commit/446a6bdd35dfe3d1f32035787065c8ada6003bcf)) + ## [0.165.0](https://github.com/googleapis/google-api-go-client/compare/v0.164.0...v0.165.0) (2024-02-14) diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 4557ddae323..557aaf85dd4 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -4604,7 +4604,7 @@ "type": "string" }, "updateMask": { - "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels`", + "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels` * `serviceAgentType`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -11668,11 +11668,6 @@ "description": "The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated. This value should be less than 128 characters, and valid characters are `/a-z-/`.", "location": "query", "type": "string" - }, - "preflightValidations": { - "description": "Optional. Whether to do component level validations before job creation. Currently we only support Google First Party Component/Pipelines.", - "location": "query", - "type": "boolean" } }, "path": "v1/{+parent}/pipelineJobs", @@ -15567,7 +15562,7 @@ } } }, - "revision": "20240205", + "revision": "20240213", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionEmbedVideoResponse": { @@ -16476,6 +16471,13 @@ ], "type": "string" }, + "influentialTerms": { + "description": "The influential terms that could potentially block the response.", + "items": { + "$ref": "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm" + }, + "type": "array" + }, "probability": { "description": "Harm probability levels in the content.", "enum": [ @@ -16493,6 +16495,69 @@ "High level of harm." ], "type": "string" + }, + "probabilityScore": { + "description": "Harm probability score.", + "format": "float", + "type": "number" + }, + "severity": { + "description": "Harm severity levels in the content.", + "enum": [ + "HARM_PROBABILITY_UNSPECIFIED", + "NEGLIGIBLE", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Harm probability unspecified.", + "Negligible level of harm.", + "Low level of harm.", + "Medium level of harm.", + "High level of harm." + ], + "type": "string" + }, + "severityScore": { + "description": "Harm severity score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm": { + "description": "The influential term that could potentially block the response.", + "id": "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm", + "properties": { + "beginOffset": { + "description": "The beginning offset of the influential term.", + "format": "int32", + "type": "integer" + }, + "confidence": { + "description": "The confidence score of the influential term.", + "format": "float", + "type": "number" + }, + "source": { + "description": "The source of the influential term, prompt or response.", + "enum": [ + "SOURCE_UNSPECIFIED", + "PROMPT", + "RESPONSE" + ], + "enumDescriptions": [ + "Unspecified source.", + "The influential term comes from the prompt.", + "The influential term comes from the response." + ], + "type": "string" + }, + "term": { + "description": "The influential term.", + "type": "string" } }, "type": "object" @@ -17675,6 +17740,11 @@ "readOnly": true, "type": "string" }, + "groundingMetadata": { + "$ref": "GoogleCloudAiplatformV1GroundingMetadata", + "description": "Output only. Metadata specifies sources used to ground generated content.", + "readOnly": true + }, "index": { "description": "Output only. Index of the candidate.", "format": "int32", @@ -18286,10 +18356,6 @@ "pipelineJobId": { "description": "The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated. This value should be less than 128 characters, and valid characters are `/a-z-/`.", "type": "string" - }, - "preflightValidations": { - "description": "Optional. Whether to do component level validations before job creation. Currently we only support Google First Party Component/Pipelines.", - "type": "boolean" } }, "type": "object" @@ -19489,6 +19555,10 @@ "$ref": "GoogleCloudAiplatformV1PredictRequestResponseLoggingConfig", "description": "Configures the request-response logging for online prediction." }, + "privateServiceConnectConfig": { + "$ref": "GoogleCloudAiplatformV1PrivateServiceConnectConfig", + "description": "Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive." + }, "trafficSplit": { "additionalProperties": { "format": "int32", @@ -21204,6 +21274,11 @@ "$ref": "GoogleCloudAiplatformV1FeatureViewFeatureRegistrySourceFeatureGroup" }, "type": "array" + }, + "projectNumber": { + "description": "Optional. The project number of the parent project of the Feature Groups.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -21249,6 +21324,11 @@ "$ref": "GoogleTypeInterval", "description": "Output only. Time when this FeatureViewSync is finished.", "readOnly": true + }, + "syncSummary": { + "$ref": "GoogleCloudAiplatformV1FeatureViewSyncSyncSummary", + "description": "Output only. Summary of the sync job.", + "readOnly": true } }, "type": "object" @@ -21264,6 +21344,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FeatureViewSyncSyncSummary": { + "description": "Summary from the Sync job. For continuous syncs, the summary is updated periodically. For batch syncs, it gets updated on completion of the sync.", + "id": "GoogleCloudAiplatformV1FeatureViewSyncSyncSummary", + "properties": { + "rowSynced": { + "description": "Output only. Total number of rows synced.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "totalSlot": { + "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Featurestore": { "description": "Vertex AI Feature Store provides a centralized repository for organizing, storing, and serving ML features. The Featurestore is a top-level container for your features and their values.", "id": "GoogleCloudAiplatformV1Featurestore", @@ -21795,7 +21894,7 @@ "type": "array" }, "tools": { - "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. The only supported tool is currently `Function`", + "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", "items": { "$ref": "GoogleCloudAiplatformV1Tool" }, @@ -21950,6 +22049,77 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1GoogleSearchRetrieval": { + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1GoogleSearchRetrieval", + "properties": { + "disableAttribution": { + "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingAttribution": { + "description": "Grounding attribution.", + "id": "GoogleCloudAiplatformV1GroundingAttribution", + "properties": { + "confidenceScore": { + "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1Segment", + "description": "Output only. Segment of the content this attribution belongs to.", + "readOnly": true + }, + "web": { + "$ref": "GoogleCloudAiplatformV1GroundingAttributionWeb", + "description": "Optional. Attribution from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingAttributionWeb": { + "description": "Attribution from the web.", + "id": "GoogleCloudAiplatformV1GroundingAttributionWeb", + "properties": { + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingMetadata": { + "description": "Metadata returned to client when grounding is enabled.", + "id": "GoogleCloudAiplatformV1GroundingMetadata", + "properties": { + "groundingAttributions": { + "description": "Optional. List of grounding attributions.", + "items": { + "$ref": "GoogleCloudAiplatformV1GroundingAttribution" + }, + "type": "array" + }, + "webSearchQueries": { + "description": "Optional. Web search queries for the following-up web search.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1HyperparameterTuningJob": { "description": "Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.", "id": "GoogleCloudAiplatformV1HyperparameterTuningJob", @@ -26331,10 +26501,6 @@ "description": "The runtime config of a PipelineJob.", "id": "GoogleCloudAiplatformV1PipelineJobRuntimeConfig", "properties": { - "defaultRuntime": { - "$ref": "GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime", - "description": "Optional. The default runtime for the PipelineJob. If not provided, Vertex Custom Job is used as the runtime. For Vertex Custom Job, please refer to https://cloud.google.com/vertex-ai/docs/training/overview" - }, "failurePolicy": { "description": "Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion.", "enum": [ @@ -26378,17 +26544,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime": { - "description": "The default runtime for the PipelineJob.", - "id": "GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime", - "properties": { - "persistentResourceRuntimeDetail": { - "$ref": "GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", - "description": "Persistent resource based runtime detail." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact": { "description": "The type of an input artifact.", "id": "GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact", @@ -26400,17 +26555,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail": { - "description": "Persistent resource based runtime detail. For more information, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", - "id": "GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", - "properties": { - "persistentResourceName": { - "description": "Persistent resource name. Format: `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1PipelineTaskDetail": { "description": "The runtime detail of a task execution.", "id": "GoogleCloudAiplatformV1PipelineTaskDetail", @@ -27741,6 +27885,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Retrieval": { + "description": "Defines a retrieval tool that model can call to access external knowledge.", + "id": "GoogleCloudAiplatformV1Retrieval", + "properties": { + "disableAttribution": { + "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "type": "boolean" + }, + "vertexAiSearch": { + "$ref": "GoogleCloudAiplatformV1VertexAISearch", + "description": "Set to use data source powered by Vertex AI Search." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SafetyRating": { "description": "Safety rating corresponding to the generated content.", "id": "GoogleCloudAiplatformV1SafetyRating", @@ -32061,6 +32220,31 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Segment": { + "description": "Segment of the content.", + "id": "GoogleCloudAiplatformV1Segment", + "properties": { + "endIndex": { + "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "partIndex": { + "description": "Output only. The index of a Part object within its parent Content object.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startIndex": { + "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ShieldedVmConfig": { "description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).", "id": "GoogleCloudAiplatformV1ShieldedVmConfig", @@ -33412,7 +33596,7 @@ "type": "object" }, "GoogleCloudAiplatformV1Tool": { - "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool.", "id": "GoogleCloudAiplatformV1Tool", "properties": { "functionDeclarations": { @@ -33421,6 +33605,14 @@ "$ref": "GoogleCloudAiplatformV1FunctionDeclaration" }, "type": "array" + }, + "googleSearchRetrieval": { + "$ref": "GoogleCloudAiplatformV1GoogleSearchRetrieval", + "description": "Optional. Specialized retrieval tool that is powered by Google search." + }, + "retrieval": { + "$ref": "GoogleCloudAiplatformV1Retrieval", + "description": "Optional. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation." } }, "type": "object" @@ -34044,6 +34236,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1VertexAISearch": { + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "id": "GoogleCloudAiplatformV1VertexAISearch", + "properties": { + "datastore": { + "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. projects/\u003c\u003e/locations/\u003c\u003e/collections/\u003c\u003e/dataStores/\u003c\u003e", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1VideoMetadata": { "description": "Metadata describes the input video content.", "id": "GoogleCloudAiplatformV1VideoMetadata", @@ -34825,12 +35028,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -34939,7 +35142,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -35137,12 +35347,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -35251,6 +35461,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -35335,7 +35552,7 @@ "type": "array" }, "recitationAction": { - "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION.", + "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION. When the given input is not found in any source, the recitation action will not be specified.", "enum": [ "ACTION_UNSPECIFIED", "CITE", @@ -35563,12 +35780,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -35677,7 +35894,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -35875,12 +36099,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -35989,6 +36213,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -36312,12 +36543,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -36426,7 +36657,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -36624,12 +36862,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -36738,6 +36976,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -36822,7 +37067,7 @@ "type": "array" }, "recitationAction": { - "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION.", + "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION. When the given input is not found in any source, the recitation action will be NO_ACTION.", "enum": [ "ACTION_UNSPECIFIED", "CITE", @@ -37050,12 +37295,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -37164,7 +37409,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -37362,12 +37614,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -37476,6 +37728,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -38624,6 +38883,10 @@ "groundingMetadata": { "$ref": "LearningGenaiRootGroundingMetadata" }, + "isCode": { + "description": "Applies to streaming response message only. Whether the message is a code.", + "type": "boolean" + }, "isFallback": { "description": "Applies to Response message only. Indicates whether the message is a fallback and the response would have otherwise been empty.", "type": "boolean" diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index b339f734c11..2f591df8795 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -2545,6 +2545,10 @@ type CloudAiNlLlmProtoServiceSafetyRating struct { // explicit. Category string `json:"category,omitempty"` + // InfluentialTerms: The influential terms that could potentially block + // the response. + InfluentialTerms []*CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm `json:"influentialTerms,omitempty"` + // Probability: Harm probability levels in the content. // // Possible values: @@ -2555,6 +2559,22 @@ type CloudAiNlLlmProtoServiceSafetyRating struct { // "HIGH" - High level of harm. Probability string `json:"probability,omitempty"` + // ProbabilityScore: Harm probability score. + ProbabilityScore float64 `json:"probabilityScore,omitempty"` + + // Severity: Harm severity levels in the content. + // + // Possible values: + // "HARM_PROBABILITY_UNSPECIFIED" - Harm probability unspecified. + // "NEGLIGIBLE" - Negligible level of harm. + // "LOW" - Low level of harm. + // "MEDIUM" - Medium level of harm. + // "HIGH" - High level of harm. + Severity string `json:"severity,omitempty"` + + // SeverityScore: Harm severity score. + SeverityScore float64 `json:"severityScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocked") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2578,6 +2598,79 @@ func (s *CloudAiNlLlmProtoServiceSafetyRating) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *CloudAiNlLlmProtoServiceSafetyRating) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiNlLlmProtoServiceSafetyRating + var s1 struct { + ProbabilityScore gensupport.JSONFloat64 `json:"probabilityScore"` + SeverityScore gensupport.JSONFloat64 `json:"severityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ProbabilityScore = float64(s1.ProbabilityScore) + s.SeverityScore = float64(s1.SeverityScore) + return nil +} + +// CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm: The influential +// term that could potentially block the response. +type CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm struct { + // BeginOffset: The beginning offset of the influential term. + BeginOffset int64 `json:"beginOffset,omitempty"` + + // Confidence: The confidence score of the influential term. + Confidence float64 `json:"confidence,omitempty"` + + // Source: The source of the influential term, prompt or response. + // + // Possible values: + // "SOURCE_UNSPECIFIED" - Unspecified source. + // "PROMPT" - The influential term comes from the prompt. + // "RESPONSE" - The influential term comes from the response. + Source string `json:"source,omitempty"` + + // Term: The influential term. + Term string `json:"term,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BeginOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BeginOffset") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // CloudAiNlLlmProtoServiceUsageMetadata: Usage metadata about // response(s). type CloudAiNlLlmProtoServiceUsageMetadata struct { @@ -4830,6 +4923,10 @@ type GoogleCloudAiplatformV1Candidate struct { // "OTHER" - All other reasons that stopped the token generation FinishReason string `json:"finishReason,omitempty"` + // GroundingMetadata: Output only. Metadata specifies sources used to + // ground generated content. + GroundingMetadata *GoogleCloudAiplatformV1GroundingMetadata `json:"groundingMetadata,omitempty"` + // Index: Output only. Index of the candidate. Index int64 `json:"index,omitempty"` @@ -6075,11 +6172,6 @@ type GoogleCloudAiplatformV1CreatePipelineJobRequest struct { // characters, and valid characters are `/a-z-/`. PipelineJobId string `json:"pipelineJobId,omitempty"` - // PreflightValidations: Optional. Whether to do component level - // validations before job creation. Currently we only support Google - // First Party Component/Pipelines. - PreflightValidations bool `json:"preflightValidations,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. However, any @@ -8318,6 +8410,11 @@ type GoogleCloudAiplatformV1Endpoint struct { // logging for online prediction. PredictRequestResponseLoggingConfig *GoogleCloudAiplatformV1PredictRequestResponseLoggingConfig `json:"predictRequestResponseLoggingConfig,omitempty"` + // PrivateServiceConnectConfig: Optional. Configuration for private + // service connect. network and private_service_connect_config are + // mutually exclusive. + PrivateServiceConnectConfig *GoogleCloudAiplatformV1PrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` + // TrafficSplit: A map from a DeployedModel's ID to the percentage of // this Endpoint's traffic that should be forwarded to that // DeployedModel. If a DeployedModel's ID is not listed in this map, @@ -11482,6 +11579,10 @@ type GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource struct { // Online Store. FeatureGroups []*GoogleCloudAiplatformV1FeatureViewFeatureRegistrySourceFeatureGroup `json:"featureGroups,omitempty"` + // ProjectNumber: Optional. The project number of the parent project of + // the Feature Groups. + ProjectNumber int64 `json:"projectNumber,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "FeatureGroups") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -11562,6 +11663,9 @@ type GoogleCloudAiplatformV1FeatureViewSync struct { // RunTime: Output only. Time when this FeatureViewSync is finished. RunTime *GoogleTypeInterval `json:"runTime,omitempty"` + // SyncSummary: Output only. Summary of the sync job. + SyncSummary *GoogleCloudAiplatformV1FeatureViewSyncSyncSummary `json:"syncSummary,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -11624,6 +11728,40 @@ func (s *GoogleCloudAiplatformV1FeatureViewSyncConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1FeatureViewSyncSyncSummary: Summary from the +// Sync job. For continuous syncs, the summary is updated periodically. +// For batch syncs, it gets updated on completion of the sync. +type GoogleCloudAiplatformV1FeatureViewSyncSyncSummary struct { + // RowSynced: Output only. Total number of rows synced. + RowSynced int64 `json:"rowSynced,omitempty,string"` + + // TotalSlot: Output only. BigQuery slot milliseconds consumed for the + // sync job. + TotalSlot int64 `json:"totalSlot,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "RowSynced") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RowSynced") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FeatureViewSyncSyncSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureViewSyncSyncSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Featurestore: Vertex AI Feature Store provides // a centralized repository for organizing, storing, and serving ML // features. The Featurestore is a top-level container for your features @@ -12749,8 +12887,7 @@ type GoogleCloudAiplatformV1GenerateContentRequest struct { // Tools: Optional. A list of `Tools` the model may use to generate the // next response. A `Tool` is a piece of code that enables the system to // interact with external systems to perform an action, or set of - // actions, outside of knowledge and scope of the model. The only - // supported tool is currently `Function` + // actions, outside of knowledge and scope of the model. Tools []*GoogleCloudAiplatformV1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to @@ -12996,6 +13133,156 @@ func (s *GoogleCloudAiplatformV1GenericOperationMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1GoogleSearchRetrieval: Tool to retrieve public +// web data for grounding, powered by Google. +type GoogleCloudAiplatformV1GoogleSearchRetrieval struct { + // DisableAttribution: Optional. Disable using the result from this tool + // in detecting grounding attribution. This does not affect how the + // result is given to the model for generation. + DisableAttribution bool `json:"disableAttribution,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableAttribution") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableAttribution") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GoogleSearchRetrieval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GoogleSearchRetrieval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingAttribution: Grounding attribution. +type GoogleCloudAiplatformV1GroundingAttribution struct { + // ConfidenceScore: Optional. Output only. Confidence score of the + // attribution. Ranges from 0 to 1. 1 is the most confident. + ConfidenceScore float64 `json:"confidenceScore,omitempty"` + + // Segment: Output only. Segment of the content this attribution belongs + // to. + Segment *GoogleCloudAiplatformV1Segment `json:"segment,omitempty"` + + // Web: Optional. Attribution from the web. + Web *GoogleCloudAiplatformV1GroundingAttributionWeb `json:"web,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfidenceScore") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingAttribution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1GroundingAttribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1GroundingAttribution + var s1 struct { + ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScore = float64(s1.ConfidenceScore) + return nil +} + +// GoogleCloudAiplatformV1GroundingAttributionWeb: Attribution from the +// web. +type GoogleCloudAiplatformV1GroundingAttributionWeb struct { + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + + // Uri: Output only. URI reference of the attribution. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Title") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingAttributionWeb + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingMetadata: Metadata returned to client +// when grounding is enabled. +type GoogleCloudAiplatformV1GroundingMetadata struct { + // GroundingAttributions: Optional. List of grounding attributions. + GroundingAttributions []*GoogleCloudAiplatformV1GroundingAttribution `json:"groundingAttributions,omitempty"` + + // 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. + // "GroundingAttributions") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GroundingAttributions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1HyperparameterTuningJob: Represents a // HyperparameterTuningJob. A HyperparameterTuningJob has a Study // specification and multiple CustomJobs with identical CustomJob @@ -20659,12 +20946,6 @@ func (s *GoogleCloudAiplatformV1PipelineJobDetail) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1PipelineJobRuntimeConfig: The runtime config // of a PipelineJob. type GoogleCloudAiplatformV1PipelineJobRuntimeConfig struct { - // DefaultRuntime: Optional. The default runtime for the PipelineJob. If - // not provided, Vertex Custom Job is used as the runtime. For Vertex - // Custom Job, please refer to - // https://cloud.google.com/vertex-ai/docs/training/overview - DefaultRuntime *GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime `json:"defaultRuntime,omitempty"` - // FailurePolicy: Represents the failure policy of a pipeline. // Currently, the default of a pipeline is that the pipeline will // continue to run until no more tasks can be executed, also known as @@ -20714,7 +20995,7 @@ type GoogleCloudAiplatformV1PipelineJobRuntimeConfig struct { // pipelines built using Kubeflow Pipelines SDK 1.8 or lower. Parameters map[string]GoogleCloudAiplatformV1Value `json:"parameters,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultRuntime") to + // ForceSendFields is a list of field names (e.g. "FailurePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -20722,13 +21003,12 @@ type GoogleCloudAiplatformV1PipelineJobRuntimeConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultRuntime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "FailurePolicy") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -20738,38 +21018,6 @@ func (s *GoogleCloudAiplatformV1PipelineJobRuntimeConfig) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime: The -// default runtime for the PipelineJob. -type GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime struct { - // PersistentResourceRuntimeDetail: Persistent resource based runtime - // detail. - PersistentResourceRuntimeDetail *GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail `json:"persistentResourceRuntimeDetail,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PersistentResourceRuntimeDetail") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "PersistentResourceRuntimeDetail") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact: The // type of an input artifact. type GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact struct { @@ -20803,41 +21051,6 @@ func (s *GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRunti -// meDetail: Persistent resource based runtime detail. For more -// information, refer to -// https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview -type GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail struct { - // PersistentResourceName: Persistent resource name. Format: - // `projects/{project}/locations/{location}/persistentResources/{persiste - // nt_resource}` - PersistentResourceName string `json:"persistentResourceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PersistentResourceName") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PersistentResourceName") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1PipelineTaskDetail: The runtime detail of a // task execution. type GoogleCloudAiplatformV1PipelineTaskDetail struct { @@ -23263,6 +23476,41 @@ func (s *GoogleCloudAiplatformV1ResumeScheduleRequest) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Retrieval: Defines a retrieval tool that model +// can call to access external knowledge. +type GoogleCloudAiplatformV1Retrieval struct { + // DisableAttribution: Optional. Disable using the result from this tool + // in detecting grounding attribution. This does not affect how the + // result is given to the model for generation. + DisableAttribution bool `json:"disableAttribution,omitempty"` + + // VertexAiSearch: Set to use data source powered by Vertex AI Search. + VertexAiSearch *GoogleCloudAiplatformV1VertexAISearch `json:"vertexAiSearch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableAttribution") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableAttribution") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1Retrieval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Retrieval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SafetyRating: Safety rating corresponding to // the generated content. type GoogleCloudAiplatformV1SafetyRating struct { @@ -31976,6 +32224,45 @@ func (s *GoogleCloudAiplatformV1SearchNearestEntitiesResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Segment: Segment of the content. +type GoogleCloudAiplatformV1Segment struct { + // EndIndex: Output only. End index in the given Part, measured in + // bytes. Offset from the start of the Part, exclusive, starting at + // zero. + EndIndex int64 `json:"endIndex,omitempty"` + + // PartIndex: Output only. The index of a Part object within its parent + // Content object. + PartIndex int64 `json:"partIndex,omitempty"` + + // StartIndex: Output only. Start index in the given Part, measured in + // bytes. Offset from the start of the Part, inclusive, starting at + // zero. + StartIndex int64 `json:"startIndex,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1Segment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Segment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ShieldedVmConfig: A set of Shielded Instance // options. See Images using supported Shielded VM features // (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). @@ -34379,7 +34666,8 @@ func (s *GoogleCloudAiplatformV1TokensInfo) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1Tool: Tool details that the model may use to // generate response. A `Tool` is a piece of code that enables the // system to interact with external systems to perform an action, or set -// of actions, outside of knowledge and scope of the model. +// of actions, outside of knowledge and scope of the model. A Tool +// object should contain exactly one type of Tool. type GoogleCloudAiplatformV1Tool struct { // FunctionDeclarations: Optional. One or more function declarations to // be passed to the model along with the current user query. Model may @@ -34390,6 +34678,15 @@ type GoogleCloudAiplatformV1Tool struct { // function declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearchRetrieval: Optional. Specialized retrieval tool that is + // powered by Google search. + GoogleSearchRetrieval *GoogleCloudAiplatformV1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` + + // Retrieval: Optional. System will always execute the provided + // retrieval tool(s) to get external knowledge to answer the prompt. + // Retrieval results are presented to the model for generation. + Retrieval *GoogleCloudAiplatformV1Retrieval `json:"retrieval,omitempty"` + // ForceSendFields is a list of field names (e.g. // "FunctionDeclarations") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -35625,6 +35922,37 @@ func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search +// datastore for grounding. See +// https://cloud.google.com/vertex-ai-search-and-conversation +type GoogleCloudAiplatformV1VertexAISearch struct { + // Datastore: Required. Fully-qualified Vertex AI Search's datastore + // resource ID. projects/<>/locations/<>/collections/<>/dataStores/<> + Datastore string `json:"datastore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Datastore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Datastore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexAISearch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input // video content. type GoogleCloudAiplatformV1VideoMetadata struct { @@ -37135,12 +37463,12 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -37334,6 +37662,14 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -37440,7 +37776,9 @@ type LanguageLabsAidaTrustRecitationProtoRecitationResult struct { // RecitationAction: The recitation action for one given input. When its // segments contain different actions, the overall action will be - // returned in the precedence of BLOCK > CITE > NO_ACTION. + // returned in the precedence of BLOCK > CITE > NO_ACTION. When the + // given input is not found in any source, the recitation action will + // not be specified. // // Possible values: // "ACTION_UNSPECIFIED" @@ -37705,12 +38043,12 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -37904,6 +38242,14 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -38272,12 +38618,12 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -38471,6 +38817,14 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -38576,7 +38930,9 @@ type LearningGenaiRecitationRecitationResult struct { // RecitationAction: The recitation action for one given input. When its // segments contain different actions, the overall action will be - // returned in the precedence of BLOCK > CITE > NO_ACTION. + // returned in the precedence of BLOCK > CITE > NO_ACTION. When the + // given input is not found in any source, the recitation action will be + // NO_ACTION. // // Possible values: // "ACTION_UNSPECIFIED" @@ -38842,12 +39198,12 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -39041,6 +39397,14 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -40799,6 +41163,10 @@ type LearningServingLlmMessageMetadata struct { GroundingMetadata *LearningGenaiRootGroundingMetadata `json:"groundingMetadata,omitempty"` + // IsCode: Applies to streaming response message only. Whether the + // message is a code. + IsCode bool `json:"isCode,omitempty"` + // IsFallback: Applies to Response message only. Indicates whether the // message is a fallback and the response would have otherwise been // empty. @@ -62833,7 +63201,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name str // overwritten if it is in the mask. If the user does not provide a mask // then only the non-empty fields present in the request will be // overwritten. Set the update_mask to `*` to override all fields. -// Updatable fields: * `labels` +// Updatable fields: * `labels` * `serviceAgentType` func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -62946,7 +63314,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g // "type": "string" // }, // "updateMask": { - // "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels`", + // "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels` * `serviceAgentType`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -98991,15 +99359,6 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) PipelineJobId(pipelineJobId st return c } -// PreflightValidations sets the optional parameter -// "preflightValidations": Whether to do component level validations -// before job creation. Currently we only support Google First Party -// Component/Pipelines. -func (c *ProjectsLocationsPipelineJobsCreateCall) PreflightValidations(preflightValidations bool) *ProjectsLocationsPipelineJobsCreateCall { - c.urlParams_.Set("preflightValidations", fmt.Sprint(preflightValidations)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -99111,11 +99470,6 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOptio // "description": "The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated. This value should be less than 128 characters, and valid characters are `/a-z-/`.", // "location": "query", // "type": "string" - // }, - // "preflightValidations": { - // "description": "Optional. Whether to do component level validations before job creation. Currently we only support Google First Party Component/Pipelines.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+parent}/pipelineJobs", diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 2915a14a934..b670096f995 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -3856,6 +3856,136 @@ } } }, + "evaluationTasks": { + "resources": { + "operations": { + "methods": { + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.evaluationTasks.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.evaluationTasks.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.evaluationTasks.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/[^/]+/evaluationTasks/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.evaluationTasks.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "exampleStores": { "resources": { "operations": { @@ -5436,7 +5566,7 @@ "type": "string" }, "updateMask": { - "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels`", + "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels` * `serviceAgentType`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -17340,7 +17470,7 @@ } } }, - "revision": "20240205", + "revision": "20240213", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionEmbedVideoResponse": { @@ -18249,6 +18379,13 @@ ], "type": "string" }, + "influentialTerms": { + "description": "The influential terms that could potentially block the response.", + "items": { + "$ref": "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm" + }, + "type": "array" + }, "probability": { "description": "Harm probability levels in the content.", "enum": [ @@ -18266,6 +18403,69 @@ "High level of harm." ], "type": "string" + }, + "probabilityScore": { + "description": "Harm probability score.", + "format": "float", + "type": "number" + }, + "severity": { + "description": "Harm severity levels in the content.", + "enum": [ + "HARM_PROBABILITY_UNSPECIFIED", + "NEGLIGIBLE", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Harm probability unspecified.", + "Negligible level of harm.", + "Low level of harm.", + "Medium level of harm.", + "High level of harm." + ], + "type": "string" + }, + "severityScore": { + "description": "Harm severity score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm": { + "description": "The influential term that could potentially block the response.", + "id": "CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm", + "properties": { + "beginOffset": { + "description": "The beginning offset of the influential term.", + "format": "int32", + "type": "integer" + }, + "confidence": { + "description": "The confidence score of the influential term.", + "format": "float", + "type": "number" + }, + "source": { + "description": "The source of the influential term, prompt or response.", + "enum": [ + "SOURCE_UNSPECIFIED", + "PROMPT", + "RESPONSE" + ], + "enumDescriptions": [ + "Unspecified source.", + "The influential term comes from the prompt.", + "The influential term comes from the response." + ], + "type": "string" + }, + "term": { + "description": "The influential term.", + "type": "string" } }, "type": "object" @@ -19520,6 +19720,11 @@ "readOnly": true, "type": "string" }, + "groundingMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingMetadata", + "description": "Output only. Metadata specifies sources used to ground generated content.", + "readOnly": true + }, "index": { "description": "Output only. Index of the candidate.", "format": "int32", @@ -21390,6 +21595,10 @@ "$ref": "GoogleCloudAiplatformV1beta1PredictRequestResponseLoggingConfig", "description": "Configures the request-response logging for online prediction." }, + "privateServiceConnectConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PrivateServiceConnectConfig", + "description": "Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive." + }, "trafficSplit": { "additionalProperties": { "format": "int32", @@ -22363,39 +22572,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata": { - "description": "Details of EndpointService.ExportEndpoint operation.", - "id": "GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", - "description": "The common part of the operation metadata." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ExportEndpointResponse": { - "description": "Response message of EndpointService.ExportEndpoint operation.", - "id": "GoogleCloudAiplatformV1beta1ExportEndpointResponse", - "properties": { - "outputInfo": { - "$ref": "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo", - "description": "Information further describing the output of this Endpoint export." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo": { - "description": "Describes the output of the ExportEndpoint.", - "id": "GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo", - "properties": { - "bigQueryDestination": { - "$ref": "GoogleCloudAiplatformV1beta1BigQueryDestination", - "description": "If the Endpoint is being exported to BigQuery this is the full path of the BigQuery ML model created." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata": { "description": "Details of operations that exports Features values.", "id": "GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata", @@ -23191,6 +23367,11 @@ "$ref": "GoogleCloudAiplatformV1beta1FeatureViewFeatureRegistrySourceFeatureGroup" }, "type": "array" + }, + "projectNumber": { + "description": "Optional. The project number of the parent project of the Feature Groups.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -23236,6 +23417,11 @@ "$ref": "GoogleTypeInterval", "description": "Output only. Time when this FeatureViewSync is finished.", "readOnly": true + }, + "syncSummary": { + "$ref": "GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary", + "description": "Output only. Summary of the sync job.", + "readOnly": true } }, "type": "object" @@ -23251,6 +23437,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary": { + "description": "Summary from the Sync job. For continuous syncs, the summary is updated periodically. For batch syncs, it gets updated on completion of the sync.", + "id": "GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary", + "properties": { + "rowSynced": { + "description": "Output only. Total number of rows synced.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "totalSlot": { + "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfig": { "deprecated": true, "description": "Deprecated. Use IndexConfig instead.", @@ -23911,7 +24116,7 @@ "type": "array" }, "tools": { - "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. The only supported tool is currently `Function`", + "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", "items": { "$ref": "GoogleCloudAiplatformV1beta1Tool" }, @@ -24066,6 +24271,77 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval": { + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", + "properties": { + "disableAttribution": { + "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingAttribution": { + "description": "Grounding attribution.", + "id": "GoogleCloudAiplatformV1beta1GroundingAttribution", + "properties": { + "confidenceScore": { + "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1beta1Segment", + "description": "Output only. Segment of the content this attribution belongs to.", + "readOnly": true + }, + "web": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", + "description": "Optional. Attribution from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingAttributionWeb": { + "description": "Attribution from the web.", + "id": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", + "properties": { + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingMetadata": { + "description": "Metadata returned to client when grounding is enabled.", + "id": "GoogleCloudAiplatformV1beta1GroundingMetadata", + "properties": { + "groundingAttributions": { + "description": "Optional. List of grounding attributions.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingAttribution" + }, + "type": "array" + }, + "webSearchQueries": { + "description": "Optional. Web search queries for the following-up web search.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1HyperparameterTuningJob": { "description": "Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.", "id": "GoogleCloudAiplatformV1beta1HyperparameterTuningJob", @@ -28636,10 +28912,6 @@ "description": "The runtime config of a PipelineJob.", "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig", "properties": { - "defaultRuntime": { - "$ref": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime", - "description": "Optional. The default runtime for the PipelineJob. If not provided, Vertex Custom Job is used as the runtime. For Vertex Custom Job, please refer to https://cloud.google.com/vertex-ai/docs/training/overview" - }, "failurePolicy": { "description": "Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion.", "enum": [ @@ -28683,17 +28955,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime": { - "description": "The default runtime for the PipelineJob.", - "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime", - "properties": { - "persistentResourceRuntimeDetail": { - "$ref": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", - "description": "Persistent resource based runtime detail." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact": { "description": "The type of an input artifact.", "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact", @@ -28705,17 +28966,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail": { - "description": "Persistent resource based runtime detail. For more information, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", - "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", - "properties": { - "persistentResourceName": { - "description": "Persistent resource name. Format: `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1PipelineTaskDetail": { "description": "The runtime detail of a task execution.", "id": "GoogleCloudAiplatformV1beta1PipelineTaskDetail", @@ -29779,6 +30029,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RayMetricSpec": { + "description": "Configuration for the Ray metrics.", + "id": "GoogleCloudAiplatformV1beta1RayMetricSpec", + "properties": { + "disabled": { + "description": "Optional. Flag to disable the Ray metrics collection.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RaySpec": { "description": "Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes.", "id": "GoogleCloudAiplatformV1beta1RaySpec", @@ -29791,6 +30052,10 @@ "description": "Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.", "type": "string" }, + "rayMetricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1RayMetricSpec", + "description": "Optional. Ray metrics configurations." + }, "resourcePoolImages": { "additionalProperties": { "type": "string" @@ -30268,6 +30533,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Retrieval": { + "description": "Defines a retrieval tool that model can call to access external knowledge.", + "id": "GoogleCloudAiplatformV1beta1Retrieval", + "properties": { + "disableAttribution": { + "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "type": "boolean" + }, + "vertexAiSearch": { + "$ref": "GoogleCloudAiplatformV1beta1VertexAISearch", + "description": "Set to use data source powered by Vertex AI Search." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SafetyRating": { "description": "Safety rating corresponding to the generated content.", "id": "GoogleCloudAiplatformV1beta1SafetyRating", @@ -34466,6 +34746,31 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Segment": { + "description": "Segment of the content.", + "id": "GoogleCloudAiplatformV1beta1Segment", + "properties": { + "endIndex": { + "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "partIndex": { + "description": "Output only. The index of a Part object within its parent Content object.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startIndex": { + "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ServiceAccountSpec": { "description": "Configuration for the use of custom service account to run the workloads.", "id": "GoogleCloudAiplatformV1beta1ServiceAccountSpec", @@ -35880,7 +36185,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1Tool": { - "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool.", "id": "GoogleCloudAiplatformV1beta1Tool", "properties": { "functionDeclarations": { @@ -35889,6 +36194,14 @@ "$ref": "GoogleCloudAiplatformV1beta1FunctionDeclaration" }, "type": "array" + }, + "googleSearchRetrieval": { + "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", + "description": "Optional. Specialized retrieval tool that is powered by Google search." + }, + "retrieval": { + "$ref": "GoogleCloudAiplatformV1beta1Retrieval", + "description": "Optional. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation." } }, "type": "object" @@ -36538,6 +36851,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VertexAISearch": { + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "id": "GoogleCloudAiplatformV1beta1VertexAISearch", + "properties": { + "datastore": { + "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. projects/\u003c\u003e/locations/\u003c\u003e/collections/\u003c\u003e/dataStores/\u003c\u003e", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1VideoMetadata": { "description": "Metadata describes the input video content.", "id": "GoogleCloudAiplatformV1beta1VideoMetadata", @@ -37356,12 +37680,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -37470,7 +37794,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -37668,12 +37999,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -37782,6 +38113,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -37866,7 +38204,7 @@ "type": "array" }, "recitationAction": { - "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION.", + "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION. When the given input is not found in any source, the recitation action will not be specified.", "enum": [ "ACTION_UNSPECIFIED", "CITE", @@ -38094,12 +38432,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -38208,7 +38546,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -38406,12 +38751,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -38520,6 +38865,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -38843,12 +39195,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -38957,7 +39309,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -39155,12 +39514,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -39269,6 +39628,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -39353,7 +39719,7 @@ "type": "array" }, "recitationAction": { - "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION.", + "description": "The recitation action for one given input. When its segments contain different actions, the overall action will be returned in the precedence of BLOCK \u003e CITE \u003e NO_ACTION. When the given input is not found in any source, the recitation action will be NO_ACTION.", "enum": [ "ACTION_UNSPECIFIED", "CITE", @@ -39581,12 +39947,12 @@ "GEMINI_IT_MECH", "GEMINI_IT_TABLE_GEN", "GEMINI_IT_NIMBUS_DECIBEL", - "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_IT_CLOUD_CODE_IF", "GEMINI_IT_CLOUD_EUR_LEX_JSON", "GEMINI_IT_CLOUD_OASST", "GEMINI_IT_CLOUD_SELF_INSTRUCT", "GEMINI_IT_CLOUD_UCS_AQUAMUSE", + "GEMIT_BRIDGE_SUFFIX_FT", "GEMINI_GOOSE_PUBLIC", "GEMINI_GOOSE_SILOED", "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII", @@ -39695,7 +40061,14 @@ "GEMINI_V2_NTL_TRANSLIT_BILEX_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5", "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5", - "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT", + "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI", + "CLOUD_GEMIT_MT_DIALGUE_LMSYS", + "CLOUD_GEMIT_MTS_DIALOGUE_V3", + "CLOUD_GEMIT_COMMIT_MSG_GEN_V3", + "CLOUD_GEMIT_CODE_IF_V1", + "CLOUD_GEMIT_CODE_SELF_REPAIR", + "CLOUD_GEMIT_IDENTITY" ], "enumDescriptions": [ "", @@ -39893,12 +40266,12 @@ "", "", "", - "Gemit Bridge ULM FT dataset", - "Gemini IT Cloud Build datasets.", "", "", "", "", + "", + "Gemit Bridge ULM FT dataset", "Gemini Goose FT datasets.", "", "Gemini V2 datasets", @@ -40007,6 +40380,13 @@ "", "", "", + "", + "Cloud gemit pro FT datasets.", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -41155,6 +41535,10 @@ "groundingMetadata": { "$ref": "LearningGenaiRootGroundingMetadata" }, + "isCode": { + "description": "Applies to streaming response message only. Whether the message is a code.", + "type": "boolean" + }, "isFallback": { "description": "Applies to Response message only. Indicates whether the message is a fallback and the response would have otherwise been empty.", "type": "boolean" diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index e084f03c535..bdb4649fb4c 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -189,6 +189,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DeploymentResourcePools = NewProjectsLocationsDeploymentResourcePoolsService(s) rs.EdgeDevices = NewProjectsLocationsEdgeDevicesService(s) rs.Endpoints = NewProjectsLocationsEndpointsService(s) + rs.EvaluationTasks = NewProjectsLocationsEvaluationTasksService(s) rs.ExampleStores = NewProjectsLocationsExampleStoresService(s) rs.ExtensionControllers = NewProjectsLocationsExtensionControllersService(s) rs.Extensions = NewProjectsLocationsExtensionsService(s) @@ -238,6 +239,8 @@ type ProjectsLocationsService struct { Endpoints *ProjectsLocationsEndpointsService + EvaluationTasks *ProjectsLocationsEvaluationTasksService + ExampleStores *ProjectsLocationsExampleStoresService ExtensionControllers *ProjectsLocationsExtensionControllersService @@ -540,6 +543,27 @@ type ProjectsLocationsEndpointsOperationsService struct { s *Service } +func NewProjectsLocationsEvaluationTasksService(s *Service) *ProjectsLocationsEvaluationTasksService { + rs := &ProjectsLocationsEvaluationTasksService{s: s} + rs.Operations = NewProjectsLocationsEvaluationTasksOperationsService(s) + return rs +} + +type ProjectsLocationsEvaluationTasksService struct { + s *Service + + Operations *ProjectsLocationsEvaluationTasksOperationsService +} + +func NewProjectsLocationsEvaluationTasksOperationsService(s *Service) *ProjectsLocationsEvaluationTasksOperationsService { + rs := &ProjectsLocationsEvaluationTasksOperationsService{s: s} + return rs +} + +type ProjectsLocationsEvaluationTasksOperationsService struct { + s *Service +} + func NewProjectsLocationsExampleStoresService(s *Service) *ProjectsLocationsExampleStoresService { rs := &ProjectsLocationsExampleStoresService{s: s} rs.Operations = NewProjectsLocationsExampleStoresOperationsService(s) @@ -2773,6 +2797,10 @@ type CloudAiNlLlmProtoServiceSafetyRating struct { // explicit. Category string `json:"category,omitempty"` + // InfluentialTerms: The influential terms that could potentially block + // the response. + InfluentialTerms []*CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm `json:"influentialTerms,omitempty"` + // Probability: Harm probability levels in the content. // // Possible values: @@ -2783,6 +2811,22 @@ type CloudAiNlLlmProtoServiceSafetyRating struct { // "HIGH" - High level of harm. Probability string `json:"probability,omitempty"` + // ProbabilityScore: Harm probability score. + ProbabilityScore float64 `json:"probabilityScore,omitempty"` + + // Severity: Harm severity levels in the content. + // + // Possible values: + // "HARM_PROBABILITY_UNSPECIFIED" - Harm probability unspecified. + // "NEGLIGIBLE" - Negligible level of harm. + // "LOW" - Low level of harm. + // "MEDIUM" - Medium level of harm. + // "HIGH" - High level of harm. + Severity string `json:"severity,omitempty"` + + // SeverityScore: Harm severity score. + SeverityScore float64 `json:"severityScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocked") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2806,6 +2850,79 @@ func (s *CloudAiNlLlmProtoServiceSafetyRating) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *CloudAiNlLlmProtoServiceSafetyRating) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiNlLlmProtoServiceSafetyRating + var s1 struct { + ProbabilityScore gensupport.JSONFloat64 `json:"probabilityScore"` + SeverityScore gensupport.JSONFloat64 `json:"severityScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ProbabilityScore = float64(s1.ProbabilityScore) + s.SeverityScore = float64(s1.SeverityScore) + return nil +} + +// CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm: The influential +// term that could potentially block the response. +type CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm struct { + // BeginOffset: The beginning offset of the influential term. + BeginOffset int64 `json:"beginOffset,omitempty"` + + // Confidence: The confidence score of the influential term. + Confidence float64 `json:"confidence,omitempty"` + + // Source: The source of the influential term, prompt or response. + // + // Possible values: + // "SOURCE_UNSPECIFIED" - Unspecified source. + // "PROMPT" - The influential term comes from the prompt. + // "RESPONSE" - The influential term comes from the response. + Source string `json:"source,omitempty"` + + // Term: The influential term. + Term string `json:"term,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BeginOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BeginOffset") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiNlLlmProtoServiceSafetyRatingInfluentialTerm + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + // CloudAiNlLlmProtoServiceUsageMetadata: Usage metadata about // response(s). type CloudAiNlLlmProtoServiceUsageMetadata struct { @@ -5192,6 +5309,10 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // "OTHER" - All other reasons that stopped the token generation FinishReason string `json:"finishReason,omitempty"` + // GroundingMetadata: Output only. Metadata specifies sources used to + // ground generated content. + GroundingMetadata *GoogleCloudAiplatformV1beta1GroundingMetadata `json:"groundingMetadata,omitempty"` + // Index: Output only. Index of the candidate. Index int64 `json:"index,omitempty"` @@ -8826,6 +8947,11 @@ type GoogleCloudAiplatformV1beta1Endpoint struct { // logging for online prediction. PredictRequestResponseLoggingConfig *GoogleCloudAiplatformV1beta1PredictRequestResponseLoggingConfig `json:"predictRequestResponseLoggingConfig,omitempty"` + // PrivateServiceConnectConfig: Optional. Configuration for private + // service connect. network and private_service_connect_config are + // mutually exclusive. + PrivateServiceConnectConfig *GoogleCloudAiplatformV1beta1PrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` + // TrafficSplit: A map from a DeployedModel's ID to the percentage of // this Endpoint's traffic that should be forwarded to that // DeployedModel. If a DeployedModel's ID is not listed in this map, @@ -10556,97 +10682,6 @@ func (s *GoogleCloudAiplatformV1beta1ExportDataResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata: Details -// of EndpointService.ExportEndpoint operation. -type GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata struct { - // GenericMetadata: The common part of the operation metadata. - GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GenericMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ExportEndpointResponse: Response message -// of EndpointService.ExportEndpoint operation. -type GoogleCloudAiplatformV1beta1ExportEndpointResponse struct { - // OutputInfo: Information further describing the output of this - // Endpoint export. - OutputInfo *GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo `json:"outputInfo,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputInfo") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "OutputInfo") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ExportEndpointResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo: -// Describes the output of the ExportEndpoint. -type GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo struct { - // BigQueryDestination: If the Endpoint is being exported to BigQuery - // this is the full path of the BigQuery ML model created. - BigQueryDestination *GoogleCloudAiplatformV1beta1BigQueryDestination `json:"bigQueryDestination,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BigQueryDestination") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BigQueryDestination") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ExportEndpointResponseOutputInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata: // Details of operations that exports Features values. type GoogleCloudAiplatformV1beta1ExportFeatureValuesOperationMetadata struct { @@ -12159,6 +12194,10 @@ type GoogleCloudAiplatformV1beta1FeatureViewFeatureRegistrySource struct { // Online Store. FeatureGroups []*GoogleCloudAiplatformV1beta1FeatureViewFeatureRegistrySourceFeatureGroup `json:"featureGroups,omitempty"` + // ProjectNumber: Optional. The project number of the parent project of + // the Feature Groups. + ProjectNumber int64 `json:"projectNumber,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "FeatureGroups") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -12239,6 +12278,9 @@ type GoogleCloudAiplatformV1beta1FeatureViewSync struct { // RunTime: Output only. Time when this FeatureViewSync is finished. RunTime *GoogleTypeInterval `json:"runTime,omitempty"` + // SyncSummary: Output only. Summary of the sync job. + SyncSummary *GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary `json:"syncSummary,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -12301,6 +12343,41 @@ func (s *GoogleCloudAiplatformV1beta1FeatureViewSyncConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary: Summary from +// the Sync job. For continuous syncs, the summary is updated +// periodically. For batch syncs, it gets updated on completion of the +// sync. +type GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary struct { + // RowSynced: Output only. Total number of rows synced. + RowSynced int64 `json:"rowSynced,omitempty,string"` + + // TotalSlot: Output only. BigQuery slot milliseconds consumed for the + // sync job. + TotalSlot int64 `json:"totalSlot,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "RowSynced") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RowSynced") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfig: // Deprecated. Use IndexConfig instead. type GoogleCloudAiplatformV1beta1FeatureViewVectorSearchConfig struct { @@ -13635,8 +13712,7 @@ type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { // Tools: Optional. A list of `Tools` the model may use to generate the // next response. A `Tool` is a piece of code that enables the system to // interact with external systems to perform an action, or set of - // actions, outside of knowledge and scope of the model. The only - // supported tool is currently `Function` + // actions, outside of knowledge and scope of the model. Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to @@ -13882,6 +13958,157 @@ func (s *GoogleCloudAiplatformV1beta1GenericOperationMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve +// public web data for grounding, powered by Google. +type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { + // DisableAttribution: Optional. Disable using the result from this tool + // in detecting grounding attribution. This does not affect how the + // result is given to the model for generation. + DisableAttribution bool `json:"disableAttribution,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableAttribution") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableAttribution") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GoogleSearchRetrieval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingAttribution: Grounding +// attribution. +type GoogleCloudAiplatformV1beta1GroundingAttribution struct { + // ConfidenceScore: Optional. Output only. Confidence score of the + // attribution. Ranges from 0 to 1. 1 is the most confident. + ConfidenceScore float64 `json:"confidenceScore,omitempty"` + + // Segment: Output only. Segment of the content this attribution belongs + // to. + Segment *GoogleCloudAiplatformV1beta1Segment `json:"segment,omitempty"` + + // Web: Optional. Attribution from the web. + Web *GoogleCloudAiplatformV1beta1GroundingAttributionWeb `json:"web,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfidenceScore") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution + var s1 struct { + ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScore = float64(s1.ConfidenceScore) + return nil +} + +// GoogleCloudAiplatformV1beta1GroundingAttributionWeb: Attribution from +// the web. +type GoogleCloudAiplatformV1beta1GroundingAttributionWeb struct { + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + + // Uri: Output only. URI reference of the attribution. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Title") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttributionWeb + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to +// client when grounding is enabled. +type GoogleCloudAiplatformV1beta1GroundingMetadata struct { + // GroundingAttributions: Optional. List of grounding attributions. + GroundingAttributions []*GoogleCloudAiplatformV1beta1GroundingAttribution `json:"groundingAttributions,omitempty"` + + // 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. + // "GroundingAttributions") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GroundingAttributions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1HyperparameterTuningJob: Represents a // HyperparameterTuningJob. A HyperparameterTuningJob has a Study // specification and multiple CustomJobs with identical CustomJob @@ -21839,12 +22066,6 @@ func (s *GoogleCloudAiplatformV1beta1PipelineJobDetail) MarshalJSON() ([]byte, e // GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig: The runtime // config of a PipelineJob. type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig struct { - // DefaultRuntime: Optional. The default runtime for the PipelineJob. If - // not provided, Vertex Custom Job is used as the runtime. For Vertex - // Custom Job, please refer to - // https://cloud.google.com/vertex-ai/docs/training/overview - DefaultRuntime *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime `json:"defaultRuntime,omitempty"` - // FailurePolicy: Represents the failure policy of a pipeline. // Currently, the default of a pipeline is that the pipeline will // continue to run until no more tasks can be executed, also known as @@ -21894,7 +22115,7 @@ type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig struct { // pipelines built using Kubeflow Pipelines SDK 1.8 or lower. Parameters map[string]GoogleCloudAiplatformV1beta1Value `json:"parameters,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultRuntime") to + // ForceSendFields is a list of field names (e.g. "FailurePolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -21902,13 +22123,12 @@ type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultRuntime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "FailurePolicy") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -21918,38 +22138,6 @@ func (s *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime: -// The default runtime for the PipelineJob. -type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime struct { - // PersistentResourceRuntimeDetail: Persistent resource based runtime - // detail. - PersistentResourceRuntimeDetail *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail `json:"persistentResourceRuntimeDetail,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PersistentResourceRuntimeDetail") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "PersistentResourceRuntimeDetail") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact: // The type of an input artifact. type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact struct { @@ -21983,41 +22171,6 @@ func (s *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact) Mars return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResource -// RuntimeDetail: Persistent resource based runtime detail. For more -// information, refer to -// https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview -type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail struct { - // PersistentResourceName: Persistent resource name. Format: - // `projects/{project}/locations/{location}/persistentResources/{persiste - // nt_resource}` - PersistentResourceName string `json:"persistentResourceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PersistentResourceName") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PersistentResourceName") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1PipelineTaskDetail: The runtime detail of // a task execution. type GoogleCloudAiplatformV1beta1PipelineTaskDetail struct { @@ -23820,6 +23973,35 @@ func (s *GoogleCloudAiplatformV1beta1RawPredictRequest) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RayMetricSpec: Configuration for the Ray +// metrics. +type GoogleCloudAiplatformV1beta1RayMetricSpec struct { + // Disabled: Optional. Flag to disable the Ray metrics collection. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1RayMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RayMetricSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RaySpec: Configuration information for // the Ray cluster. For experimental launch, Ray cluster creation and // Persistent cluster creation are 1:1 mapping: We will provision all @@ -23840,6 +24022,9 @@ type GoogleCloudAiplatformV1beta1RaySpec struct { // Otherwise, use the {@code resource_pool_images} field. ImageUri string `json:"imageUri,omitempty"` + // RayMetricSpec: Optional. Ray metrics configurations. + RayMetricSpec *GoogleCloudAiplatformV1beta1RayMetricSpec `json:"rayMetricSpec,omitempty"` + // ResourcePoolImages: Optional. Required if image_uri isn't set. A map // of resource_pool_id to prebuild Ray image if user need to use // different images for different head/worker pools. This map needs to @@ -24840,6 +25025,41 @@ func (s *GoogleCloudAiplatformV1beta1ResumeScheduleRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Retrieval: Defines a retrieval tool that +// model can call to access external knowledge. +type GoogleCloudAiplatformV1beta1Retrieval struct { + // DisableAttribution: Optional. Disable using the result from this tool + // in detecting grounding attribution. This does not affect how the + // result is given to the model for generation. + DisableAttribution bool `json:"disableAttribution,omitempty"` + + // VertexAiSearch: Set to use data source powered by Vertex AI Search. + VertexAiSearch *GoogleCloudAiplatformV1beta1VertexAISearch `json:"vertexAiSearch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableAttribution") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableAttribution") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1Retrieval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Retrieval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SafetyRating: Safety rating corresponding // to the generated content. type GoogleCloudAiplatformV1beta1SafetyRating struct { @@ -33401,6 +33621,45 @@ func (s *GoogleCloudAiplatformV1beta1SearchNearestEntitiesResponse) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Segment: Segment of the content. +type GoogleCloudAiplatformV1beta1Segment struct { + // EndIndex: Output only. End index in the given Part, measured in + // bytes. Offset from the start of the Part, exclusive, starting at + // zero. + EndIndex int64 `json:"endIndex,omitempty"` + + // PartIndex: Output only. The index of a Part object within its parent + // Content object. + PartIndex int64 `json:"partIndex,omitempty"` + + // StartIndex: Output only. Start index in the given Part, measured in + // bytes. Offset from the start of the Part, inclusive, starting at + // zero. + StartIndex int64 `json:"startIndex,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1Segment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Segment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ServiceAccountSpec: Configuration for the // use of custom service account to run the workloads. type GoogleCloudAiplatformV1beta1ServiceAccountSpec struct { @@ -35927,7 +36186,8 @@ func (s *GoogleCloudAiplatformV1beta1TokensInfo) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1Tool: Tool details that the model may use // to generate response. A `Tool` is a piece of code that enables the // system to interact with external systems to perform an action, or set -// of actions, outside of knowledge and scope of the model. +// of actions, outside of knowledge and scope of the model. A Tool +// object should contain exactly one type of Tool. type GoogleCloudAiplatformV1beta1Tool struct { // FunctionDeclarations: Optional. One or more function declarations to // be passed to the model along with the current user query. Model may @@ -35938,6 +36198,15 @@ type GoogleCloudAiplatformV1beta1Tool struct { // function declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearchRetrieval: Optional. Specialized retrieval tool that is + // powered by Google search. + GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` + + // Retrieval: Optional. System will always execute the provided + // retrieval tool(s) to get external knowledge to answer the prompt. + // Retrieval results are presented to the model for generation. + Retrieval *GoogleCloudAiplatformV1beta1Retrieval `json:"retrieval,omitempty"` + // ForceSendFields is a list of field names (e.g. // "FunctionDeclarations") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -37241,6 +37510,37 @@ func (s *GoogleCloudAiplatformV1beta1Value) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI +// Search datastore for grounding. See +// https://cloud.google.com/vertex-ai-search-and-conversation +type GoogleCloudAiplatformV1beta1VertexAISearch struct { + // Datastore: Required. Fully-qualified Vertex AI Search's datastore + // resource ID. projects/<>/locations/<>/collections/<>/dataStores/<> + Datastore string `json:"datastore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Datastore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Datastore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1VertexAISearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VertexAISearch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1VideoMetadata: Metadata describes the // input video content. type GoogleCloudAiplatformV1beta1VideoMetadata struct { @@ -38856,12 +39156,12 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -39055,6 +39355,14 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -39161,7 +39469,9 @@ type LanguageLabsAidaTrustRecitationProtoRecitationResult struct { // RecitationAction: The recitation action for one given input. When its // segments contain different actions, the overall action will be - // returned in the precedence of BLOCK > CITE > NO_ACTION. + // returned in the precedence of BLOCK > CITE > NO_ACTION. When the + // given input is not found in any source, the recitation action will + // not be specified. // // Possible values: // "ACTION_UNSPECIFIED" @@ -39426,12 +39736,12 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -39625,6 +39935,14 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -39993,12 +40311,12 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -40192,6 +40510,14 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -40297,7 +40623,9 @@ type LearningGenaiRecitationRecitationResult struct { // RecitationAction: The recitation action for one given input. When its // segments contain different actions, the overall action will be - // returned in the precedence of BLOCK > CITE > NO_ACTION. + // returned in the precedence of BLOCK > CITE > NO_ACTION. When the + // given input is not found in any source, the recitation action will be + // NO_ACTION. // // Possible values: // "ACTION_UNSPECIFIED" @@ -40563,12 +40891,12 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_IT_MECH" // "GEMINI_IT_TABLE_GEN" // "GEMINI_IT_NIMBUS_DECIBEL" - // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset - // "GEMINI_IT_CLOUD_CODE_IF" - Gemini IT Cloud Build datasets. + // "GEMINI_IT_CLOUD_CODE_IF" // "GEMINI_IT_CLOUD_EUR_LEX_JSON" // "GEMINI_IT_CLOUD_OASST" // "GEMINI_IT_CLOUD_SELF_INSTRUCT" // "GEMINI_IT_CLOUD_UCS_AQUAMUSE" + // "GEMIT_BRIDGE_SUFFIX_FT" - Gemit Bridge ULM FT dataset // "GEMINI_GOOSE_PUBLIC" - Gemini Goose FT datasets. // "GEMINI_GOOSE_SILOED" // "GEMINI_V2_CMS_WIKIPEDIA_LANG_FILTERED_GCC_PII" - Gemini V2 @@ -40762,6 +41090,14 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_V2_NTL_SYN_BT_TRANSLATE_DEDUP_N5" // "GEMINI_V2_NTL_SYN_FT_FIXED_TRANSLATE_DEDUP_N5" // "GEMINI_V2_CANARIES_SHUFFLED_COMPLIANT" + // "CLOUD_GEMIT_CLOUD_FACTUALITY_GROUNDING_MAGI" - Cloud gemit pro FT + // datasets. + // "CLOUD_GEMIT_MT_DIALGUE_LMSYS" + // "CLOUD_GEMIT_MTS_DIALOGUE_V3" + // "CLOUD_GEMIT_COMMIT_MSG_GEN_V3" + // "CLOUD_GEMIT_CODE_IF_V1" + // "CLOUD_GEMIT_CODE_SELF_REPAIR" + // "CLOUD_GEMIT_IDENTITY" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -42520,6 +42856,10 @@ type LearningServingLlmMessageMetadata struct { GroundingMetadata *LearningGenaiRootGroundingMetadata `json:"groundingMetadata,omitempty"` + // IsCode: Applies to streaming response message only. Whether the + // message is a code. + IsCode bool `json:"isCode,omitempty"` + // IsFallback: Applies to Response message only. Indicates whether the // message is a fallback and the response would have otherwise been // empty. @@ -60881,150 +61221,9 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.Call } -// method id "aiplatform.projects.locations.exampleStores.operations.cancel": +// method id "aiplatform.projects.locations.evaluationTasks.operations.delete": -type ProjectsLocationsExampleStoresOperationsCancelCall struct { - s *Service - name string - 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 *ProjectsLocationsExampleStoresOperationsService) Cancel(name string) *ProjectsLocationsExampleStoresOperationsCancelCall { - c := &ProjectsLocationsExampleStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsExampleStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.exampleStores.operations.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleProtobufEmpty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.exampleStores.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:cancel", - // "response": { - // "$ref": "GoogleProtobufEmpty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "aiplatform.projects.locations.exampleStores.operations.delete": - -type ProjectsLocationsExampleStoresOperationsDeleteCall struct { +type ProjectsLocationsEvaluationTasksOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61038,8 +61237,8 @@ type ProjectsLocationsExampleStoresOperationsDeleteCall struct { // it returns `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsExampleStoresOperationsService) Delete(name string) *ProjectsLocationsExampleStoresOperationsDeleteCall { - c := &ProjectsLocationsExampleStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationTasksOperationsService) Delete(name string) *ProjectsLocationsEvaluationTasksOperationsDeleteCall { + c := &ProjectsLocationsEvaluationTasksOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61047,7 +61246,7 @@ func (r *ProjectsLocationsExampleStoresOperationsService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsDeleteCall { +func (c *ProjectsLocationsEvaluationTasksOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationTasksOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61055,21 +61254,21 @@ func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsDeleteCall { +func (c *ProjectsLocationsEvaluationTasksOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEvaluationTasksOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationTasksOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61092,14 +61291,14 @@ func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.exampleStores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.evaluationTasks.operations.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61131,9 +61330,9 @@ func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Do(opts ...googleap return ret, nil // { // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}", // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.exampleStores.operations.delete", + // "id": "aiplatform.projects.locations.evaluationTasks.operations.delete", // "parameterOrder": [ // "name" // ], @@ -61141,7 +61340,7 @@ func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Do(opts ...googleap // "name": { // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -61157,9 +61356,9 @@ func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Do(opts ...googleap } -// method id "aiplatform.projects.locations.exampleStores.operations.get": +// method id "aiplatform.projects.locations.evaluationTasks.operations.get": -type ProjectsLocationsExampleStoresOperationsGetCall struct { +type ProjectsLocationsEvaluationTasksOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61173,8 +61372,8 @@ type ProjectsLocationsExampleStoresOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsExampleStoresOperationsService) Get(name string) *ProjectsLocationsExampleStoresOperationsGetCall { - c := &ProjectsLocationsExampleStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationTasksOperationsService) Get(name string) *ProjectsLocationsEvaluationTasksOperationsGetCall { + c := &ProjectsLocationsEvaluationTasksOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61182,7 +61381,7 @@ func (r *ProjectsLocationsExampleStoresOperationsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExampleStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsGetCall { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationTasksOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61192,7 +61391,7 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExampleStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsGetCall { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationTasksOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -61200,21 +61399,21 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExampleStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsGetCall { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationTasksOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExampleStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExampleStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61240,14 +61439,14 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.exampleStores.operations.get" call. +// Do executes the "aiplatform.projects.locations.evaluationTasks.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExampleStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61279,9 +61478,9 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.exampleStores.operations.get", + // "id": "aiplatform.projects.locations.evaluationTasks.operations.get", // "parameterOrder": [ // "name" // ], @@ -61289,7 +61488,7 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) Do(opts ...googleapi.C // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -61305,9 +61504,9 @@ func (c *ProjectsLocationsExampleStoresOperationsGetCall) Do(opts ...googleapi.C } -// method id "aiplatform.projects.locations.exampleStores.operations.list": +// method id "aiplatform.projects.locations.evaluationTasks.operations.list": -type ProjectsLocationsExampleStoresOperationsListCall struct { +type ProjectsLocationsEvaluationTasksOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61321,29 +61520,29 @@ type ProjectsLocationsExampleStoresOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsExampleStoresOperationsService) List(name string) *ProjectsLocationsExampleStoresOperationsListCall { - c := &ProjectsLocationsExampleStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationTasksOperationsService) List(name string) *ProjectsLocationsEvaluationTasksOperationsListCall { + c := &ProjectsLocationsEvaluationTasksOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsExampleStoresOperationsListCall) Filter(filter string) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Filter(filter string) *ProjectsLocationsEvaluationTasksOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsExampleStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationTasksOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsExampleStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationTasksOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -61351,7 +61550,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExampleStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationTasksOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61361,7 +61560,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExampleStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationTasksOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -61369,21 +61568,21 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExampleStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsListCall { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationTasksOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExampleStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExampleStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61409,7 +61608,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.exampleStores.operations.list" call. +// Do executes the "aiplatform.projects.locations.evaluationTasks.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -61417,7 +61616,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) doRequest(alt string) // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61449,9 +61648,9 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi. return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.exampleStores.operations.list", + // "id": "aiplatform.projects.locations.evaluationTasks.operations.list", // "parameterOrder": [ // "name" // ], @@ -61464,7 +61663,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi. // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+$", // "required": true, // "type": "string" // }, @@ -61494,7 +61693,7 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsExampleStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsEvaluationTasksOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -61512,9 +61711,9 @@ func (c *ProjectsLocationsExampleStoresOperationsListCall) Pages(ctx context.Con } } -// method id "aiplatform.projects.locations.exampleStores.operations.wait": +// method id "aiplatform.projects.locations.evaluationTasks.operations.wait": -type ProjectsLocationsExampleStoresOperationsWaitCall struct { +type ProjectsLocationsEvaluationTasksOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61534,8 +61733,8 @@ type ProjectsLocationsExampleStoresOperationsWaitCall struct { // is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsExampleStoresOperationsService) Wait(name string) *ProjectsLocationsExampleStoresOperationsWaitCall { - c := &ProjectsLocationsExampleStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationTasksOperationsService) Wait(name string) *ProjectsLocationsEvaluationTasksOperationsWaitCall { + c := &ProjectsLocationsEvaluationTasksOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61544,7 +61743,7 @@ func (r *ProjectsLocationsExampleStoresOperationsService) Wait(name string) *Pro // to wait before timing out. If left blank, the wait will be at most // the time permitted by the underlying HTTP/RPC protocol. If RPC // context deadline is also specified, the shorter one will be used. -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExampleStoresOperationsWaitCall { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsEvaluationTasksOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -61552,7 +61751,7 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Timeout(timeout strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsWaitCall { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationTasksOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61560,21 +61759,21 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsWaitCall { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsEvaluationTasksOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61597,14 +61796,14 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.exampleStores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.evaluationTasks.operations.wait" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationTasksOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61636,9 +61835,9 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Do(opts ...googleapi. return ret, nil // { // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:wait", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/evaluationTasks/{evaluationTasksId}/operations/{operationsId}:wait", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.exampleStores.operations.wait", + // "id": "aiplatform.projects.locations.evaluationTasks.operations.wait", // "parameterOrder": [ // "name" // ], @@ -61646,7 +61845,7 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Do(opts ...googleapi. // "name": { // "description": "The name of the operation resource to wait on.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluationTasks/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // }, @@ -61668,9 +61867,9 @@ func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Do(opts ...googleapi. } -// method id "aiplatform.projects.locations.extensionControllers.operations.cancel": +// method id "aiplatform.projects.locations.exampleStores.operations.cancel": -type ProjectsLocationsExtensionControllersOperationsCancelCall struct { +type ProjectsLocationsExampleStoresOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61690,8 +61889,8 @@ type ProjectsLocationsExtensionControllersOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsExtensionControllersOperationsService) Cancel(name string) *ProjectsLocationsExtensionControllersOperationsCancelCall { - c := &ProjectsLocationsExtensionControllersOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExampleStoresOperationsService) Cancel(name string) *ProjectsLocationsExampleStoresOperationsCancelCall { + c := &ProjectsLocationsExampleStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61699,7 +61898,7 @@ func (r *ProjectsLocationsExtensionControllersOperationsService) Cancel(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsCancelCall { +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61707,21 +61906,21 @@ func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsCancelCall { +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61744,14 +61943,14 @@ func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensionControllers.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.exampleStores.operations.cancel" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61783,9 +61982,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Do(opts ...g return ret, nil // { // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}:cancel", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensionControllers.operations.cancel", + // "id": "aiplatform.projects.locations.exampleStores.operations.cancel", // "parameterOrder": [ // "name" // ], @@ -61793,7 +61992,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Do(opts ...g // "name": { // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -61809,9 +62008,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Do(opts ...g } -// method id "aiplatform.projects.locations.extensionControllers.operations.delete": +// method id "aiplatform.projects.locations.exampleStores.operations.delete": -type ProjectsLocationsExtensionControllersOperationsDeleteCall struct { +type ProjectsLocationsExampleStoresOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61825,8 +62024,8 @@ type ProjectsLocationsExtensionControllersOperationsDeleteCall struct { // it returns `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsExtensionControllersOperationsService) Delete(name string) *ProjectsLocationsExtensionControllersOperationsDeleteCall { - c := &ProjectsLocationsExtensionControllersOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExampleStoresOperationsService) Delete(name string) *ProjectsLocationsExampleStoresOperationsDeleteCall { + c := &ProjectsLocationsExampleStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61834,7 +62033,7 @@ func (r *ProjectsLocationsExtensionControllersOperationsService) Delete(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsDeleteCall { +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61842,21 +62041,21 @@ func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsDeleteCall { +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -61879,14 +62078,14 @@ func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensionControllers.operations.delete" call. +// Do executes the "aiplatform.projects.locations.exampleStores.operations.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61918,9 +62117,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Do(opts ...g return ret, nil // { // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.extensionControllers.operations.delete", + // "id": "aiplatform.projects.locations.exampleStores.operations.delete", // "parameterOrder": [ // "name" // ], @@ -61928,7 +62127,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Do(opts ...g // "name": { // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -61944,9 +62143,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Do(opts ...g } -// method id "aiplatform.projects.locations.extensionControllers.operations.get": +// method id "aiplatform.projects.locations.exampleStores.operations.get": -type ProjectsLocationsExtensionControllersOperationsGetCall struct { +type ProjectsLocationsExampleStoresOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -61960,8 +62159,8 @@ type ProjectsLocationsExtensionControllersOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsExtensionControllersOperationsService) Get(name string) *ProjectsLocationsExtensionControllersOperationsGetCall { - c := &ProjectsLocationsExtensionControllersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExampleStoresOperationsService) Get(name string) *ProjectsLocationsExampleStoresOperationsGetCall { + c := &ProjectsLocationsExampleStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -61969,7 +62168,7 @@ func (r *ProjectsLocationsExtensionControllersOperationsService) Get(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsGetCall { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61979,7 +62178,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Fields(s ...goo // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionControllersOperationsGetCall { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -61987,21 +62186,21 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) IfNoneMatch(ent // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsGetCall { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62027,14 +62226,14 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensionControllers.operations.get" call. +// Do executes the "aiplatform.projects.locations.exampleStores.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExampleStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62066,9 +62265,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Do(opts ...goog return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensionControllers.operations.get", + // "id": "aiplatform.projects.locations.exampleStores.operations.get", // "parameterOrder": [ // "name" // ], @@ -62076,7 +62275,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Do(opts ...goog // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -62092,9 +62291,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Do(opts ...goog } -// method id "aiplatform.projects.locations.extensionControllers.operations.list": +// method id "aiplatform.projects.locations.exampleStores.operations.list": -type ProjectsLocationsExtensionControllersOperationsListCall struct { +type ProjectsLocationsExampleStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62108,29 +62307,29 @@ type ProjectsLocationsExtensionControllersOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsExtensionControllersOperationsService) List(name string) *ProjectsLocationsExtensionControllersOperationsListCall { - c := &ProjectsLocationsExtensionControllersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExampleStoresOperationsService) List(name string) *ProjectsLocationsExampleStoresOperationsListCall { + c := &ProjectsLocationsExampleStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Filter(filter string) *ProjectsLocationsExampleStoresOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExampleStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExampleStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -62138,7 +62337,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) PageToken(page // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62148,7 +62347,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -62156,21 +62355,21 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsListCall { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionControllersOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExampleStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62196,7 +62395,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensionControllers.operations.list" call. +// Do executes the "aiplatform.projects.locations.exampleStores.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -62204,7 +62403,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) doRequest(alt // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionControllersOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62236,9 +62435,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) Do(opts ...goo return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensionControllers.operations.list", + // "id": "aiplatform.projects.locations.exampleStores.operations.list", // "parameterOrder": [ // "name" // ], @@ -62251,7 +62450,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) Do(opts ...goo // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+$", // "required": true, // "type": "string" // }, @@ -62281,7 +62480,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) Do(opts ...goo // 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 *ProjectsLocationsExtensionControllersOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsExampleStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -62299,9 +62498,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsListCall) Pages(ctx cont } } -// method id "aiplatform.projects.locations.extensionControllers.operations.wait": +// method id "aiplatform.projects.locations.exampleStores.operations.wait": -type ProjectsLocationsExtensionControllersOperationsWaitCall struct { +type ProjectsLocationsExampleStoresOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62321,8 +62520,8 @@ type ProjectsLocationsExtensionControllersOperationsWaitCall struct { // is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsExtensionControllersOperationsService) Wait(name string) *ProjectsLocationsExtensionControllersOperationsWaitCall { - c := &ProjectsLocationsExtensionControllersOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExampleStoresOperationsService) Wait(name string) *ProjectsLocationsExampleStoresOperationsWaitCall { + c := &ProjectsLocationsExampleStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62331,7 +62530,7 @@ func (r *ProjectsLocationsExtensionControllersOperationsService) Wait(name strin // to wait before timing out. If left blank, the wait will be at most // the time permitted by the underlying HTTP/RPC protocol. If RPC // context deadline is also specified, the shorter one will be used. -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionControllersOperationsWaitCall { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExampleStoresOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -62339,7 +62538,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Timeout(timeou // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsWaitCall { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62347,21 +62546,21 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsWaitCall { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62384,14 +62583,14 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensionControllers.operations.wait" call. +// Do executes the "aiplatform.projects.locations.exampleStores.operations.wait" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62423,9 +62622,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Do(opts ...goo return ret, nil // { // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}:wait", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:wait", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensionControllers.operations.wait", + // "id": "aiplatform.projects.locations.exampleStores.operations.wait", // "parameterOrder": [ // "name" // ], @@ -62433,7 +62632,7 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Do(opts ...goo // "name": { // "description": "The name of the operation resource to wait on.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // }, @@ -62455,9 +62654,9 @@ func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Do(opts ...goo } -// method id "aiplatform.projects.locations.extensions.deployments.operations.cancel": +// method id "aiplatform.projects.locations.extensionControllers.operations.cancel": -type ProjectsLocationsExtensionsDeploymentsOperationsCancelCall struct { +type ProjectsLocationsExtensionControllersOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62477,8 +62676,8 @@ type ProjectsLocationsExtensionsDeploymentsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Cancel(name string) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { - c := &ProjectsLocationsExtensionsDeploymentsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionControllersOperationsService) Cancel(name string) *ProjectsLocationsExtensionControllersOperationsCancelCall { + c := &ProjectsLocationsExtensionControllersOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62486,7 +62685,7 @@ func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Cancel(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { +func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62494,21 +62693,21 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { +func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62531,14 +62730,14 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.extensionControllers.operations.cancel" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExtensionControllersOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62570,9 +62769,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Do(opts ... return ret, nil // { // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}:cancel", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensions.deployments.operations.cancel", + // "id": "aiplatform.projects.locations.extensionControllers.operations.cancel", // "parameterOrder": [ // "name" // ], @@ -62580,7 +62779,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Do(opts ... // "name": { // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -62596,9 +62795,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Do(opts ... } -// method id "aiplatform.projects.locations.extensions.deployments.operations.delete": +// method id "aiplatform.projects.locations.extensionControllers.operations.delete": -type ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall struct { +type ProjectsLocationsExtensionControllersOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62612,8 +62811,8 @@ type ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall struct { // it returns `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Delete(name string) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { - c := &ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionControllersOperationsService) Delete(name string) *ProjectsLocationsExtensionControllersOperationsDeleteCall { + c := &ProjectsLocationsExtensionControllersOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62621,7 +62820,7 @@ func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { +func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62629,21 +62828,21 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { +func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62666,14 +62865,14 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.delete" call. +// Do executes the "aiplatform.projects.locations.extensionControllers.operations.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExtensionControllersOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62705,9 +62904,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Do(opts ... return ret, nil // { // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}", // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.extensions.deployments.operations.delete", + // "id": "aiplatform.projects.locations.extensionControllers.operations.delete", // "parameterOrder": [ // "name" // ], @@ -62715,7 +62914,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Do(opts ... // "name": { // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -62731,9 +62930,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Do(opts ... } -// method id "aiplatform.projects.locations.extensions.deployments.operations.get": +// method id "aiplatform.projects.locations.extensionControllers.operations.get": -type ProjectsLocationsExtensionsDeploymentsOperationsGetCall struct { +type ProjectsLocationsExtensionControllersOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62747,8 +62946,8 @@ type ProjectsLocationsExtensionsDeploymentsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Get(name string) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { - c := &ProjectsLocationsExtensionsDeploymentsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionControllersOperationsService) Get(name string) *ProjectsLocationsExtensionControllersOperationsGetCall { + c := &ProjectsLocationsExtensionControllersOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62756,7 +62955,7 @@ func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62766,7 +62965,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionControllersOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -62774,21 +62973,21 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62814,14 +63013,14 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.get" call. +// Do executes the "aiplatform.projects.locations.extensionControllers.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExtensionControllersOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62853,9 +63052,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Do(opts ...goo return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensions.deployments.operations.get", + // "id": "aiplatform.projects.locations.extensionControllers.operations.get", // "parameterOrder": [ // "name" // ], @@ -62863,7 +63062,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Do(opts ...goo // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -62879,9 +63078,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Do(opts ...goo } -// method id "aiplatform.projects.locations.extensions.deployments.operations.list": +// method id "aiplatform.projects.locations.extensionControllers.operations.list": -type ProjectsLocationsExtensionsDeploymentsOperationsListCall struct { +type ProjectsLocationsExtensionControllersOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62895,29 +63094,29 @@ type ProjectsLocationsExtensionsDeploymentsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) List(name string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { - c := &ProjectsLocationsExtensionsDeploymentsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionControllersOperationsService) List(name string) *ProjectsLocationsExtensionControllersOperationsListCall { + c := &ProjectsLocationsExtensionControllersOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionControllersOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionControllersOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionControllersOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -62925,7 +63124,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62935,7 +63134,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionControllersOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -62943,21 +63142,21 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62983,7 +63182,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.list" call. +// Do executes the "aiplatform.projects.locations.extensionControllers.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -62991,7 +63190,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) doRequest(alt // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63023,9 +63222,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Do(opts ...go return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensions.deployments.operations.list", + // "id": "aiplatform.projects.locations.extensionControllers.operations.list", // "parameterOrder": [ // "name" // ], @@ -63038,7 +63237,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Do(opts ...go // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+$", // "required": true, // "type": "string" // }, @@ -63068,7 +63267,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Do(opts ...go // 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 *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsExtensionControllersOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -63086,9 +63285,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Pages(ctx con } } -// method id "aiplatform.projects.locations.extensions.deployments.operations.wait": +// method id "aiplatform.projects.locations.extensionControllers.operations.wait": -type ProjectsLocationsExtensionsDeploymentsOperationsWaitCall struct { +type ProjectsLocationsExtensionControllersOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63108,8 +63307,8 @@ type ProjectsLocationsExtensionsDeploymentsOperationsWaitCall struct { // is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Wait(name string) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { - c := &ProjectsLocationsExtensionsDeploymentsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionControllersOperationsService) Wait(name string) *ProjectsLocationsExtensionControllersOperationsWaitCall { + c := &ProjectsLocationsExtensionControllersOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63118,7 +63317,7 @@ func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Wait(name stri // to wait before timing out. If left blank, the wait will be at most // the time permitted by the underlying HTTP/RPC protocol. If RPC // context deadline is also specified, the shorter one will be used. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionControllersOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -63126,7 +63325,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Timeout(timeo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionControllersOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63134,21 +63333,21 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Fields(s ...g // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionControllersOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63171,14 +63370,14 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.wait" call. +// Do executes the "aiplatform.projects.locations.extensionControllers.operations.wait" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExtensionControllersOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63210,9 +63409,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Do(opts ...go return ret, nil // { // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}:wait", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensionControllers/{extensionControllersId}/operations/{operationsId}:wait", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensions.deployments.operations.wait", + // "id": "aiplatform.projects.locations.extensionControllers.operations.wait", // "parameterOrder": [ // "name" // ], @@ -63220,7 +63419,7 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Do(opts ...go // "name": { // "description": "The name of the operation resource to wait on.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensionControllers/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // }, @@ -63242,9 +63441,9 @@ func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Do(opts ...go } -// method id "aiplatform.projects.locations.extensions.operations.cancel": +// method id "aiplatform.projects.locations.extensions.deployments.operations.cancel": -type ProjectsLocationsExtensionsOperationsCancelCall struct { +type ProjectsLocationsExtensionsDeploymentsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63264,8 +63463,8 @@ type ProjectsLocationsExtensionsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsExtensionsOperationsService) Cancel(name string) *ProjectsLocationsExtensionsOperationsCancelCall { - c := &ProjectsLocationsExtensionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Cancel(name string) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { + c := &ProjectsLocationsExtensionsDeploymentsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63273,7 +63472,7 @@ func (r *ProjectsLocationsExtensionsOperationsService) Cancel(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsCancelCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63281,21 +63480,21 @@ func (c *ProjectsLocationsExtensionsOperationsCancelCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsCancelCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63318,14 +63517,14 @@ func (c *ProjectsLocationsExtensionsOperationsCancelCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.cancel" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63357,9 +63556,9 @@ func (c *ProjectsLocationsExtensionsOperationsCancelCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}:cancel", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensions.operations.cancel", + // "id": "aiplatform.projects.locations.extensions.deployments.operations.cancel", // "parameterOrder": [ // "name" // ], @@ -63367,7 +63566,7 @@ func (c *ProjectsLocationsExtensionsOperationsCancelCall) Do(opts ...googleapi.C // "name": { // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -63383,9 +63582,9 @@ func (c *ProjectsLocationsExtensionsOperationsCancelCall) Do(opts ...googleapi.C } -// method id "aiplatform.projects.locations.extensions.operations.delete": +// method id "aiplatform.projects.locations.extensions.deployments.operations.delete": -type ProjectsLocationsExtensionsOperationsDeleteCall struct { +type ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63399,8 +63598,8 @@ type ProjectsLocationsExtensionsOperationsDeleteCall struct { // it returns `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsExtensionsOperationsService) Delete(name string) *ProjectsLocationsExtensionsOperationsDeleteCall { - c := &ProjectsLocationsExtensionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Delete(name string) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { + c := &ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63408,7 +63607,7 @@ func (r *ProjectsLocationsExtensionsOperationsService) Delete(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsDeleteCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63416,21 +63615,21 @@ func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsDeleteCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63453,14 +63652,14 @@ func (c *ProjectsLocationsExtensionsOperationsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.operations.delete" call. +// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63492,9 +63691,9 @@ func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}", // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.extensions.operations.delete", + // "id": "aiplatform.projects.locations.extensions.deployments.operations.delete", // "parameterOrder": [ // "name" // ], @@ -63502,7 +63701,7 @@ func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Do(opts ...googleapi.C // "name": { // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -63518,9 +63717,9 @@ func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Do(opts ...googleapi.C } -// method id "aiplatform.projects.locations.extensions.operations.get": +// method id "aiplatform.projects.locations.extensions.deployments.operations.get": -type ProjectsLocationsExtensionsOperationsGetCall struct { +type ProjectsLocationsExtensionsDeploymentsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63534,8 +63733,8 @@ type ProjectsLocationsExtensionsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsExtensionsOperationsService) Get(name string) *ProjectsLocationsExtensionsOperationsGetCall { - c := &ProjectsLocationsExtensionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Get(name string) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { + c := &ProjectsLocationsExtensionsDeploymentsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63543,7 +63742,7 @@ func (r *ProjectsLocationsExtensionsOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsGetCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63553,7 +63752,7 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsOperationsGetCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -63561,21 +63760,21 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsGetCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63601,14 +63800,14 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.operations.get" call. +// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63640,9 +63839,9 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) Do(opts ...googleapi.Call return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensions.operations.get", + // "id": "aiplatform.projects.locations.extensions.deployments.operations.get", // "parameterOrder": [ // "name" // ], @@ -63650,7 +63849,7 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) Do(opts ...googleapi.Call // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -63666,9 +63865,9 @@ func (c *ProjectsLocationsExtensionsOperationsGetCall) Do(opts ...googleapi.Call } -// method id "aiplatform.projects.locations.extensions.operations.list": +// method id "aiplatform.projects.locations.extensions.deployments.operations.list": -type ProjectsLocationsExtensionsOperationsListCall struct { +type ProjectsLocationsExtensionsDeploymentsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63682,29 +63881,29 @@ type ProjectsLocationsExtensionsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsExtensionsOperationsService) List(name string) *ProjectsLocationsExtensionsOperationsListCall { - c := &ProjectsLocationsExtensionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) List(name string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { + c := &ProjectsLocationsExtensionsDeploymentsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsExtensionsOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsExtensionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsExtensionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -63712,7 +63911,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) PageToken(pageToken stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63722,7 +63921,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsExtensionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -63730,21 +63929,21 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsListCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63770,7 +63969,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.operations.list" call. +// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -63778,7 +63977,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) doRequest(alt string) (* // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63810,9 +64009,9 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) Do(opts ...googleapi.Cal return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations", // "httpMethod": "GET", - // "id": "aiplatform.projects.locations.extensions.operations.list", + // "id": "aiplatform.projects.locations.extensions.deployments.operations.list", // "parameterOrder": [ // "name" // ], @@ -63825,7 +64024,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) Do(opts ...googleapi.Cal // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+$", // "required": true, // "type": "string" // }, @@ -63855,7 +64054,7 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) Do(opts ...googleapi.Cal // 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 *ProjectsLocationsExtensionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -63873,9 +64072,9 @@ func (c *ProjectsLocationsExtensionsOperationsListCall) Pages(ctx context.Contex } } -// method id "aiplatform.projects.locations.extensions.operations.wait": +// method id "aiplatform.projects.locations.extensions.deployments.operations.wait": -type ProjectsLocationsExtensionsOperationsWaitCall struct { +type ProjectsLocationsExtensionsDeploymentsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63895,8 +64094,8 @@ type ProjectsLocationsExtensionsOperationsWaitCall struct { // is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsExtensionsOperationsService) Wait(name string) *ProjectsLocationsExtensionsOperationsWaitCall { - c := &ProjectsLocationsExtensionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsExtensionsDeploymentsOperationsService) Wait(name string) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { + c := &ProjectsLocationsExtensionsDeploymentsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63905,7 +64104,7 @@ func (r *ProjectsLocationsExtensionsOperationsService) Wait(name string) *Projec // to wait before timing out. If left blank, the wait will be at most // the time permitted by the underlying HTTP/RPC protocol. If RPC // context deadline is also specified, the shorter one will be used. -func (c *ProjectsLocationsExtensionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionsOperationsWaitCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -63913,7 +64112,7 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) Timeout(timeout string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsExtensionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsWaitCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63921,21 +64120,21 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsExtensionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsWaitCall { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsExtensionsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsExtensionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63958,14 +64157,14 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.extensions.operations.wait" call. +// Do executes the "aiplatform.projects.locations.extensions.deployments.operations.wait" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsExtensionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExtensionsDeploymentsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63997,9 +64196,9 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) Do(opts ...googleapi.Cal return ret, nil // { // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}:wait", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/deployments/{deploymentsId}/operations/{operationsId}:wait", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.extensions.operations.wait", + // "id": "aiplatform.projects.locations.extensions.deployments.operations.wait", // "parameterOrder": [ // "name" // ], @@ -64007,7 +64206,7 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) Do(opts ...googleapi.Cal // "name": { // "description": "The name of the operation resource to wait on.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/deployments/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // }, @@ -64029,43 +64228,38 @@ func (c *ProjectsLocationsExtensionsOperationsWaitCall) Do(opts ...googleapi.Cal } -// method id "aiplatform.projects.locations.featureGroups.create": +// method id "aiplatform.projects.locations.extensions.operations.cancel": -type ProjectsLocationsFeatureGroupsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1featuregroup *GoogleCloudAiplatformV1beta1FeatureGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsExtensionsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new FeatureGroup in a given project and location. +// 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`. // -// - parent: The resource name of the Location to create FeatureGroups. -// Format: `projects/{project}/locations/{location}'`. -func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1beta1featuregroup *GoogleCloudAiplatformV1beta1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { - c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1featuregroup = googlecloudaiplatformv1beta1featuregroup - return c -} - -// FeatureGroupId sets the optional parameter "featureGroupId": -// Required. The ID to use for this FeatureGroup, which will become the -// final component of the FeatureGroup's resource name. This value may -// be up to 60 characters, and valid characters are `[a-z0-9_]`. The -// first character cannot be a number. The value must be unique within -// the project and location. -func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { - c.urlParams_.Set("featureGroupId", featureGroupId) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsExtensionsOperationsService) Cancel(name string) *ProjectsLocationsExtensionsOperationsCancelCall { + c := &ProjectsLocationsExtensionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsExtensionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64073,21 +64267,21 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsExtensionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -64095,14 +64289,9 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1featuregroup) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/featureGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64110,19 +64299,19 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "aiplatform.projects.locations.extensions.operations.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsExtensionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64141,7 +64330,7 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64153,33 +64342,25 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Creates a new FeatureGroup in a given project and location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/featureGroups", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.featureGroups.create", + // "id": "aiplatform.projects.locations.extensions.operations.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "featureGroupId": { - // "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the Location to create FeatureGroups. Format: `projects/{project}/locations/{location}'`", + // "name": { + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/featureGroups", - // "request": { - // "$ref": "GoogleCloudAiplatformV1beta1FeatureGroup" - // }, + // "path": "v1beta1/{+name}:cancel", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -64188,9 +64369,9 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOpti } -// method id "aiplatform.projects.locations.featureGroups.delete": +// method id "aiplatform.projects.locations.extensions.operations.delete": -type ProjectsLocationsFeatureGroupsDeleteCall struct { +type ProjectsLocationsExtensionsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -64198,29 +64379,22 @@ type ProjectsLocationsFeatureGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single FeatureGroup. +// 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 FeatureGroup to be deleted. Format: -// `projects/{project}/locations/{location}/featureGroups/{feature_grou -// p}`. -func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { - c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsExtensionsOperationsService) Delete(name string) *ProjectsLocationsExtensionsOperationsDeleteCall { + c := &ProjectsLocationsExtensionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any -// Features under this FeatureGroup will also be deleted. (Otherwise, -// the request will only work if the FeatureGroup has no Features.) -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64228,21 +64402,833 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsExtensionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.extensions.operations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsExtensionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "aiplatform.projects.locations.extensions.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.extensions.operations.get": + +type ProjectsLocationsExtensionsOperationsGetCall 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 *ProjectsLocationsExtensionsOperationsService) Get(name string) *ProjectsLocationsExtensionsOperationsGetCall { + c := &ProjectsLocationsExtensionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsExtensionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsExtensionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsExtensionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsExtensionsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExtensionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.extensions.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsExtensionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.extensions.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.extensions.operations.list": + +type ProjectsLocationsExtensionsOperationsListCall 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 *ProjectsLocationsExtensionsOperationsService) List(name string) *ProjectsLocationsExtensionsOperationsListCall { + c := &ProjectsLocationsExtensionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsExtensionsOperationsListCall) Filter(filter string) *ProjectsLocationsExtensionsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsExtensionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExtensionsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsExtensionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExtensionsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsExtensionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsExtensionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExtensionsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsExtensionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsExtensionsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExtensionsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.extensions.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsExtensionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.extensions.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/[^/]+/extensions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsExtensionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "aiplatform.projects.locations.extensions.operations.wait": + +type ProjectsLocationsExtensionsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsExtensionsOperationsService) Wait(name string) *ProjectsLocationsExtensionsOperationsWaitCall { + c := &ProjectsLocationsExtensionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration +// to wait before timing out. If left blank, the wait will be at most +// the time permitted by the underlying HTTP/RPC protocol. If RPC +// context deadline is also specified, the shorter one will be used. +func (c *ProjectsLocationsExtensionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExtensionsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsExtensionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExtensionsOperationsWaitCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsExtensionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExtensionsOperationsWaitCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsExtensionsOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExtensionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:wait") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.extensions.operations.wait" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsExtensionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/extensions/{extensionsId}/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.extensions.operations.wait", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to wait on.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/extensions/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "timeout": { + // "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:wait", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.featureGroups.create": + +type ProjectsLocationsFeatureGroupsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1featuregroup *GoogleCloudAiplatformV1beta1FeatureGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new FeatureGroup in a given project and location. +// +// - parent: The resource name of the Location to create FeatureGroups. +// Format: `projects/{project}/locations/{location}'`. +func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1beta1featuregroup *GoogleCloudAiplatformV1beta1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { + c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1featuregroup = googlecloudaiplatformv1beta1featuregroup + return c +} + +// FeatureGroupId sets the optional parameter "featureGroupId": +// Required. The ID to use for this FeatureGroup, which will become the +// final component of the FeatureGroup's resource name. This value may +// be up to 60 characters, and valid characters are `[a-z0-9_]`. The +// first character cannot be a number. The value must be unique within +// the project and location. +func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { + c.urlParams_.Set("featureGroupId", featureGroupId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1featuregroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/featureGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureGroups.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new FeatureGroup in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/featureGroups", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.featureGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "featureGroupId": { + // "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the Location to create FeatureGroups. Format: `projects/{project}/locations/{location}'`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/featureGroups", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1FeatureGroup" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.featureGroups.delete": + +type ProjectsLocationsFeatureGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single FeatureGroup. +// +// - name: The name of the FeatureGroup to be deleted. Format: +// `projects/{project}/locations/{location}/featureGroups/{feature_grou +// p}`. +func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { + c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any +// Features under this FeatureGroup will also be deleted. (Otherwise, +// the request will only work if the FeatureGroup has no Features.) +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68806,7 +69792,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name str // overwritten if it is in the mask. If the user does not provide a mask // then only the non-empty fields present in the request will be // overwritten. Set the update_mask to `*` to override all fields. -// Updatable fields: * `labels` +// Updatable fields: * `labels` * `serviceAgentType` func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -68919,7 +69905,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g // "type": "string" // }, // "updateMask": { - // "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels`", + // "description": "Field mask is used to specify the fields to be overwritten in the FeatureView 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 only the non-empty fields present in the request will be overwritten. Set the update_mask to `*` to override all fields. Updatable fields: * `labels` * `serviceAgentType`", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index d6b3e362486..7084ad21aca 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1163,7 +1163,7 @@ } } }, - "revision": "20240207", + "revision": "20240213", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1229,6 +1229,22 @@ ], "type": "string" }, + "mtePolicy": { + "description": "Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.", + "enum": [ + "MTE_POLICY_UNSPECIFIED", + "MTE_USER_CHOICE", + "MTE_ENFORCED", + "MTE_DISABLED" + ], + "enumDescriptions": [ + "Unspecified. Defaults to MTE_USER_CHOICE.", + "The user can choose to enable or disable MTE on the device if the device supports this.", + "MTE is enabled on the device and the user is not allowed to change this setting. This can be set on fully managed devices and work profiles on company-owned devices. A nonComplianceDetail with MANAGEMENT_MODE is reported for other management modes. A nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does not support MTE.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14.", + "MTE is disabled on the device and the user is not allowed to change this setting. This applies only on fully managed devices. In other cases, a nonComplianceDetail with MANAGEMENT_MODE is reported. A nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does not support MTE.Supported on Android 14 and above. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 14." + ], + "type": "string" + }, "personalAppsThatCanReadWorkNotifications": { "description": "Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.", "items": { @@ -4196,7 +4212,8 @@ "ONC_WIFI_INVALID_VALUE", "ONC_WIFI_API_LEVEL", "ONC_WIFI_INVALID_ENTERPRISE_CONFIG", - "ONC_WIFI_USER_SHOULD_REMOVE_NETWORK" + "ONC_WIFI_USER_SHOULD_REMOVE_NETWORK", + "ONC_WIFI_KEY_PAIR_ALIAS_NOT_CORRESPONDING_TO_EXISTING_KEY" ], "enumDescriptions": [ "Specific non-compliance reason is not specified. Fields in specific_non_compliance_context are not set.", @@ -4206,7 +4223,8 @@ "There is an incorrect value in ONC Wi-Fi configuration. fieldPath specifies which field value is incorrect. oncWifiContext is set. nonComplianceReason is set to INVALID_VALUE.", "The ONC Wi-Fi setting is not supported in the API level of the Android version running on the device. fieldPath specifies which field value is not supported. oncWifiContext is set. nonComplianceReason is set to API_LEVEL.", "The enterprise Wi-Fi network is missing either the root CA or domain name. nonComplianceReason is set to INVALID_VALUE.", - "User needs to remove the configured Wi-Fi network manually. This is applicable only on work profiles on personally-owned devices. nonComplianceReason is set to USER_ACTION." + "User needs to remove the configured Wi-Fi network manually. This is applicable only on work profiles on personally-owned devices. nonComplianceReason is set to USER_ACTION.", + "Key pair alias specified via ClientCertKeyPairAlias (https://chromium.googlesource.com/chromium/src/+/main/components/onc/docs/onc_spec.md#eap-type) field in openNetworkConfiguration does not correspond to an existing key installed on the device. nonComplianceReason is set to INVALID_VALUE." ], "type": "string" } diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 948d82af070..bcf294a7573 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -366,6 +366,33 @@ type AdvancedSecurityOverrides struct { // enable app verification. GooglePlayProtectVerifyApps string `json:"googlePlayProtectVerifyApps,omitempty"` + // MtePolicy: Optional. Controls Memory Tagging Extension (MTE) + // (https://source.android.com/docs/security/test/memory-safety/arm-mte) + // on the device. The device needs to be rebooted to apply changes to + // the MTE policy. + // + // Possible values: + // "MTE_POLICY_UNSPECIFIED" - Unspecified. Defaults to + // MTE_USER_CHOICE. + // "MTE_USER_CHOICE" - The user can choose to enable or disable MTE on + // the device if the device supports this. + // "MTE_ENFORCED" - MTE is enabled on the device and the user is not + // allowed to change this setting. This can be set on fully managed + // devices and work profiles on company-owned devices. A + // nonComplianceDetail with MANAGEMENT_MODE is reported for other + // management modes. A nonComplianceDetail with DEVICE_INCOMPATIBLE is + // reported if the device does not support MTE.Supported on Android 14 + // and above. A nonComplianceDetail with API_LEVEL is reported if the + // Android version is less than 14. + // "MTE_DISABLED" - MTE is disabled on the device and the user is not + // allowed to change this setting. This applies only on fully managed + // devices. In other cases, a nonComplianceDetail with MANAGEMENT_MODE + // is reported. A nonComplianceDetail with DEVICE_INCOMPATIBLE is + // reported if the device does not support MTE.Supported on Android 14 + // and above. A nonComplianceDetail with API_LEVEL is reported if the + // Android version is less than 14. + MtePolicy string `json:"mtePolicy,omitempty"` + // PersonalAppsThatCanReadWorkNotifications: Personal apps that can read // work profile notifications using a NotificationListenerService // (https://developer.android.com/reference/android/service/notification/NotificationListenerService). @@ -4808,6 +4835,12 @@ type NonComplianceDetail struct { // configured Wi-Fi network manually. This is applicable only on work // profiles on personally-owned devices. nonComplianceReason is set to // USER_ACTION. + // "ONC_WIFI_KEY_PAIR_ALIAS_NOT_CORRESPONDING_TO_EXISTING_KEY" - Key + // pair alias specified via ClientCertKeyPairAlias + // (https://chromium.googlesource.com/chromium/src/+/main/components/onc/docs/onc_spec.md#eap-type) + // field in openNetworkConfiguration does not correspond to an existing + // key installed on the device. nonComplianceReason is set to + // INVALID_VALUE. SpecificNonComplianceReason string `json:"specificNonComplianceReason,omitempty"` // ForceSendFields is a list of field names (e.g. "CurrentValue") to diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index af0a26db8a3..504b602fd5c 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -2793,7 +2793,8 @@ "subscriptions": { "methods": { "archive": { - "description": "Archives a subscription. Can only be done if at least one base plan was active in the past, and no base plan is available for new or existing subscribers currently. This action is irreversible, and the subscription ID will remain reserved.", + "deprecated": true, + "description": "Deprecated: subscription archiving is not supported.", "flatPath": "androidpublisher/v3/applications/{packageName}/subscriptions/{productId}:archive", "httpMethod": "POST", "id": "androidpublisher.monetization.subscriptions.archive", @@ -3006,7 +3007,8 @@ "type": "string" }, "showArchived": { - "description": "Whether archived subscriptions should be included in the response. Defaults to false.", + "deprecated": true, + "description": "Deprecated: subscription archiving is not supported.", "location": "query", "type": "boolean" } @@ -4724,7 +4726,7 @@ } } }, - "revision": "20240207", + "revision": "20240219", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -5181,7 +5183,8 @@ "type": "object" }, "ArchiveSubscriptionRequest": { - "description": "Request message for ArchiveSubscription.", + "deprecated": true, + "description": "Deprecated: subscription archiving is not supported.", "id": "ArchiveSubscriptionRequest", "properties": {}, "type": "object" @@ -7859,7 +7862,7 @@ "id": "RegionalTaxRateInfo", "properties": { "eligibleForStreamingServiceTaxRate": { - "description": "You must tell us if your app contains streaming products to correctly charge US state and local sales tax. Field only supported in United States.", + "description": "You must tell us if your app contains streaming products to correctly charge US state and local sales tax. Field only supported in the United States.", "type": "boolean" }, "streamingTaxType": { @@ -8105,7 +8108,7 @@ "id": "SafetyLabelsUpdateRequest", "properties": { "safetyLabels": { - "description": "Required. Contents of the CSV file containing Data Safety responses. For the format of this file, see the Help Center documentation at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cunderstand-the-csv-format To download an up to date template, follow the steps at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cexport-to-a-csv-file", + "description": "Required. Contents of the CSV file containing Data Safety responses. For the format of this file, see the Help Center documentation at https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cunderstand-the-csv-format To download an up to date template, follow the steps at https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cexport-to-a-csv-file", "type": "string" } }, @@ -8293,7 +8296,8 @@ "id": "Subscription", "properties": { "archived": { - "description": "Output only. Whether this subscription is archived. Archived subscriptions are not available to any subscriber any longer, cannot be updated, and are not returned in list requests unless the show archived flag is passed in.", + "deprecated": true, + "description": "Output only. Deprecated: subscription archiving is not supported.", "readOnly": true, "type": "boolean" }, diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 745e2e6caa6..fd010caaf92 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -1361,7 +1361,8 @@ func (s *AppVersionRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ArchiveSubscriptionRequest: Request message for ArchiveSubscription. +// ArchiveSubscriptionRequest: Deprecated: subscription archiving is not +// supported. type ArchiveSubscriptionRequest struct { } @@ -6110,7 +6111,7 @@ func (s *RegionalSubscriptionOfferPhaseConfig) UnmarshalJSON(data []byte) error type RegionalTaxRateInfo struct { // EligibleForStreamingServiceTaxRate: You must tell us if your app // contains streaming products to correctly charge US state and local - // sales tax. Field only supported in United States. + // sales tax. Field only supported in the United States. EligibleForStreamingServiceTaxRate bool `json:"eligibleForStreamingServiceTaxRate,omitempty"` // StreamingTaxType: To collect communications or amusement taxes in the @@ -6609,9 +6610,9 @@ type SafetyLabelsUpdateRequest struct { // SafetyLabels: Required. Contents of the CSV file containing Data // Safety responses. For the format of this file, see the Help Center // documentation at - // https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cunderstand-the-csv-format + // https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cunderstand-the-csv-format // To download an up to date template, follow the steps at - // https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cexport-to-a-csv-file + // https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cexport-to-a-csv-file SafetyLabels string `json:"safetyLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "SafetyLabels") to @@ -6926,10 +6927,8 @@ func (s *SubscribeWithGoogleInfo) MarshalJSON() ([]byte, error) { // Subscription: A single subscription for an app. type Subscription struct { - // Archived: Output only. Whether this subscription is archived. - // Archived subscriptions are not available to any subscriber any - // longer, cannot be updated, and are not returned in list requests - // unless the show archived flag is passed in. + // Archived: Output only. Deprecated: subscription archiving is not + // supported. Archived bool `json:"archived,omitempty"` // BasePlans: The set of base plans for this subscription. Represents @@ -20456,10 +20455,7 @@ type MonetizationSubscriptionsArchiveCall struct { header_ http.Header } -// Archive: Archives a subscription. Can only be done if at least one -// base plan was active in the past, and no base plan is available for -// new or existing subscribers currently. This action is irreversible, -// and the subscription ID will remain reserved. +// Archive: Deprecated: subscription archiving is not supported. // // - packageName: The parent app (package name) of the app of the // subscription to delete. @@ -20564,7 +20560,8 @@ func (c *MonetizationSubscriptionsArchiveCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Archives a subscription. Can only be done if at least one base plan was active in the past, and no base plan is available for new or existing subscribers currently. This action is irreversible, and the subscription ID will remain reserved.", + // "deprecated": true, + // "description": "Deprecated: subscription archiving is not supported.", // "flatPath": "androidpublisher/v3/applications/{packageName}/subscriptions/{productId}:archive", // "httpMethod": "POST", // "id": "androidpublisher.monetization.subscriptions.archive", @@ -21399,9 +21396,8 @@ func (c *MonetizationSubscriptionsListCall) PageToken(pageToken string) *Monetiz return c } -// ShowArchived sets the optional parameter "showArchived": Whether -// archived subscriptions should be included in the response. Defaults -// to false. +// ShowArchived sets the optional parameter "showArchived": Deprecated: +// subscription archiving is not supported. func (c *MonetizationSubscriptionsListCall) ShowArchived(showArchived bool) *MonetizationSubscriptionsListCall { c.urlParams_.Set("showArchived", fmt.Sprint(showArchived)) return c @@ -21532,7 +21528,8 @@ func (c *MonetizationSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "showArchived": { - // "description": "Whether archived subscriptions should be included in the response. Defaults to false.", + // "deprecated": true, + // "description": "Deprecated: subscription archiving is not supported.", // "location": "query", // "type": "boolean" // } diff --git a/api-list.json b/api-list.json index 2a470353619..16e8c62d930 100644 --- a/api-list.json +++ b/api-list.json @@ -53,7 +53,7 @@ "name": "accesscontextmanager", "version": "v1", "title": "Access Context Manager API", - "description": "An API for setting attribute based access control to requests to Google Cloud services.", + "description": "An API for setting attribute based access control to requests to Google Cloud services. *Warning:* Do not mix *v1alpha* and *v1* API usage in the same access policy. The v1alpha API supports new Access Context Manager features, which may have different attributes or behaviors that are not supported by v1. The practice of mixed API usage within a policy may result in the inability to update that policy, including any access levels or service perimeters belonging to it. It is not recommended to use both v1 and v1alpha for modifying policies with critical service perimeters. Modifications using v1alpha should be limited to policies with non-production/non-critical service perimeters.", "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -2494,21 +2494,6 @@ "documentationLink": "https://cloud.google.com/discovery-engine/docs", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "displayvideo:v1", - "name": "displayvideo", - "version": "v1", - "title": "Display & Video 360 API", - "description": "Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.", - "discoveryRestUrl": "https://displayvideo.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/display-video/", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "displayvideo:v2", @@ -2537,21 +2522,6 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://developers.google.com/display-video/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "displayvideo:v4", - "name": "displayvideo", - "version": "v4", - "title": "Display & Video 360 API", - "description": "Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.", - "discoveryRestUrl": "https://displayvideo.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/display-video/", "preferred": true }, { diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index ac09cce6277..2665035c618 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -9814,7 +9814,7 @@ } } }, - "revision": "20240122", + "revision": "20240220", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -16086,9 +16086,30 @@ "type": "object" }, "GoogleCloudApigeeV1SecurityActionConditionConfig": { - "description": "The following are a list of conditions. A valid SecurityAction must contain at least one condition. Within a condition, each element is ORed. Across conditions elements are ANDed. For example if a SecurityAction has the following: api_keys: [\"key1\", \"key2\"] and developers: [\"dev1\", \"dev2\"] then this is interpreted as: enforce the action if the incoming request has ((api_key = \"key1\" OR api_key=\"key\") AND (developer=\"dev1\" OR developer=\"dev2\")).", + "description": "The following are a list of conditions. A valid SecurityAction must contain at least one condition. Within a condition, each element is ORed. Across conditions elements are ANDed. For example if a SecurityAction has the following: ip_address_ranges: [\"ip1\", \"ip2\"] and bot_reasons: [\"Flooder\", \"Robot Abuser\"] then this is interpreted as: enforce the action if the incoming request has ((ip_address_ranges = \"ip1\" OR ip_address_ranges = \"ip2\") AND (bot_reasons=\"Flooder\" OR bot_reasons=\"Robot Abuser\")). Conditions other than ip_address_ranges and bot_reasons cannot be ANDed.", "id": "GoogleCloudApigeeV1SecurityActionConditionConfig", "properties": { + "accessTokens": { + "description": "Optional. A list of access_tokens. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "apiKeys": { + "description": "Optional. A list of API keys. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "apiProducts": { + "description": "Optional. A list of API Products. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, "botReasons": { "description": "Optional. A list of Bot Reasons. Current options: Flooder, Brute Guessor, Static Content Scraper, OAuth Abuser, Robot Abuser, TorListRule, Advanced Anomaly Detection, Advanced API Scraper, Search Engine Crawlers, Public Clouds, Public Cloud AWS, Public Cloud Azure, and Public Cloud Google.", "items": { @@ -16096,12 +16117,33 @@ }, "type": "array" }, + "developerApps": { + "description": "Optional. A list of developer apps. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "developers": { + "description": "Optional. A list of developers. Limit 1000 per action.", + "items": { + "type": "string" + }, + "type": "array" + }, "ipAddressRanges": { "description": "Optional. A list of IP addresses. This could be either IPv4 or IPv6. Limited to 100 per action.", "items": { "type": "string" }, "type": "array" + }, + "userAgents": { + "description": "Optional. A list of user agents to deny. We look for exact matches. Limit 50 per action.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index d474bded7cc..c4da7812c95 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -10938,11 +10938,23 @@ type GoogleCloudApigeeV1SecurityActionAllow struct { // list of conditions. A valid SecurityAction must contain at least one // condition. Within a condition, each element is ORed. Across // conditions elements are ANDed. For example if a SecurityAction has -// the following: api_keys: ["key1", "key2"] and developers: ["dev1", -// "dev2"] then this is interpreted as: enforce the action if the -// incoming request has ((api_key = "key1" OR api_key="key") AND -// (developer="dev1" OR developer="dev2")). +// the following: ip_address_ranges: ["ip1", "ip2"] and bot_reasons: +// ["Flooder", "Robot Abuser"] then this is interpreted as: enforce the +// action if the incoming request has ((ip_address_ranges = "ip1" OR +// ip_address_ranges = "ip2") AND (bot_reasons="Flooder" OR +// bot_reasons="Robot Abuser")). Conditions other than ip_address_ranges +// and bot_reasons cannot be ANDed. type GoogleCloudApigeeV1SecurityActionConditionConfig struct { + // AccessTokens: Optional. A list of access_tokens. Limit 1000 per + // action. + AccessTokens []string `json:"accessTokens,omitempty"` + + // ApiKeys: Optional. A list of API keys. Limit 1000 per action. + ApiKeys []string `json:"apiKeys,omitempty"` + + // ApiProducts: Optional. A list of API Products. Limit 1000 per action. + ApiProducts []string `json:"apiProducts,omitempty"` + // BotReasons: Optional. A list of Bot Reasons. Current options: // Flooder, Brute Guessor, Static Content Scraper, OAuth Abuser, Robot // Abuser, TorListRule, Advanced Anomaly Detection, Advanced API @@ -10950,11 +10962,22 @@ type GoogleCloudApigeeV1SecurityActionConditionConfig struct { // Public Cloud Azure, and Public Cloud Google. BotReasons []string `json:"botReasons,omitempty"` + // DeveloperApps: Optional. A list of developer apps. Limit 1000 per + // action. + DeveloperApps []string `json:"developerApps,omitempty"` + + // Developers: Optional. A list of developers. Limit 1000 per action. + Developers []string `json:"developers,omitempty"` + // IpAddressRanges: Optional. A list of IP addresses. This could be // either IPv4 or IPv6. Limited to 100 per action. IpAddressRanges []string `json:"ipAddressRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "BotReasons") to + // UserAgents: Optional. A list of user agents to deny. We look for + // exact matches. Limit 50 per action. + UserAgents []string `json:"userAgents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessTokens") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10962,10 +10985,10 @@ type GoogleCloudApigeeV1SecurityActionConditionConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BotReasons") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AccessTokens") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json index 576292525f2..b9122b22c24 100644 --- a/appengine/v1/appengine-api.json +++ b/appengine/v1/appengine-api.json @@ -1651,7 +1651,7 @@ } } }, - "revision": "20231107", + "revision": "20240212", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3570,6 +3570,13 @@ ], "type": "string" }, + "supportedOperatingSystems": { + "description": "Supported operating systems for the runtime, e.g., 'ubuntu22', etc.", + "items": { + "type": "string" + }, + "type": "array" + }, "warnings": { "description": "Warning messages, e.g., a deprecation warning.", "items": { diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go index 7eb0d667da7..94a45e831ab 100644 --- a/appengine/v1/appengine-gen.go +++ b/appengine/v1/appengine-gen.go @@ -3432,6 +3432,10 @@ type Runtime struct { // "END_OF_SUPPORT" - The runtime is end of support. Stage string `json:"stage,omitempty"` + // SupportedOperatingSystems: Supported operating systems for the + // runtime, e.g., 'ubuntu22', etc. + SupportedOperatingSystems []string `json:"supportedOperatingSystems,omitempty"` + // Warnings: Warning messages, e.g., a deprecation warning. Warnings []string `json:"warnings,omitempty"` diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index 01f292eb5bc..a3c89fdfcbd 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -1859,7 +1859,7 @@ } } }, - "revision": "20231107", + "revision": "20240212", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3827,6 +3827,13 @@ ], "type": "string" }, + "supportedOperatingSystems": { + "description": "Supported operating systems for the runtime, e.g., 'ubuntu22', etc.", + "items": { + "type": "string" + }, + "type": "array" + }, "warnings": { "description": "Warning messages, e.g., a deprecation warning.", "items": { diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index 1959931ed8c..99c0be8e465 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -3564,6 +3564,10 @@ type Runtime struct { // "END_OF_SUPPORT" - The runtime is end of support. Stage string `json:"stage,omitempty"` + // SupportedOperatingSystems: Supported operating systems for the + // runtime, e.g., 'ubuntu22', etc. + SupportedOperatingSystems []string `json:"supportedOperatingSystems,omitempty"` + // Warnings: Warning messages, e.g., a deprecation warning. Warnings []string `json:"warnings,omitempty"` diff --git a/apphub/v1/apphub-api.json b/apphub/v1/apphub-api.json index 38a3c902631..41130847f1b 100644 --- a/apphub/v1/apphub-api.json +++ b/apphub/v1/apphub-api.json @@ -109,6 +109,34 @@ "resources": { "locations": { "methods": { + "detachServiceProjectAttachment": { + "description": "Detaches a service project from a host project. You can call this API from either a host or service project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:detachServiceProjectAttachment", + "httpMethod": "POST", + "id": "apphub.projects.locations.detachServiceProjectAttachment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:detachServiceProjectAttachment", + "request": { + "$ref": "DetachServiceProjectAttachmentRequest" + }, + "response": { + "$ref": "DetachServiceProjectAttachmentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets information about a location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", @@ -174,11 +202,129 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "lookupServiceProjectAttachment": { + "description": "Looks up a service project attachment. You can call this API from either a host or service project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupServiceProjectAttachment", + "httpMethod": "GET", + "id": "apphub.projects.locations.lookupServiceProjectAttachment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:lookupServiceProjectAttachment", + "response": { + "$ref": "LookupServiceProjectAttachmentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { "applications": { "methods": { + "create": { + "description": "Creates an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "applicationId": { + "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "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}/applications", + "request": { + "$ref": "Application" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "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 an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Application" + }, + "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}/applications/{applicationsId}:getIamPolicy", @@ -210,6 +356,91 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists Applications in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/applications", + "response": { + "$ref": "ListApplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an Application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Application" + }, + "response": { + "$ref": "Operation" + }, + "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}/applications/{applicationsId}:setIamPolicy", @@ -266,6 +497,522 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "services": { + "methods": { + "create": { + "description": "Creates a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "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" + }, + "serviceId": { + "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "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 a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List Services in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/services", + "response": { + "$ref": "ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Service in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "workloads": { + "methods": { + "create": { + "description": "Creates a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + "httpMethod": "POST", + "id": "apphub.projects.locations.applications.workloads.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "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" + }, + "workloadId": { + "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/workloads", + "request": { + "$ref": "Workload" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.applications.workloads.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "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 a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.workloads.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Workload" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Workloads in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + "httpMethod": "GET", + "id": "apphub.projects.locations.applications.workloads.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workloads", + "response": { + "$ref": "ListWorkloadsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Workload in an Application.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + "httpMethod": "PATCH", + "id": "apphub.projects.locations.applications.workloads.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Workload" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "discoveredServices": { + "methods": { + "get": { + "description": "Gets a discovered service in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices/{discoveredServicesId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredServices.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DiscoveredService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists discovered services that can be added to an application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredServices.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredServices", + "response": { + "$ref": "ListDiscoveredServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "discoveredWorkloads": { + "methods": { + "get": { + "description": "Gets a discovered workload in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads/{discoveredWorkloadsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredWorkloads.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DiscoveredWorkload" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists discovered workloads that can be added to an application in a host project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", + "httpMethod": "GET", + "id": "apphub.projects.locations.discoveredWorkloads.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/discoveredWorkloads", + "response": { + "$ref": "ListDiscoveredWorkloadsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } } }, "operations": { @@ -390,15 +1137,255 @@ ] } } + }, + "serviceProjectAttachments": { + "methods": { + "create": { + "description": "Attaches a service project to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", + "httpMethod": "POST", + "id": "apphub.projects.locations.serviceProjectAttachments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "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" + }, + "serviceProjectAttachmentId": { + "description": "Required. The service project attachment identifier must contain the project_id of the service project specified in the service_project_attachment.service_project field. Hint: \"projects/{project_id}\"", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceProjectAttachments", + "request": { + "$ref": "ServiceProjectAttachment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a service project attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", + "httpMethod": "DELETE", + "id": "apphub.projects.locations.serviceProjectAttachments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", + "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 a service project attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", + "httpMethod": "GET", + "id": "apphub.projects.locations.serviceProjectAttachments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Value for name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceProjectAttachment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List service projects attached to the host project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", + "httpMethod": "GET", + "id": "apphub.projects.locations.serviceProjectAttachments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. 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. Value for parent.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceProjectAttachments", + "response": { + "$ref": "ListServiceProjectAttachmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20240122", + "revision": "20240217", "rootUrl": "https://apphub.googleapis.com/", "schemas": { + "Application": { + "description": "Application defines the governance boundary for App Hub Entities that perform a logical end-to-end business function. App Hub supports application level IAM permission to align with governance requirements.", + "id": "Application", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of an Application. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Application. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + "type": "string" + }, + "scope": { + "$ref": "Scope", + "description": "Required. Immutable. Defines what data can be included into this Application. Limits which Services and Workloads can be registered." + }, + "state": { + "description": "Output only. Application state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Application is being created.", + "The Application is ready to register Services and Workloads.", + "The Application is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (in UUID4 format) for the `Application`.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Attributes": { + "description": "Consumer provided attributes.", + "id": "Attributes", + "properties": { + "businessOwners": { + "description": "Optional. Business team that ensures user needs are met and value is delivered", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + }, + "criticality": { + "$ref": "Criticality", + "description": "Optional. User-defined criticality information." + }, + "developerOwners": { + "description": "Optional. Developer team that owns development and coding.", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + }, + "environment": { + "$ref": "Environment", + "description": "Optional. User-defined environment information." + }, + "operatorOwners": { + "description": "Optional. Operator team that ensures runtime and operations.", + "items": { + "$ref": "ContactInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "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", @@ -475,12 +1462,131 @@ "properties": {}, "type": "object" }, + "ContactInfo": { + "description": "Contact information of stakeholders.", + "id": "ContactInfo", + "properties": { + "displayName": { + "description": "Optional. Contact's name. Can have a maximum length of 63 characters.", + "type": "string" + }, + "email": { + "description": "Required. Email address of the contacts.", + "type": "string" + } + }, + "type": "object" + }, + "Criticality": { + "description": "Criticality of the Application, Service, or Workload", + "id": "Criticality", + "properties": { + "type": { + "description": "Required. Criticality Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "MISSION_CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified type.", + "Mission critical service, application or workload.", + "High impact.", + "Medium impact.", + "Low impact." + ], + "type": "string" + } + }, + "type": "object" + }, + "DetachServiceProjectAttachmentRequest": { + "description": "Request for DetachServiceProjectAttachment.", + "id": "DetachServiceProjectAttachmentRequest", + "properties": {}, + "type": "object" + }, + "DetachServiceProjectAttachmentResponse": { + "description": "Response for DetachServiceProjectAttachment.", + "id": "DetachServiceProjectAttachmentResponse", + "properties": {}, + "type": "object" + }, + "DiscoveredService": { + "description": "DiscoveredService is a network/api interface that exposes some functionality to clients for consumption over the network. A discovered service can be registered to a App Hub service.", + "id": "DiscoveredService", + "properties": { + "name": { + "description": "Identifier. The resource name of the discovered service. Format: \"projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}\"\"", + "type": "string" + }, + "serviceProperties": { + "$ref": "ServiceProperties", + "description": "Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "serviceReference": { + "$ref": "ServiceReference", + "description": "Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable.", + "readOnly": true + } + }, + "type": "object" + }, + "DiscoveredWorkload": { + "description": "DiscoveredWorkload is a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality. A discovered workload can be registered to an App Hub Workload.", + "id": "DiscoveredWorkload", + "properties": { + "name": { + "description": "Identifier. The resource name of the discovered workload. Format: \"projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}\"", + "type": "string" + }, + "workloadProperties": { + "$ref": "WorkloadProperties", + "description": "Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + }, + "workloadReference": { + "$ref": "WorkloadReference", + "description": "Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", "properties": {}, "type": "object" }, + "Environment": { + "description": "Environment of the Application, Service, or Workload", + "id": "Environment", + "properties": { + "type": { + "description": "Required. Environment Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "PRODUCTION", + "STAGING", + "TEST", + "DEVELOPMENT" + ], + "enumDescriptions": [ + "Unspecified type.", + "Production environment.", + "Staging environment.", + "Test environment.", + "Development environment." + ], + "type": "string" + } + }, + "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", @@ -504,6 +1610,81 @@ }, "type": "object" }, + "ListApplicationsResponse": { + "description": "Response for ListApplications.", + "id": "ListApplicationsResponse", + "properties": { + "applications": { + "description": "List of Applications.", + "items": { + "$ref": "Application" + }, + "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" + }, + "ListDiscoveredServicesResponse": { + "description": "Response for ListDiscoveredServices.", + "id": "ListDiscoveredServicesResponse", + "properties": { + "discoveredServices": { + "description": "List of discovered services.", + "items": { + "$ref": "DiscoveredService" + }, + "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" + }, + "ListDiscoveredWorkloadsResponse": { + "description": "Response for ListDiscoveredWorkloads.", + "id": "ListDiscoveredWorkloadsResponse", + "properties": { + "discoveredWorkloads": { + "description": "List of discovered workloads.", + "items": { + "$ref": "DiscoveredWorkload" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -540,6 +1721,81 @@ }, "type": "object" }, + "ListServiceProjectAttachmentsResponse": { + "description": "Response for ListServiceProjectAttachments.", + "id": "ListServiceProjectAttachmentsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "serviceProjectAttachments": { + "description": "List of service project attachments.", + "items": { + "$ref": "ServiceProjectAttachment" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListServicesResponse": { + "description": "Response for ListServices.", + "id": "ListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "services": { + "description": "List of Services.", + "items": { + "$ref": "Service" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkloadsResponse": { + "description": "Response for ListWorkloads.", + "id": "ListWorkloadsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workloads": { + "description": "List of Workloads.", + "items": { + "$ref": "Workload" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents a Google Cloud location.", "id": "Location", @@ -574,6 +1830,17 @@ }, "type": "object" }, + "LookupServiceProjectAttachmentResponse": { + "description": "Response for LookupServiceProjectAttachment.", + "id": "LookupServiceProjectAttachmentResponse", + "properties": { + "serviceProjectAttachment": { + "$ref": "ServiceProjectAttachment", + "description": "Service project attachment for a project if exists, empty otherwise." + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -609,6 +1876,50 @@ }, "type": "object" }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "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", @@ -671,6 +1982,175 @@ }, "type": "object" }, + "Scope": { + "description": "Scope of an application.", + "id": "Scope", + "properties": { + "type": { + "description": "Required. Scope Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "REGIONAL" + ], + "enumDescriptions": [ + "Unspecified type.", + "Regional type." + ], + "type": "string" + } + }, + "type": "object" + }, + "Service": { + "description": "Service is an App Hub data model that contains a discovered service, which represents a network/api interface that exposes some functionality to clients for consumption over the network.", + "id": "Service", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of a Service. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "discoveredService": { + "description": "Required. Immutable. The resource name of the original discovered service.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Service. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + "type": "string" + }, + "serviceProperties": { + "$ref": "ServiceProperties", + "description": "Output only. Properties of an underlying compute resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "serviceReference": { + "$ref": "ServiceReference", + "description": "Output only. Reference to an underlying networking resource that can comprise a Service. These are immutable.", + "readOnly": true + }, + "state": { + "description": "Output only. Service state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "DETACHED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The service is being created.", + "The service is ready.", + "The service is being deleted.", + "The underlying networking resources have been deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (UUID) for the `Service` in the UUID4 format.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceProjectAttachment": { + "description": "ServiceProjectAttachment represents an attachment from a service project to a host project. Service projects contain the underlying cloud infrastructure resources, and expose these resources to the host project through a ServiceProjectAttachment. With the attachments, the host project can provide an aggregated view of resources across all service projects.", + "id": "ServiceProjectAttachment", + "properties": { + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of a ServiceProjectAttachment. Format: \"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\"", + "type": "string" + }, + "serviceProject": { + "description": "Required. Immutable. Service project name in the format: \"projects/abc\" or \"projects/123\". As input, project name with either project id or number are accepted. As output, this field will contain project number.", + "type": "string" + }, + "state": { + "description": "Output only. ServiceProjectAttachment state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified state.", + "The ServiceProjectAttachment is being created.", + "The ServiceProjectAttachment is ready. This means Services and Workloads under the corresponding ServiceProjectAttachment is ready for registration.", + "The ServiceProjectAttachment is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A globally unique identifier (in UUID4 format) for the `ServiceProjectAttachment`.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceProperties": { + "description": "Properties of an underlying cloud resource that can comprise a Service.", + "id": "ServiceProperties", + "properties": { + "gcpProject": { + "description": "Output only. The service project identifier that the underlying cloud resource resides in.", + "readOnly": true, + "type": "string" + }, + "location": { + "description": "Output only. The location that the underlying resource resides in, for example, us-west1.", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. The location that the underlying resource resides in if it is zonal, for example, us-west1-a).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceReference": { + "description": "Reference to an underlying networking resource that can comprise a Service.", + "id": "ServiceReference", + "properties": { + "uri": { + "description": "Output only. The underlying resource URI (For example, URI of Forwarding Rule, URL Map, and Backend Service).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -741,6 +2221,113 @@ } }, "type": "object" + }, + "Workload": { + "description": "Workload is an App Hub data model that contains a discovered workload, which represents a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality.", + "id": "Workload", + "properties": { + "attributes": { + "$ref": "Attributes", + "description": "Optional. Consumer provided attributes." + }, + "createTime": { + "description": "Output only. Create time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.", + "type": "string" + }, + "discoveredWorkload": { + "description": "Required. Immutable. The resource name of the original discovered workload.", + "type": "string" + }, + "displayName": { + "description": "Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + "type": "string" + }, + "state": { + "description": "Output only. Workload state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "DETACHED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The Workload is being created.", + "The Workload is ready.", + "The Workload is being deleted.", + "The underlying compute resources have been deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A universally unique identifier (UUID) for the `Workload` in the UUID4 format.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workloadProperties": { + "$ref": "WorkloadProperties", + "description": "Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + }, + "workloadReference": { + "$ref": "WorkloadReference", + "description": "Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.", + "readOnly": true + } + }, + "type": "object" + }, + "WorkloadProperties": { + "description": "Properties of an underlying compute resource represented by the Workload.", + "id": "WorkloadProperties", + "properties": { + "gcpProject": { + "description": "Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.", + "readOnly": true, + "type": "string" + }, + "location": { + "description": "Output only. The location that the underlying compute resource resides in (e.g us-west1).", + "readOnly": true, + "type": "string" + }, + "zone": { + "description": "Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkloadReference": { + "description": "Reference of an underlying compute resource represented by the Workload.", + "id": "WorkloadReference", + "properties": { + "uri": { + "description": "Output only. The underlying compute resource uri.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/apphub/v1/apphub-gen.go b/apphub/v1/apphub-gen.go index ddc8492d785..593fc0b1162 100644 --- a/apphub/v1/apphub-gen.go +++ b/apphub/v1/apphub-gen.go @@ -101,8 +101,8 @@ const ( CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" ) -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", ) @@ -126,21 +126,21 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err return s, nil } -// New creates a new Service. It uses the provided http.Client for requests. +// New creates a new APIService. 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) { +func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") } - s := &Service{client: client, BasePath: basePath} + s := &APIService{client: client, BasePath: basePath} s.Projects = NewProjectsService(s) return s, nil } -type Service struct { +type APIService struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment @@ -148,56 +148,233 @@ type Service struct { Projects *ProjectsService } -func (s *Service) userAgent() string { +func (s *APIService) userAgent() string { if s.UserAgent == "" { return googleapi.UserAgent } return googleapi.UserAgent + " " + s.UserAgent } -func NewProjectsService(s *Service) *ProjectsService { +func NewProjectsService(s *APIService) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) return rs } type ProjectsService struct { - s *Service + s *APIService Locations *ProjectsLocationsService } -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { +func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Applications = NewProjectsLocationsApplicationsService(s) + rs.DiscoveredServices = NewProjectsLocationsDiscoveredServicesService(s) + rs.DiscoveredWorkloads = NewProjectsLocationsDiscoveredWorkloadsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ServiceProjectAttachments = NewProjectsLocationsServiceProjectAttachmentsService(s) return rs } type ProjectsLocationsService struct { - s *Service + s *APIService Applications *ProjectsLocationsApplicationsService + DiscoveredServices *ProjectsLocationsDiscoveredServicesService + + DiscoveredWorkloads *ProjectsLocationsDiscoveredWorkloadsService + Operations *ProjectsLocationsOperationsService + + ServiceProjectAttachments *ProjectsLocationsServiceProjectAttachmentsService } -func NewProjectsLocationsApplicationsService(s *Service) *ProjectsLocationsApplicationsService { +func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService { rs := &ProjectsLocationsApplicationsService{s: s} + rs.Services = NewProjectsLocationsApplicationsServicesService(s) + rs.Workloads = NewProjectsLocationsApplicationsWorkloadsService(s) return rs } type ProjectsLocationsApplicationsService struct { - s *Service + s *APIService + + Services *ProjectsLocationsApplicationsServicesService + + Workloads *ProjectsLocationsApplicationsWorkloadsService +} + +func NewProjectsLocationsApplicationsServicesService(s *APIService) *ProjectsLocationsApplicationsServicesService { + rs := &ProjectsLocationsApplicationsServicesService{s: s} + return rs +} + +type ProjectsLocationsApplicationsServicesService struct { + s *APIService +} + +func NewProjectsLocationsApplicationsWorkloadsService(s *APIService) *ProjectsLocationsApplicationsWorkloadsService { + rs := &ProjectsLocationsApplicationsWorkloadsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsWorkloadsService struct { + s *APIService } -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { +func NewProjectsLocationsDiscoveredServicesService(s *APIService) *ProjectsLocationsDiscoveredServicesService { + rs := &ProjectsLocationsDiscoveredServicesService{s: s} + return rs +} + +type ProjectsLocationsDiscoveredServicesService struct { + s *APIService +} + +func NewProjectsLocationsDiscoveredWorkloadsService(s *APIService) *ProjectsLocationsDiscoveredWorkloadsService { + rs := &ProjectsLocationsDiscoveredWorkloadsService{s: s} + return rs +} + +type ProjectsLocationsDiscoveredWorkloadsService struct { + s *APIService +} + +func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs } type ProjectsLocationsOperationsService struct { - s *Service + s *APIService +} + +func NewProjectsLocationsServiceProjectAttachmentsService(s *APIService) *ProjectsLocationsServiceProjectAttachmentsService { + rs := &ProjectsLocationsServiceProjectAttachmentsService{s: s} + return rs +} + +type ProjectsLocationsServiceProjectAttachmentsService struct { + s *APIService +} + +// Application: Application defines the governance boundary for App Hub +// Entities that perform a logical end-to-end business function. App Hub +// supports application level IAM permission to align with governance +// requirements. +type Application struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of an Application. + // Can have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User-defined name for the Application. Can + // have a maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of an Application. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}" + Name string `json:"name,omitempty"` + + // Scope: Required. Immutable. Defines what data can be included into + // this Application. Limits which Services and Workloads can be + // registered. + Scope *Scope `json:"scope,omitempty"` + + // State: Output only. Application state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The Application is being created. + // "ACTIVE" - The Application is ready to register Services and + // Workloads. + // "DELETING" - The Application is being deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (in UUID4 format) + // for the `Application`. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + 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. "Attributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Application) MarshalJSON() ([]byte, error) { + type NoMethod Application + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Attributes: Consumer provided attributes. +type Attributes struct { + // BusinessOwners: Optional. Business team that ensures user needs are + // met and value is delivered + BusinessOwners []*ContactInfo `json:"businessOwners,omitempty"` + + // Criticality: Optional. User-defined criticality information. + Criticality *Criticality `json:"criticality,omitempty"` + + // DeveloperOwners: Optional. Developer team that owns development and + // coding. + DeveloperOwners []*ContactInfo `json:"developerOwners,omitempty"` + + // Environment: Optional. User-defined environment information. + Environment *Environment `json:"environment,omitempty"` + + // OperatorOwners: Optional. Operator team that ensures runtime and + // operations. + OperatorOwners []*ContactInfo `json:"operatorOwners,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BusinessOwners") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BusinessOwners") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Attributes) MarshalJSON() ([]byte, error) { + type NoMethod Attributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // AuditConfig: Specifies the audit configuration for a service. The @@ -412,6 +589,178 @@ func (s *Binding) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ContactInfo: Contact information of stakeholders. +type ContactInfo struct { + // DisplayName: Optional. Contact's name. Can have a maximum length of + // 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Email: Required. Email address of the contacts. + Email string `json:"email,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ContactInfo) MarshalJSON() ([]byte, error) { + type NoMethod ContactInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Criticality: Criticality of the Application, Service, or Workload +type Criticality struct { + // Type: Required. Criticality Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "MISSION_CRITICAL" - Mission critical service, application or + // workload. + // "HIGH" - High impact. + // "MEDIUM" - Medium impact. + // "LOW" - Low impact. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Criticality) MarshalJSON() ([]byte, error) { + type NoMethod Criticality + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DetachServiceProjectAttachmentRequest: Request for +// DetachServiceProjectAttachment. +type DetachServiceProjectAttachmentRequest struct { +} + +// DetachServiceProjectAttachmentResponse: Response for +// DetachServiceProjectAttachment. +type DetachServiceProjectAttachmentResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// DiscoveredService: DiscoveredService is a network/api interface that +// exposes some functionality to clients for consumption over the +// network. A discovered service can be registered to a App Hub service. +type DiscoveredService struct { + // Name: Identifier. The resource name of the discovered service. + // Format: + // "projects/{host-project-id}/locations/{location}/discoveredServices/{u + // uid}"" + Name string `json:"name,omitempty"` + + // ServiceProperties: Output only. Properties of an underlying compute + // resource that can comprise a Service. These are immutable. + ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"` + + // ServiceReference: Output only. Reference to an underlying networking + // resource that can comprise a Service. These are immutable. + ServiceReference *ServiceReference `json:"serviceReference,omitempty"` + + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiscoveredService) MarshalJSON() ([]byte, error) { + type NoMethod DiscoveredService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiscoveredWorkload: DiscoveredWorkload is a binary deployment (such +// as managed instance groups (MIGs) and GKE deployments) that performs +// the smallest logical subset of business functionality. A discovered +// workload can be registered to an App Hub Workload. +type DiscoveredWorkload struct { + // Name: Identifier. The resource name of the discovered workload. + // Format: + // "projects/{host-project-id}/locations/{location}/discoveredWorkloads/{ + // uuid}" + Name string `json:"name,omitempty"` + + // WorkloadProperties: Output only. Properties of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"` + + // WorkloadReference: Output only. Reference of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"` + + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DiscoveredWorkload) MarshalJSON() ([]byte, error) { + type NoMethod DiscoveredWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -423,6 +772,41 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Environment: Environment of the Application, Service, or Workload +type Environment struct { + // Type: Required. Environment Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "PRODUCTION" - Production environment. + // "STAGING" - Staging environment. + // "TEST" - Test environment. + // "DEVELOPMENT" - Development environment. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Environment) MarshalJSON() ([]byte, error) { + type NoMethod Environment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // 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 @@ -483,21 +867,23 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// ListApplicationsResponse: Response for ListApplications. +type ListApplicationsResponse struct { + // Applications: List of Applications. + Applications []*Application `json:"applications,omitempty"` - // NextPageToken: The standard List next-page token. + // 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. "Locations") to + // ForceSendFields is a list of field names (e.g. "Applications") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -505,51 +891,169 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Applications") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *ListApplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListApplicationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. +// ListDiscoveredServicesResponse: Response for ListDiscoveredServices. +type ListDiscoveredServicesResponse struct { + // DiscoveredServices: List of discovered services. + DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DiscoveredServices") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // NullFields is a list of field names (e.g. "DiscoveredServices") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDiscoveredServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDiscoveredServicesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDiscoveredWorkloadsResponse: Response for +// ListDiscoveredWorkloads. +type ListDiscoveredWorkloadsResponse struct { + // DiscoveredWorkloads: List of discovered workloads. + DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,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. "DiscoveredWorkloads") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiscoveredWorkloads") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDiscoveredWorkloadsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { type NoMethod ListOperationsResponse @@ -557,6 +1061,124 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListServiceProjectAttachmentsResponse: Response for +// ListServiceProjectAttachments. +type ListServiceProjectAttachmentsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceProjectAttachments: List of service project attachments. + ServiceProjectAttachments []*ServiceProjectAttachment `json:"serviceProjectAttachments,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServiceProjectAttachmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceProjectAttachmentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServicesResponse: Response for ListServices. +type ListServicesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Services: List of Services. + Services []*Service `json:"services,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServicesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkloadsResponse: Response for ListWorkloads. +type ListWorkloadsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // Workloads: List of Workloads. + Workloads []*Workload `json:"workloads,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkloadsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkloadsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -607,6 +1229,42 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LookupServiceProjectAttachmentResponse: Response for +// LookupServiceProjectAttachment. +type LookupServiceProjectAttachmentResponse struct { + // ServiceProjectAttachment: Service project attachment for a project if + // exists, empty otherwise. + ServiceProjectAttachment *ServiceProjectAttachment `json:"serviceProjectAttachment,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ServiceProjectAttachment") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceProjectAttachment") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LookupServiceProjectAttachmentResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupServiceProjectAttachmentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -669,6 +1327,58 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // 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 @@ -822,21 +1532,16 @@ func (s *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `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"` +// Scope: Scope of an application. +type Scope struct { + // Type: Required. Scope Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "REGIONAL" - Regional type. + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // ForceSendFields is a list of field names (e.g. "Type") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -844,7 +1549,7 @@ type SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API + // NullFields is a list of field names (e.g. "Type") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -853,8 +1558,256 @@ type SetIamPolicyRequest struct { NullFields []string `json:"-"` } -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest +func (s *Scope) MarshalJSON() ([]byte, error) { + type NoMethod Scope + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Service: Service is an App Hub data model that contains a discovered +// service, which represents a network/api interface that exposes some +// functionality to clients for consumption over the network. +type Service struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of a Service. Can + // have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DiscoveredService: Required. Immutable. The resource name of the + // original discovered service. + DiscoveredService string `json:"discoveredService,omitempty"` + + // DisplayName: Optional. User-defined name for the Service. Can have a + // maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of a Service. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}/services/{service-id}" + Name string `json:"name,omitempty"` + + // ServiceProperties: Output only. Properties of an underlying compute + // resource that can comprise a Service. These are immutable. + ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"` + + // ServiceReference: Output only. Reference to an underlying networking + // resource that can comprise a Service. These are immutable. + ServiceReference *ServiceReference `json:"serviceReference,omitempty"` + + // State: Output only. Service state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The service is being created. + // "ACTIVE" - The service is ready. + // "DELETING" - The service is being deleted. + // "DETACHED" - The underlying networking resources have been deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (UUID) for the + // `Service` in the UUID4 format. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + 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. "Attributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceProjectAttachment: ServiceProjectAttachment represents an +// attachment from a service project to a host project. Service projects +// contain the underlying cloud infrastructure resources, and expose +// these resources to the host project through a +// ServiceProjectAttachment. With the attachments, the host project can +// provide an aggregated view of resources across all service projects. +type ServiceProjectAttachment struct { + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Name: Identifier. The resource name of a ServiceProjectAttachment. + // Format: + // "projects/{host-project-id}/locations/global/serviceProjectAttachments + // /{service-project-id}." + Name string `json:"name,omitempty"` + + // ServiceProject: Required. Immutable. Service project name in the + // format: "projects/abc" or "projects/123". As input, project name with + // either project id or number are accepted. As output, this field will + // contain project number. + ServiceProject string `json:"serviceProject,omitempty"` + + // State: Output only. ServiceProjectAttachment state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The ServiceProjectAttachment is being created. + // "ACTIVE" - The ServiceProjectAttachment is ready. This means + // Services and Workloads under the corresponding + // ServiceProjectAttachment is ready for registration. + // "DELETING" - The ServiceProjectAttachment is being deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A globally unique identifier (in UUID4 format) for + // the `ServiceProjectAttachment`. + Uid string `json:"uid,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceProjectAttachment) MarshalJSON() ([]byte, error) { + type NoMethod ServiceProjectAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceProperties: Properties of an underlying cloud resource that +// can comprise a Service. +type ServiceProperties struct { + // GcpProject: Output only. The service project identifier that the + // underlying cloud resource resides in. + GcpProject string `json:"gcpProject,omitempty"` + + // Location: Output only. The location that the underlying resource + // resides in, for example, us-west1. + Location string `json:"location,omitempty"` + + // Zone: Output only. The location that the underlying resource resides + // in if it is zonal, for example, us-west1-a). + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcpProject") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcpProject") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceProperties) MarshalJSON() ([]byte, error) { + type NoMethod ServiceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceReference: Reference to an underlying networking resource that +// can comprise a Service. +type ServiceReference struct { + // Uri: Output only. The underlying resource URI (For example, URI of + // Forwarding Rule, URL Map, and Backend Service). + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceReference) MarshalJSON() ([]byte, error) { + type NoMethod ServiceReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -880,99 +1833,4379 @@ type Status struct { // in the google.rpc.Status.details field, or localized by the client. Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Workload: Workload is an App Hub data model that contains a +// discovered workload, which represents a binary deployment (such as +// managed instance groups (MIGs) and GKE deployments) that performs the +// smallest logical subset of business functionality. +type Workload struct { + // Attributes: Optional. Consumer provided attributes. + Attributes *Attributes `json:"attributes,omitempty"` + + // CreateTime: Output only. Create time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-defined description of a Workload. Can + // have a maximum length of 2048 characters. + Description string `json:"description,omitempty"` + + // DiscoveredWorkload: Required. Immutable. The resource name of the + // original discovered workload. + DiscoveredWorkload string `json:"discoveredWorkload,omitempty"` + + // DisplayName: Optional. User-defined name for the Workload. Can have a + // maximum length of 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Name: Identifier. The resource name of the Workload. Format: + // "projects/{host-project-id}/locations/{location}/applications/{applica + // tion-id}/workloads/{workload-id}" + Name string `json:"name,omitempty"` + + // State: Output only. Workload state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "CREATING" - The Workload is being created. + // "ACTIVE" - The Workload is ready. + // "DELETING" - The Workload is being deleted. + // "DETACHED" - The underlying compute resources have been deleted. + State string `json:"state,omitempty"` + + // Uid: Output only. A universally unique identifier (UUID) for the + // `Workload` in the UUID4 format. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Update time. + UpdateTime string `json:"updateTime,omitempty"` + + // WorkloadProperties: Output only. Properties of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"` + + // WorkloadReference: Output only. Reference of an underlying compute + // resource represented by the Workload. These are immutable. + WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Workload) MarshalJSON() ([]byte, error) { + type NoMethod Workload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadProperties: Properties of an underlying compute resource +// represented by the Workload. +type WorkloadProperties struct { + // GcpProject: Output only. The service project identifier that the + // underlying cloud resource resides in. Empty for non cloud resources. + GcpProject string `json:"gcpProject,omitempty"` + + // Location: Output only. The location that the underlying compute + // resource resides in (e.g us-west1). + Location string `json:"location,omitempty"` + + // Zone: Output only. The location that the underlying compute resource + // resides in if it is zonal (e.g us-west1-a). + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcpProject") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcpProject") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadProperties) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadReference: Reference of an underlying compute resource +// represented by the Workload. +type WorkloadReference struct { + // Uri: Output only. The underlying compute resource uri. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadReference) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "apphub.projects.locations.detachServiceProjectAttachment": + +type ProjectsLocationsDetachServiceProjectAttachmentCall struct { + s *APIService + name string + detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetachServiceProjectAttachment: Detaches a service project from a +// host project. You can call this API from either a host or service +// project. +// +// - name: Value for name. +func (r *ProjectsLocationsService) DetachServiceProjectAttachment(name string, detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest) *ProjectsLocationsDetachServiceProjectAttachmentCall { + c := &ProjectsLocationsDetachServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.detachserviceprojectattachmentrequest = detachserviceprojectattachmentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetachServiceProjectAttachmentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsDetachServiceProjectAttachmentCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachserviceprojectattachmentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:detachServiceProjectAttachment") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.detachServiceProjectAttachment" call. +// Exactly one of *DetachServiceProjectAttachmentResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *DetachServiceProjectAttachmentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*DetachServiceProjectAttachmentResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DetachServiceProjectAttachmentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Detaches a service project from a host project. You can call this API from either a host or service project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:detachServiceProjectAttachment", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.detachServiceProjectAttachment", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:detachServiceProjectAttachment", + // "request": { + // "$ref": "DetachServiceProjectAttachmentRequest" + // }, + // "response": { + // "$ref": "DetachServiceProjectAttachmentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "apphub.projects.locations.lookupServiceProjectAttachment": + +type ProjectsLocationsLookupServiceProjectAttachmentCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// LookupServiceProjectAttachment: Looks up a service project +// attachment. You can call this API from either a host or service +// project. +// +// - name: Value for name. +func (r *ProjectsLocationsService) LookupServiceProjectAttachment(name string) *ProjectsLocationsLookupServiceProjectAttachmentCall { + c := &ProjectsLocationsLookupServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupServiceProjectAttachmentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupServiceProjectAttachmentCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsLookupServiceProjectAttachmentCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupServiceProjectAttachment") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.lookupServiceProjectAttachment" call. +// Exactly one of *LookupServiceProjectAttachmentResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *LookupServiceProjectAttachmentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*LookupServiceProjectAttachmentResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &LookupServiceProjectAttachmentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Looks up a service project attachment. You can call this API from either a host or service project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:lookupServiceProjectAttachment", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.lookupServiceProjectAttachment", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:lookupServiceProjectAttachment", + // "response": { + // "$ref": "LookupServiceProjectAttachmentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.create": + +type ProjectsLocationsApplicationsCreateCall struct { + s *APIService + parent string + application *Application + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Application in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsService) Create(parent string, application *Application) *ProjectsLocationsApplicationsCreateCall { + c := &ProjectsLocationsApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.application = application + return c +} + +// ApplicationId sets the optional parameter "applicationId": Required. +// The Application identifier. Must contain only lowercase letters, +// numbers or hyphens, with the first character a letter, the last a +// letter or a number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall { + c.urlParams_.Set("applicationId", applicationId) + 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 *ProjectsLocationsApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/applications") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "applicationId": { + // "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "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}/applications", + // "request": { + // "$ref": "Application" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.delete": + +type ProjectsLocationsApplicationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an Application in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsService) Delete(name string) *ProjectsLocationsApplicationsDeleteCall { + c := &ProjectsLocationsApplicationsDeleteCall{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 *ProjectsLocationsApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.get": + +type ProjectsLocationsApplicationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an Application in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsService) Get(name string) *ProjectsLocationsApplicationsGetCall { + c := &ProjectsLocationsApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.get" call. +// Exactly one of *Application or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Application.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Application{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Application" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.getIamPolicy": + +type ProjectsLocationsApplicationsGetIamPolicyCall struct { + s *APIService + 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 *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c := &ProjectsLocationsApplicationsGetIamPolicyCall{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 *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.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/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.list": + +type ProjectsLocationsApplicationsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Applications in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsService) List(parent string) *ProjectsLocationsApplicationsListCall { + c := &ProjectsLocationsApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsListCall) Filter(filter string) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsListCall { + 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 *ProjectsLocationsApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/applications") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.list" call. +// Exactly one of *ListApplicationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListApplicationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsListCall) Do(opts ...googleapi.CallOption) (*ListApplicationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListApplicationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Applications in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. 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. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/applications", + // "response": { + // "$ref": "ListApplicationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsListCall) Pages(ctx context.Context, f func(*ListApplicationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "apphub.projects.locations.applications.patch": + +type ProjectsLocationsApplicationsPatchCall struct { + s *APIService + name string + application *Application + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Application in a host project and location. +// +// - name: Identifier. The resource name of an Application. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}". +func (r *ProjectsLocationsApplicationsService) Patch(name string, application *Application) *ProjectsLocationsApplicationsPatchCall { + c := &ProjectsLocationsApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.application = application + 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 *ProjectsLocationsApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// Application resource by the update. The fields specified in the +// update_mask are relative to the resource, not the full request. The +// API changes the values of the fields as specified in the update_mask. +// The API ignores the values of all fields not covered by the +// update_mask. You can also unset a field by not specifying it in the +// updated message, but adding the field to the mask. This clears +// whatever value the field previously had. +func (c *ProjectsLocationsApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an Application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of an Application. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Application" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.setIamPolicy": + +type ProjectsLocationsApplicationsSetIamPolicyCall struct { + s *APIService + 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 *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { + c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.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/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.testIamPermissions": + +type ProjectsLocationsApplicationsTestIamPermissionsCall struct { + s *APIService + 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 *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.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/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.create": + +type ProjectsLocationsApplicationsServicesCreateCall struct { + s *APIService + parent string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Service in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsServicesService) Create(parent string, service *Service) *ProjectsLocationsApplicationsServicesCreateCall { + c := &ProjectsLocationsApplicationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.service = service + 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 *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The +// Service identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.services.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "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" + // }, + // "serviceId": { + // "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.delete": + +type ProjectsLocationsApplicationsServicesDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Service in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsServicesService) Delete(name string) *ProjectsLocationsApplicationsServicesDeleteCall { + c := &ProjectsLocationsApplicationsServicesDeleteCall{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 *ProjectsLocationsApplicationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.services.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.get": + +type ProjectsLocationsApplicationsServicesGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Service in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsServicesService) Get(name string) *ProjectsLocationsApplicationsServicesGetCall { + c := &ProjectsLocationsApplicationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.get" call. +// Exactly one of *Service or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Service.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsApplicationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Service{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.services.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Service" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.services.list": + +type ProjectsLocationsApplicationsServicesListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List Services in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsServicesService) List(parent string) *ProjectsLocationsApplicationsServicesListCall { + c := &ProjectsLocationsApplicationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsServicesListCall) Filter(filter string) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsServicesListCall { + 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 *ProjectsLocationsApplicationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.list" call. +// Exactly one of *ListServicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListServicesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List Services in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.services.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. 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. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/services", + // "response": { + // "$ref": "ListServicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "apphub.projects.locations.applications.services.patch": + +type ProjectsLocationsApplicationsServicesPatchCall struct { + s *APIService + name string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Service in an Application. +// +// - name: Identifier. The resource name of a Service. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}/services/{service-id}". +func (r *ProjectsLocationsApplicationsServicesService) Patch(name string, service *Service) *ProjectsLocationsApplicationsServicesPatchCall { + c := &ProjectsLocationsApplicationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.service = service + 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 *ProjectsLocationsApplicationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the Service +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. The API changes the +// values of the fields as specified in the update_mask. The API ignores +// the values of all fields not covered by the update_mask. You can also +// unset a field by not specifying it in the updated message, but adding +// the field to the mask. This clears whatever value the field +// previously had. +func (c *ProjectsLocationsApplicationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.services.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Service in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.services.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of a Service. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/services/{service-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/services/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Service" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.create": + +type ProjectsLocationsApplicationsWorkloadsCreateCall struct { + s *APIService + parent string + workload *Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Workload in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsWorkloadsService) Create(parent string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c := &ProjectsLocationsApplicationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workload = workload + 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 *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// WorkloadId sets the optional parameter "workloadId": Required. The +// Workload identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.urlParams_.Set("workloadId", workloadId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.applications.workloads.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "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" + // }, + // "workloadId": { + // "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workloads", + // "request": { + // "$ref": "Workload" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.delete": + +type ProjectsLocationsApplicationsWorkloadsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Workload in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsWorkloadsService) Delete(name string) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c := &ProjectsLocationsApplicationsWorkloadsDeleteCall{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 *ProjectsLocationsApplicationsWorkloadsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "DELETE", + // "id": "apphub.projects.locations.applications.workloads.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.get": + +type ProjectsLocationsApplicationsWorkloadsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Workload in an Application. +// +// - name: Value for name. +func (r *ProjectsLocationsApplicationsWorkloadsService) Get(name string) *ProjectsLocationsApplicationsWorkloadsGetCall { + c := &ProjectsLocationsApplicationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.get" call. +// Exactly one of *Workload or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Workload.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*Workload, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Workload{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.workloads.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Workload" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.applications.workloads.list": + +type ProjectsLocationsApplicationsWorkloadsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Workloads in an Application. +// +// - parent: Value for parent. +func (r *ProjectsLocationsApplicationsWorkloadsService) List(parent string) *ProjectsLocationsApplicationsWorkloadsListCall { + c := &ProjectsLocationsApplicationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Filter(filter string) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsApplicationsWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsWorkloadsListCall { + 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 *ProjectsLocationsApplicationsWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloads") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.list" call. +// Exactly one of *ListWorkloadsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListWorkloadsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListWorkloadsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Workloads in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.applications.workloads.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. 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. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workloads", + // "response": { + // "$ref": "ListWorkloadsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsApplicationsWorkloadsListCall) Pages(ctx context.Context, f func(*ListWorkloadsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "apphub.projects.locations.applications.workloads.patch": + +type ProjectsLocationsApplicationsWorkloadsPatchCall struct { + s *APIService + name string + workload *Workload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Workload in an Application. +// +// - name: Identifier. The resource name of the Workload. Format: +// "projects/{host-project-id}/locations/{location}/applications/{appli +// cation-id}/workloads/{workload-id}". +func (r *ProjectsLocationsApplicationsWorkloadsService) Patch(name string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c := &ProjectsLocationsApplicationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workload = workload + 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 *ProjectsLocationsApplicationsWorkloadsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the Workload +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. The API changes the +// values of the fields as specified in the update_mask. The API ignores +// the values of all fields not covered by the update_mask. You can also +// unset a field by not specifying it in the updated message, but adding +// the field to the mask. This clears whatever value the field +// previously had. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.applications.workloads.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Workload in an Application.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/workloads/{workloadsId}", + // "httpMethod": "PATCH", + // "id": "apphub.projects.locations.applications.workloads.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of the Workload. Format: \"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Workload" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.discoveredServices.get": + +type ProjectsLocationsDiscoveredServicesGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a discovered service in a host project and location. +// +// - name: Value for name. +func (r *ProjectsLocationsDiscoveredServicesService) Get(name string) *ProjectsLocationsDiscoveredServicesGetCall { + c := &ProjectsLocationsDiscoveredServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDiscoveredServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDiscoveredServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDiscoveredServicesGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDiscoveredServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDiscoveredServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.discoveredServices.get" call. +// Exactly one of *DiscoveredService or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiscoveredService.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDiscoveredServicesGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredService, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DiscoveredService{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a discovered service in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices/{discoveredServicesId}", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.discoveredServices.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Value for name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveredServices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DiscoveredService" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.discoveredServices.list": + +type ProjectsLocationsDiscoveredServicesListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists discovered services that can be added to an application +// in a host project and location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall { + c := &ProjectsLocationsDiscoveredServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsDiscoveredServicesListCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsDiscoveredServicesListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *ProjectsLocationsDiscoveredServicesListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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"` +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsDiscoveredServicesListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} - // 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDiscoveredServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} - // 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. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDiscoveredServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesListCall { + c.ifNoneMatch_ = entityTag + return c } -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDiscoveredServicesListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesListCall { + c.ctx_ = ctx + return c } -// 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"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDiscoveredServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +func (c *ProjectsLocationsDiscoveredServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredServices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} - // 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Do executes the "apphub.projects.locations.discoveredServices.list" call. +// Exactly one of *ListDiscoveredServicesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDiscoveredServicesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredServicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListDiscoveredServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists discovered services that can be added to an application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredServices", + // "httpMethod": "GET", + // "id": "apphub.projects.locations.discoveredServices.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. 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. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/discoveredServices", + // "response": { + // "$ref": "ListDiscoveredServicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // 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. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` } -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, f func(*ListDiscoveredServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// method id "apphub.projects.locations.get": +// method id "apphub.projects.locations.discoveredWorkloads.get": -type ProjectsLocationsGetCall struct { - s *Service +type ProjectsLocationsDiscoveredWorkloadsGetCall struct { + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -980,11 +6213,11 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets a discovered workload in a host project and location. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsDiscoveredWorkloadsService) Get(name string) *ProjectsLocationsDiscoveredWorkloadsGetCall { + c := &ProjectsLocationsDiscoveredWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -992,7 +6225,7 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1002,7 +6235,7 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1010,21 +6243,21 @@ func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocati // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1050,14 +6283,14 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +// Do executes the "apphub.projects.locations.discoveredWorkloads.get" call. +// Exactly one of *DiscoveredWorkload or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiscoveredWorkload.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredWorkload, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1076,7 +6309,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &DiscoveredWorkload{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1088,25 +6321,25 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "description": "Gets a discovered workload in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads/{discoveredWorkloadsId}", // "httpMethod": "GET", - // "id": "apphub.projects.locations.get", + // "id": "apphub.projects.locations.discoveredWorkloads.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Resource name for the location.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveredWorkloads/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Location" + // "$ref": "DiscoveredWorkload" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1115,48 +6348,51 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "apphub.projects.locations.list": +// method id "apphub.projects.locations.discoveredWorkloads.list": -type ProjectsLocationsListCall struct { - s *Service - name string +type ProjectsLocationsDiscoveredWorkloadsListCall struct { + s *APIService + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// List: Lists discovered workloads that can be added to an application +// in a host project and location. // -// - 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 +// - parent: Value for parent. +func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall { + c := &ProjectsLocationsDiscoveredWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsListCall { 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 { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsListCall { + 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 *ProjectsLocationsDiscoveredWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsListCall { 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 { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1164,7 +6400,7 @@ func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1174,7 +6410,7 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1182,21 +6418,21 @@ func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1209,7 +6445,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/discoveredWorkloads") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1217,19 +6453,19 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "apphub.projects.locations.discoveredWorkloads.list" call. +// Exactly one of *ListDiscoveredWorkloadsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDiscoveredWorkloadsResponse.ServerResponse.Header or (if +// a response was returned 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) { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredWorkloadsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1248,7 +6484,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &ListDiscoveredWorkloadsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1260,41 +6496,46 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", + // "description": "Lists discovered workloads that can be added to an application in a host project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", // "httpMethod": "GET", - // "id": "apphub.projects.locations.list", + // "id": "apphub.projects.locations.discoveredWorkloads.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "description": "Optional. Filtering results", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "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 page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+parent}/discoveredWorkloads", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "ListDiscoveredWorkloadsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1306,7 +6547,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // 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 { +func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Pages(ctx context.Context, f func(*ListDiscoveredWorkloadsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1324,118 +6565,235 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "apphub.projects.locations.applications.getIamPolicy": +// method id "apphub.projects.locations.operations.cancel": -type ProjectsLocationsApplicationsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *APIService + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + 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. +// 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`. // -// - 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 *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c := &ProjectsLocationsApplicationsGetIamPolicyCall{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 *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apphub.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "apphub.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apphub.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "apphub.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +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 { @@ -1454,7 +6812,7 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1466,31 +6824,25 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.applications.getIamPolicy", + // "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": "apphub.projects.locations.operations.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "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.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1499,93 +6851,97 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "apphub.projects.locations.applications.setIamPolicy": +// method id "apphub.projects.locations.operations.get": -type ProjectsLocationsApplicationsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// 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. // -// - 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 *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { - c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "apphub.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1604,7 +6960,7 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1616,28 +6972,25 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "apphub.projects.locations.applications.setIamPolicy", + // "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": "apphub.projects.locations.operations.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1646,96 +6999,118 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "apphub.projects.locations.applications.testIamPermissions": +// method id "apphub.projects.locations.operations.list": -type ProjectsLocationsApplicationsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - 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 *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { - c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.applications.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apphub.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +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 { @@ -1754,7 +7129,7 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1766,28 +7141,41 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "apphub.projects.locations.applications.testIamPermissions", + // "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": "apphub.projects.locations.operations.list", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "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/[^/]+/applications/[^/]+$", + // "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/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1796,40 +7184,80 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } -// method id "apphub.projects.locations.operations.cancel": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apphub.projects.locations.serviceProjectAttachments.create": + +type ProjectsLocationsServiceProjectAttachmentsCreateCall struct { + s *APIService + parent string + serviceprojectattachment *ServiceProjectAttachment + 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`. +// Create: Attaches a service project to the host project. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: Value for parent. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Create(parent string, serviceprojectattachment *ServiceProjectAttachment) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c := &ProjectsLocationsServiceProjectAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceprojectattachment = serviceprojectattachment + 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 *ProjectsLocationsServiceProjectAttachmentsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceProjectAttachmentId sets the optional parameter +// "serviceProjectAttachmentId": Required. The service project +// attachment identifier must contain the project_id of the service +// project specified in the service_project_attachment.service_project +// field. Hint: "projects/{project_id}" +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) ServiceProjectAttachmentId(serviceProjectAttachmentId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall { + c.urlParams_.Set("serviceProjectAttachmentId", serviceProjectAttachmentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1837,21 +7265,21 @@ func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1859,14 +7287,14 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceprojectattachment) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceProjectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -1874,19 +7302,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1905,7 +7333,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1917,28 +7345,38 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "description": "Attaches a service project to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", // "httpMethod": "POST", - // "id": "apphub.projects.locations.operations.cancel", + // "id": "apphub.projects.locations.serviceProjectAttachments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "parent": { + // "description": "Required. Value for parent.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "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" + // }, + // "serviceProjectAttachmentId": { + // "description": "Required. The service project attachment identifier must contain the project_id of the service project specified in the service_project_attachment.service_project field. Hint: \"projects/{project_id}\"", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+parent}/serviceProjectAttachments", // "request": { - // "$ref": "CancelOperationRequest" + // "$ref": "ServiceProjectAttachment" // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1947,32 +7385,47 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "apphub.projects.locations.operations.delete": +// method id "apphub.projects.locations.serviceProjectAttachments.delete": -type ProjectsLocationsOperationsDeleteCall struct { - s *Service +type ProjectsLocationsServiceProjectAttachmentsDeleteCall struct { + s *APIService 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`. +// Delete: Deletes a service project attached to the host project. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Delete(name string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { + c := &ProjectsLocationsServiceProjectAttachmentsDeleteCall{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 *ProjectsLocationsServiceProjectAttachmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1980,21 +7433,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2017,14 +7470,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2043,7 +7496,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2055,25 +7508,30 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Deletes a service project attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", // "httpMethod": "DELETE", - // "id": "apphub.projects.locations.operations.delete", + // "id": "apphub.projects.locations.serviceProjectAttachments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", // "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": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2082,10 +7540,10 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apphub.projects.locations.operations.get": +// method id "apphub.projects.locations.serviceProjectAttachments.get": -type ProjectsLocationsOperationsGetCall struct { - s *Service +type ProjectsLocationsServiceProjectAttachmentsGetCall struct { + s *APIService name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -2093,13 +7551,11 @@ type ProjectsLocationsOperationsGetCall struct { 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. +// Get: Gets a service project attached to the host project. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Value for name. +func (r *ProjectsLocationsServiceProjectAttachmentsService) Get(name string) *ProjectsLocationsServiceProjectAttachmentsGetCall { + c := &ProjectsLocationsServiceProjectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2107,7 +7563,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2117,7 +7573,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2125,21 +7581,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2165,14 +7621,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "apphub.projects.locations.serviceProjectAttachments.get" call. +// Exactly one of *ServiceProjectAttachment or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ServiceProjectAttachment.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceProjectAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2191,7 +7647,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ServiceProjectAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2203,25 +7659,25 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets a service project attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments/{serviceProjectAttachmentsId}", // "httpMethod": "GET", - // "id": "apphub.projects.locations.operations.get", + // "id": "apphub.projects.locations.serviceProjectAttachments.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Value for name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceProjectAttachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "ServiceProjectAttachment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2230,45 +7686,50 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "apphub.projects.locations.operations.list": +// method id "apphub.projects.locations.serviceProjectAttachments.list": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string +type ProjectsLocationsServiceProjectAttachmentsListCall struct { + s *APIService + parent 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`. +// List: List service projects attached to the host project. // -// - 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 +// - parent: Value for parent. +func (r *ProjectsLocationsServiceProjectAttachmentsService) List(parent string) *ProjectsLocationsServiceProjectAttachmentsListCall { + c := &ProjectsLocationsServiceProjectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Filter(filter string) *ProjectsLocationsServiceProjectAttachmentsListCall { 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 { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceProjectAttachmentsListCall { + 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 *ProjectsLocationsServiceProjectAttachmentsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceProjectAttachmentsListCall { 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 { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageToken(pageToken string) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2276,7 +7737,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2286,7 +7747,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2294,21 +7755,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2321,7 +7782,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceProjectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2329,19 +7790,20 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apphub.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apphub.projects.locations.serviceProjectAttachments.list" call. +// Exactly one of *ListServiceProjectAttachmentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListServiceProjectAttachmentsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListServiceProjectAttachmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2360,7 +7822,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &ListServiceProjectAttachmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2372,41 +7834,46 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "List service projects attached to the host project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceProjectAttachments", // "httpMethod": "GET", - // "id": "apphub.projects.locations.operations.list", + // "id": "apphub.projects.locations.serviceProjectAttachments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "Optional. Filtering results", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Optional. Hint for how to order the results", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "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": "The standard list page token.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Value for parent.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/serviceProjectAttachments", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "ListServiceProjectAttachmentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2418,7 +7885,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Pages(ctx context.Context, f func(*ListServiceProjectAttachmentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/apphub/v1alpha/apphub-api.json b/apphub/v1alpha/apphub-api.json index 898ebc36ac7..d1d3f3ff4b2 100644 --- a/apphub/v1alpha/apphub-api.json +++ b/apphub/v1alpha/apphub-api.json @@ -242,7 +242,7 @@ ], "parameters": { "applicationId": { - "description": "Required. The Application identifier.", + "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" }, @@ -523,7 +523,7 @@ "type": "string" }, "serviceId": { - "description": "Required. The Service identifier.", + "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" } @@ -705,7 +705,7 @@ "type": "string" }, "workloadId": { - "description": "Required. The Workload identifier.", + "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", "location": "query", "type": "string" } @@ -867,52 +867,6 @@ }, "discoveredServices": { "methods": { - "find": { - "description": "Finds discovered services that could be added to an application in a host project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:find", - "httpMethod": "GET", - "id": "apphub.projects.locations.discoveredServices.find", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. 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. Value for parent.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/discoveredServices:find", - "response": { - "$ref": "FindDiscoveredServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "findUnregistered": { "description": "Finds unregistered services in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:findUnregistered", @@ -985,7 +939,7 @@ ] }, "list": { - "description": "Lists discovered services in a host project and location.", + "description": "Lists discovered services that can be added to an application in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices", "httpMethod": "GET", "id": "apphub.projects.locations.discoveredServices.list", @@ -1034,52 +988,6 @@ }, "discoveredWorkloads": { "methods": { - "find": { - "description": "Finds discovered workloads that could be added to an application in a host project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:find", - "httpMethod": "GET", - "id": "apphub.projects.locations.discoveredWorkloads.find", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. 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. Value for parent.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/discoveredWorkloads:find", - "response": { - "$ref": "FindDiscoveredWorkloadsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "findUnregistered": { "description": "Finds unregistered workloads in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:findUnregistered", @@ -1152,7 +1060,7 @@ ] }, "list": { - "description": "Lists discovered workloads in a host project and location.", + "description": "Lists discovered workloads that can be added to an application in a host project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", "httpMethod": "GET", "id": "apphub.projects.locations.discoveredWorkloads.list", @@ -1470,7 +1378,7 @@ } } }, - "revision": "20240125", + "revision": "20240217", "rootUrl": "https://apphub.googleapis.com/", "schemas": { "Application": { @@ -1488,11 +1396,11 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of an Application.", + "description": "Optional. User-defined description of an Application. Can have a maximum length of 2048 characters.", "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Application.", + "description": "Optional. User-defined name for the Application. Can have a maximum length of 63 characters.", "type": "string" }, "name": { @@ -1666,7 +1574,7 @@ "description": "Optional. Communication channel of the contacts." }, "displayName": { - "description": "Optional. Contact's name.", + "description": "Optional. Contact's name. Can have a maximum length of 63 characters.", "type": "string" }, "email": { @@ -1681,12 +1589,30 @@ "id": "Criticality", "properties": { "level": { - "description": "Required. Criticality level.", + "description": "Optional. Criticality level. Can contain only lowercase letters, numeric characters, underscores, and dashes. Can have a maximum length of 63 characters.", "type": "string" }, "missionCritical": { - "description": "Required. Indicates mission-critical Application, Service, or Workload.", + "description": "Optional. Indicates mission-critical Application, Service, or Workload.", "type": "boolean" + }, + "type": { + "description": "Required. Criticality Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "MISSION_CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified type.", + "Mission critical service, application or workload.", + "High impact.", + "Medium impact.", + "Low impact." + ], + "type": "string" } }, "type": "object" @@ -1756,7 +1682,25 @@ "id": "Environment", "properties": { "environment": { - "description": "Required. Environment name.", + "description": "Optional. Environment name. Can contain only lowercase letters, numeric characters, underscores, and dashes. Can have a maximum length of 63 characters.", + "type": "string" + }, + "type": { + "description": "Required. Environment Type.", + "enum": [ + "TYPE_UNSPECIFIED", + "PRODUCTION", + "STAGING", + "TEST", + "DEVELOPMENT" + ], + "enumDescriptions": [ + "Unspecified type.", + "Production environment.", + "Staging environment.", + "Test environment.", + "Development environment." + ], "type": "string" } }, @@ -1785,56 +1729,6 @@ }, "type": "object" }, - "FindDiscoveredServicesResponse": { - "description": "Response for FindDiscoveredServices.", - "id": "FindDiscoveredServicesResponse", - "properties": { - "discoveredServices": { - "description": "List of discovered services.", - "items": { - "$ref": "DiscoveredService" - }, - "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" - }, - "FindDiscoveredWorkloadsResponse": { - "description": "Response for FindDiscoveredWorkloads.", - "id": "FindDiscoveredWorkloadsResponse", - "properties": { - "discoveredWorkloads": { - "description": "List of discovered workloads.", - "items": { - "$ref": "DiscoveredWorkload" - }, - "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" - }, "FindUnregisteredServicesResponse": { "description": "Response for FindUnregisteredServices.", "id": "FindUnregisteredServicesResponse", @@ -2260,7 +2154,7 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of a Service.", + "description": "Optional. User-defined description of a Service. Can have a maximum length of 2048 characters.", "type": "string" }, "discoveredService": { @@ -2268,7 +2162,7 @@ "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Service.", + "description": "Optional. User-defined name for the Service. Can have a maximum length of 63 characters.", "type": "string" }, "name": { @@ -2486,7 +2380,7 @@ "type": "string" }, "description": { - "description": "Optional. User-defined description of a Workload.", + "description": "Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.", "type": "string" }, "discoveredWorkload": { @@ -2494,7 +2388,7 @@ "type": "string" }, "displayName": { - "description": "Optional. User-defined name for the Workload.", + "description": "Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.", "type": "string" }, "name": { diff --git a/apphub/v1alpha/apphub-gen.go b/apphub/v1alpha/apphub-gen.go index 4ec99d812fe..630658f8536 100644 --- a/apphub/v1alpha/apphub-gen.go +++ b/apphub/v1alpha/apphub-gen.go @@ -272,9 +272,11 @@ type Application struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. User-defined description of an Application. + // Can have a maximum length of 2048 characters. Description string `json:"description,omitempty"` - // DisplayName: Optional. User-defined name for the Application. + // DisplayName: Optional. User-defined name for the Application. Can + // have a maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of an Application. Format: @@ -621,7 +623,8 @@ type ContactInfo struct { // Channel: Optional. Communication channel of the contacts. Channel *Channel `json:"channel,omitempty"` - // DisplayName: Optional. Contact's name. + // DisplayName: Optional. Contact's name. Can have a maximum length of + // 63 characters. DisplayName string `json:"displayName,omitempty"` // Email: Required. Email address of the contacts. @@ -652,13 +655,26 @@ func (s *ContactInfo) MarshalJSON() ([]byte, error) { // Criticality: Criticality of the Application, Service, or Workload type Criticality struct { - // Level: Required. Criticality level. + // Level: Optional. Criticality level. Can contain only lowercase + // letters, numeric characters, underscores, and dashes. Can have a + // maximum length of 63 characters. Level string `json:"level,omitempty"` - // MissionCritical: Required. Indicates mission-critical Application, + // MissionCritical: Optional. Indicates mission-critical Application, // Service, or Workload. MissionCritical bool `json:"missionCritical,omitempty"` + // Type: Required. Criticality Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "MISSION_CRITICAL" - Mission critical service, application or + // workload. + // "HIGH" - High impact. + // "MEDIUM" - Medium impact. + // "LOW" - Low impact. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Level") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -799,9 +815,21 @@ type Empty struct { // Environment: Environment of the Application, Service, or Workload type Environment struct { - // Environment: Required. Environment name. + // Environment: Optional. Environment name. Can contain only lowercase + // letters, numeric characters, underscores, and dashes. Can have a + // maximum length of 63 characters. Environment string `json:"environment,omitempty"` + // Type: Required. Environment Type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type. + // "PRODUCTION" - Production environment. + // "STAGING" - Staging environment. + // "TEST" - Test environment. + // "DEVELOPMENT" - Development environment. + Type string `json:"type,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. However, any @@ -885,87 +913,6 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FindDiscoveredServicesResponse: Response for FindDiscoveredServices. -type FindDiscoveredServicesResponse struct { - // DiscoveredServices: List of discovered services. - DiscoveredServices []*DiscoveredService `json:"discoveredServices,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. "DiscoveredServices") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiscoveredServices") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *FindDiscoveredServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod FindDiscoveredServicesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FindDiscoveredWorkloadsResponse: Response for -// FindDiscoveredWorkloads. -type FindDiscoveredWorkloadsResponse struct { - // DiscoveredWorkloads: List of discovered workloads. - DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,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. "DiscoveredWorkloads") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiscoveredWorkloads") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *FindDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) { - type NoMethod FindDiscoveredWorkloadsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // FindUnregisteredServicesResponse: Response for // FindUnregisteredServices. type FindUnregisteredServicesResponse struct { @@ -1712,14 +1659,16 @@ type Service struct { // CreateTime: Output only. Create time. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. User-defined description of a Service. + // Description: Optional. User-defined description of a Service. Can + // have a maximum length of 2048 characters. Description string `json:"description,omitempty"` // DiscoveredService: Required. Immutable. The resource name of the // original discovered service. DiscoveredService string `json:"discoveredService,omitempty"` - // DisplayName: Optional. User-defined name for the Service. + // DisplayName: Optional. User-defined name for the Service. Can have a + // maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of a Service. Format: @@ -2074,14 +2023,16 @@ type Workload struct { // CreateTime: Output only. Create time. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. User-defined description of a Workload. + // Description: Optional. User-defined description of a Workload. Can + // have a maximum length of 2048 characters. Description string `json:"description,omitempty"` // DiscoveredWorkload: Required. Immutable. The resource name of the // original discovered workload. DiscoveredWorkload string `json:"discoveredWorkload,omitempty"` - // DisplayName: Optional. User-defined name for the Workload. + // DisplayName: Optional. User-defined name for the Workload. Can have a + // maximum length of 63 characters. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The resource name of the Workload. Format: @@ -2879,7 +2830,9 @@ func (r *ProjectsLocationsApplicationsService) Create(parent string, application } // ApplicationId sets the optional parameter "applicationId": Required. -// The Application identifier. +// The Application identifier. Must contain only lowercase letters, +// numbers or hyphens, with the first character a letter, the last a +// letter or a number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall { c.urlParams_.Set("applicationId", applicationId) return c @@ -3003,7 +2956,7 @@ func (c *ProjectsLocationsApplicationsCreateCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "applicationId": { - // "description": "Required. The Application identifier.", + // "description": "Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // }, @@ -4250,7 +4203,9 @@ func (c *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId st } // ServiceId sets the optional parameter "serviceId": Required. The -// Service identifier. +// Service identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall { c.urlParams_.Set("serviceId", serviceId) return c @@ -4368,7 +4323,7 @@ func (c *ProjectsLocationsApplicationsServicesCreateCall) Do(opts ...googleapi.C // "type": "string" // }, // "serviceId": { - // "description": "Required. The Service identifier.", + // "description": "Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // } @@ -5131,7 +5086,9 @@ func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId s } // WorkloadId sets the optional parameter "workloadId": Required. The -// Workload identifier. +// Workload identifier. Must contain only lowercase letters, numbers or +// hyphens, with the first character a letter, the last a letter or a +// number, and a 63 character maximum. func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall { c.urlParams_.Set("workloadId", workloadId) return c @@ -5249,7 +5206,7 @@ func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Do(opts ...googleapi. // "type": "string" // }, // "workloadId": { - // "description": "Required. The Workload identifier.", + // "description": "Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum.", // "location": "query", // "type": "string" // } @@ -5972,223 +5929,6 @@ func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Do(opts ...googleapi.C } -// method id "apphub.projects.locations.discoveredServices.find": - -type ProjectsLocationsDiscoveredServicesFindCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Find: Finds discovered services that could be added to an application -// in a host project and location. -// -// - parent: Value for parent. -func (r *ProjectsLocationsDiscoveredServicesService) Find(parent string) *ProjectsLocationsDiscoveredServicesFindCall { - c := &ProjectsLocationsDiscoveredServicesFindCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsDiscoveredServicesFindCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesFindCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsDiscoveredServicesFindCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesFindCall { - 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 *ProjectsLocationsDiscoveredServicesFindCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesFindCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesFindCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDiscoveredServicesFindCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesFindCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesFindCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDiscoveredServicesFindCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices:find") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "apphub.projects.locations.discoveredServices.find" call. -// Exactly one of *FindDiscoveredServicesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FindDiscoveredServicesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Do(opts ...googleapi.CallOption) (*FindDiscoveredServicesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &FindDiscoveredServicesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Finds discovered services that could be added to an application in a host project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices:find", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.discoveredServices.find", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filtering results", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. 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. Value for parent.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/discoveredServices:find", - // "response": { - // "$ref": "FindDiscoveredServicesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDiscoveredServicesFindCall) Pages(ctx context.Context, f func(*FindDiscoveredServicesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - // method id "apphub.projects.locations.discoveredServices.findUnregistered": type ProjectsLocationsDiscoveredServicesFindUnregisteredCall struct { @@ -6563,7 +6303,8 @@ type ProjectsLocationsDiscoveredServicesListCall struct { header_ http.Header } -// List: Lists discovered services in a host project and location. +// List: Lists discovered services that can be added to an application +// in a host project and location. // // - parent: Value for parent. func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall { @@ -6699,7 +6440,7 @@ func (c *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists discovered services in a host project and location.", + // "description": "Lists discovered services that can be added to an application in a host project and location.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredServices", // "httpMethod": "GET", // "id": "apphub.projects.locations.discoveredServices.list", @@ -6768,223 +6509,6 @@ func (c *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, } } -// method id "apphub.projects.locations.discoveredWorkloads.find": - -type ProjectsLocationsDiscoveredWorkloadsFindCall struct { - s *APIService - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Find: Finds discovered workloads that could be added to an -// application in a host project and location. -// -// - parent: Value for parent. -func (r *ProjectsLocationsDiscoveredWorkloadsService) Find(parent string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c := &ProjectsLocationsDiscoveredWorkloadsFindCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsFindCall { - 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 *ProjectsLocationsDiscoveredWorkloadsFindCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsFindCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads:find") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "apphub.projects.locations.discoveredWorkloads.find" call. -// Exactly one of *FindDiscoveredWorkloadsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FindDiscoveredWorkloadsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Do(opts ...googleapi.CallOption) (*FindDiscoveredWorkloadsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &FindDiscoveredWorkloadsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Finds discovered workloads that could be added to an application in a host project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads:find", - // "httpMethod": "GET", - // "id": "apphub.projects.locations.discoveredWorkloads.find", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filtering results", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. 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. Value for parent.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/discoveredWorkloads:find", - // "response": { - // "$ref": "FindDiscoveredWorkloadsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDiscoveredWorkloadsFindCall) Pages(ctx context.Context, f func(*FindDiscoveredWorkloadsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - // method id "apphub.projects.locations.discoveredWorkloads.findUnregistered": type ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall struct { @@ -7360,7 +6884,8 @@ type ProjectsLocationsDiscoveredWorkloadsListCall struct { header_ http.Header } -// List: Lists discovered workloads in a host project and location. +// List: Lists discovered workloads that can be added to an application +// in a host project and location. // // - parent: Value for parent. func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall { @@ -7496,7 +7021,7 @@ func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists discovered workloads in a host project and location.", + // "description": "Lists discovered workloads that can be added to an application in a host project and location.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/discoveredWorkloads", // "httpMethod": "GET", // "id": "apphub.projects.locations.discoveredWorkloads.list", diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index 7d44f817a09..7a33255c6ff 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -1638,7 +1638,7 @@ } } }, - "revision": "20231130", + "revision": "20240214", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { @@ -3561,13 +3561,15 @@ "VOLUME_PERFORMANCE_TIER_UNSPECIFIED", "VOLUME_PERFORMANCE_TIER_SHARED", "VOLUME_PERFORMANCE_TIER_ASSIGNED", - "VOLUME_PERFORMANCE_TIER_HT" + "VOLUME_PERFORMANCE_TIER_HT", + "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" ], "enumDescriptions": [ "Value is not specified.", "Regular volumes, shared aggregates.", "Assigned aggregates.", - "High throughput aggregates." + "High throughput aggregates.", + "QoS 2.0 high performance storage." ], "type": "string" }, @@ -3719,13 +3721,15 @@ "VOLUME_PERFORMANCE_TIER_UNSPECIFIED", "VOLUME_PERFORMANCE_TIER_SHARED", "VOLUME_PERFORMANCE_TIER_ASSIGNED", - "VOLUME_PERFORMANCE_TIER_HT" + "VOLUME_PERFORMANCE_TIER_HT", + "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" ], "enumDescriptions": [ "Value is not specified.", "Regular volumes, shared aggregates.", "Assigned aggregates.", - "High throughput aggregates." + "High throughput aggregates.", + "QoS 2.0 high performance storage." ], "type": "string" }, diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index c6d31a2aca2..0c661e9bc46 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -2867,6 +2867,8 @@ type Volume struct { // aggregates. // "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates. // "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates. + // "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" - QoS 2.0 high + // performance storage. PerformanceTier string `json:"performanceTier,omitempty"` // Pod: Immutable. Pod name. Pod is an independent part of @@ -2999,6 +3001,8 @@ type VolumeConfig struct { // aggregates. // "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates. // "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates. + // "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" - QoS 2.0 high + // performance storage. PerformanceTier string `json:"performanceTier,omitempty"` // Protocol: Volume protocol. diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index bbe844f5f72..7fce374cb98 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240202", + "revision": "20240206", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1358,7 +1358,7 @@ "type": "array" }, "uid": { - "description": "Output only. A system generated unique ID (in UUID4 format) for the Job.", + "description": "Output only. A system generated unique ID for the Job.", "readOnly": true, "type": "string" }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 7dedb0c47fc..1535492b677 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1548,8 +1548,7 @@ type Job struct { // supported now. TaskGroups []*TaskGroup `json:"taskGroups,omitempty"` - // Uid: Output only. A system generated unique ID (in UUID4 format) for - // the Job. + // Uid: Output only. A system generated unique ID for the Job. Uid string `json:"uid,omitempty"` // UpdateTime: Output only. The last time the Job was updated. diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index c6683db7d18..f9b803d983f 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -1804,7 +1804,7 @@ } } }, - "revision": "20240103", + "revision": "20240207", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3131,7 +3131,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index f31147f43a3..367f21f819c 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -2267,7 +2267,11 @@ type GoogleIamV1Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 62eb4812a11..557d366aab9 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -3716,7 +3716,7 @@ } } }, - "revision": "20240103", + "revision": "20240207", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -5931,7 +5931,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 1c13493cb74..f022b04a439 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -3685,7 +3685,11 @@ type GoogleIamV1Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index b1c61069651..f179126c8d7 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1844,7 +1844,7 @@ } } }, - "revision": "20240124", + "revision": "20240211", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3106,7 +3106,7 @@ }, "externalDatasetReference": { "$ref": "ExternalDatasetReference", - "description": "Optional. Information about the external metadata storage where the dataset is defined. Filled out when the dataset type is EXTERNAL." + "description": "Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL." }, "friendlyName": { "description": "Optional. A descriptive name for the dataset.", @@ -3153,6 +3153,11 @@ "format": "int64", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "satisfiesPzs": { "description": "Output only. Reserved for future use.", "readOnly": true, @@ -4359,8 +4364,8 @@ "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW", "NOT_SUPPORTED_IN_STANDARD_EDITION", "INDEX_SUPPRESSED_BY_FUNCTION_OPTION", - "INTERNAL_ERROR", "QUERY_CACHE_HIT", + "INTERNAL_ERROR", "OTHER_REASON" ], "enumDescriptions": [ @@ -4378,11 +4383,11 @@ "Indicates that the search index and the search function call do not have the same text analyzer.", "Indicates the base table is too small (below a certain threshold). The index does not provide noticeable search performance gains when the base table is too small.", "Indicates that the total size of indexed base tables in your organization exceeds your region's limit and the index is not used in the query. To index larger base tables, you can use your own reservation for index-management jobs.", - "Indicates that the esitmated performance gain from using the search index is too low for the given search query.", + "Indicates that the estimated performance gain from using the search index is too low for the given search query.", "Indicates that search indexes can not be used for search query with STANDARD edition.", "Indicates that an option in the search function that cannot make use of the index has been selected.", - "Indicates an internal error that causes the search index to be unused.", "Indicates that the query was cached, and thus the search index was not used.", + "Indicates an internal error that causes the search index to be unused.", "Indicates that the reason search indexes cannot be used in the query is not covered by any of the other IndexUnusedReason options." ], "type": "string" @@ -4733,6 +4738,10 @@ }, "type": "array" }, + "copyFilesOnly": { + "description": "Optional. [Experimental] Configures the load job to only copy files to the destination BigLake managed table with an external storage_uri, without reading file content and writing them to new files. Copying files only is supported when: * source_uris are in the same external storage system as the destination table but they do not overlap with storage_uri of the destination table. * source_format is the same file format as the destination table. * destination_table is an existing BigLake managed table. Its schema does not have default value expression. It schema does not have type parameters other than precision and scale. * No options other than the above are specified.", + "type": "boolean" + }, "createDisposition": { "description": "Optional. Specifies whether the job is allowed to create new tables. The following values are supported: * CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. * CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.", "type": "string" @@ -5620,7 +5629,7 @@ }, "vectorSearchStatistics": { "$ref": "VectorSearchStatistics", - "description": "Output only. Search query specific statistics.", + "description": "Output only. Vector Search query specific statistics.", "readOnly": true } }, diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 25233098be6..26a28ed0d2d 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -2418,9 +2418,9 @@ type Dataset struct { // Etag: Output only. A hash of the resource. Etag string `json:"etag,omitempty"` - // ExternalDatasetReference: Optional. Information about the external - // metadata storage where the dataset is defined. Filled out when the - // dataset type is EXTERNAL. + // ExternalDatasetReference: Optional. Reference to a read-only external + // dataset defined in data catalogs outside of BigQuery. Filled out when + // the dataset type is EXTERNAL. ExternalDatasetReference *ExternalDatasetReference `json:"externalDatasetReference,omitempty"` // FriendlyName: Optional. A descriptive name for the dataset. @@ -2467,6 +2467,9 @@ type Dataset struct { // default value is 168 hours if this is not set. MaxTimeTravelHours int64 `json:"maxTimeTravelHours,omitempty,string"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` @@ -4525,7 +4528,7 @@ type IndexUnusedReason struct { // base tables in your organization exceeds your region's limit and the // index is not used in the query. To index larger base tables, you can // use your own reservation for index-management jobs. - // "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW" - Indicates that the esitmated + // "ESTIMATED_PERFORMANCE_GAIN_TOO_LOW" - Indicates that the estimated // performance gain from using the search index is too low for the given // search query. // "NOT_SUPPORTED_IN_STANDARD_EDITION" - Indicates that search indexes @@ -4533,10 +4536,10 @@ type IndexUnusedReason struct { // "INDEX_SUPPRESSED_BY_FUNCTION_OPTION" - Indicates that an option in // the search function that cannot make use of the index has been // selected. - // "INTERNAL_ERROR" - Indicates an internal error that causes the - // search index to be unused. // "QUERY_CACHE_HIT" - Indicates that the query was cached, and thus // the search index was not used. + // "INTERNAL_ERROR" - Indicates an internal error that causes the + // search index to be unused. // "OTHER_REASON" - Indicates that the reason search indexes cannot be // used in the query is not covered by any of the other // IndexUnusedReason options. @@ -5101,6 +5104,19 @@ type JobConfigurationLoad struct { // appearing as the dataset id. ConnectionProperties []*ConnectionProperty `json:"connectionProperties,omitempty"` + // CopyFilesOnly: Optional. [Experimental] Configures the load job to + // only copy files to the destination BigLake managed table with an + // external storage_uri, without reading file content and writing them + // to new files. Copying files only is supported when: * source_uris are + // in the same external storage system as the destination table but they + // do not overlap with storage_uri of the destination table. * + // source_format is the same file format as the destination table. * + // destination_table is an existing BigLake managed table. Its schema + // does not have default value expression. It schema does not have type + // parameters other than precision and scale. * No options other than + // the above are specified. + CopyFilesOnly bool `json:"copyFilesOnly,omitempty"` + // CreateDisposition: Optional. Specifies whether the job is allowed to // create new tables. The following values are supported: * // CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the @@ -6315,7 +6331,7 @@ type JobStatistics2 struct { // undeclared query parameters detected during a dry run validation. UndeclaredQueryParameters []*QueryParameter `json:"undeclaredQueryParameters,omitempty"` - // VectorSearchStatistics: Output only. Search query specific + // VectorSearchStatistics: Output only. Vector Search query specific // statistics. VectorSearchStatistics *VectorSearchStatistics `json:"vectorSearchStatistics,omitempty"` diff --git a/bigqueryreservation/v1/bigqueryreservation-api.json b/bigqueryreservation/v1/bigqueryreservation-api.json index 8eed5b840b3..dcee28a13ab 100644 --- a/bigqueryreservation/v1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1/bigqueryreservation-api.json @@ -23,6 +23,26 @@ "description": "Regional Endpoint", "endpointUrl": "https://bigqueryreservation.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigqueryreservation.us-west1.rep.googleapis.com/", + "location": "us-west1" } ], "fullyEncodeReservedExpansion": true, @@ -831,7 +851,7 @@ } } }, - "revision": "20230928", + "revision": "20240217", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index b20ce636894..f7be4a42ea6 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -706,7 +706,7 @@ } } }, - "revision": "20240119", + "revision": "20240209", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -810,7 +810,7 @@ "id": "AttestationSource", "properties": { "containerAnalysisAttestationProjects": { - "description": "The IDs of the GCP projects storing the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.", + "description": "The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.", "items": { "type": "string" }, @@ -913,6 +913,10 @@ "$ref": "ImageFreshnessCheck", "description": "Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time." }, + "sigstoreSignatureCheck": { + "$ref": "SigstoreSignatureCheck", + "description": "Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry." + }, "simpleSigningAttestationCheck": { "$ref": "SimpleSigningAttestationCheck", "description": "Optional. Require a SimpleSigning-type attestation for every image in the deployment." @@ -1323,6 +1327,60 @@ }, "type": "object" }, + "SigstoreAuthority": { + "description": "A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.", + "id": "SigstoreAuthority", + "properties": { + "displayName": { + "description": "Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", + "type": "string" + }, + "publicKeySet": { + "$ref": "SigstorePublicKeySet", + "description": "Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature." + } + }, + "type": "object" + }, + "SigstorePublicKey": { + "description": "A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.", + "id": "SigstorePublicKey", + "properties": { + "publicKeyPem": { + "description": "The public key material in PEM format.", + "type": "string" + } + }, + "type": "object" + }, + "SigstorePublicKeySet": { + "description": "A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it.", + "id": "SigstorePublicKeySet", + "properties": { + "publicKeys": { + "description": "Required. `public_keys` must have at least one entry.", + "items": { + "$ref": "SigstorePublicKey" + }, + "type": "array" + } + }, + "type": "object" + }, + "SigstoreSignatureCheck": { + "description": "A Sigstore signature check, which verifies the Sigstore signature associated with an image.", + "id": "SigstoreSignatureCheck", + "properties": { + "sigstoreAuthorities": { + "description": "Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.", + "items": { + "$ref": "SigstoreAuthority" + }, + "type": "array" + } + }, + "type": "object" + }, "SimpleSigningAttestationCheck": { "description": "Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning.", "id": "SimpleSigningAttestationCheck", diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index e3d64f26a3b..1b2dbfe899e 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -422,9 +422,9 @@ func (s *AttestationOccurrence) MarshalJSON() ([]byte, error) { // AttestationSource: Specifies the locations for fetching the // provenance attestations. type AttestationSource struct { - // ContainerAnalysisAttestationProjects: The IDs of the GCP projects - // storing the SLSA attestations as Container Analysis Occurrences, in - // the format `projects/[PROJECT_ID]`. Maximum number of + // ContainerAnalysisAttestationProjects: The IDs of the Google Cloud + // projects that store the SLSA attestations as Container Analysis + // Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of // `container_analysis_attestation_projects` allowed in each // `AttestationSource` is 10. ContainerAnalysisAttestationProjects []string `json:"containerAnalysisAttestationProjects,omitempty"` @@ -694,6 +694,11 @@ type Check struct { // time. ImageFreshnessCheck *ImageFreshnessCheck `json:"imageFreshnessCheck,omitempty"` + // SigstoreSignatureCheck: Optional. Require that an image was signed by + // Cosign with a trusted key. This check requires that both the image + // and signature are stored in Artifact Registry. + SigstoreSignatureCheck *SigstoreSignatureCheck `json:"sigstoreSignatureCheck,omitempty"` + // SimpleSigningAttestationCheck: Optional. Require a SimpleSigning-type // attestation for every image in the deployment. SimpleSigningAttestationCheck *SimpleSigningAttestationCheck `json:"simpleSigningAttestationCheck,omitempty"` @@ -1583,6 +1588,135 @@ func (s *Signature) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SigstoreAuthority: A Sigstore authority, used to verify signatures +// that are created by Sigstore. An authority is analogous to an +// attestation authenticator, verifying that a signature is valid or +// invalid. +type SigstoreAuthority struct { + // DisplayName: Optional. A user-provided name for this + // `SigstoreAuthority`. This field has no effect on the policy + // evaluation behavior except to improve readability of messages in + // evaluation results. + DisplayName string `json:"displayName,omitempty"` + + // PublicKeySet: Required. A simple set of public keys. A signature is + // considered valid if any keys in the set validate the signature. + PublicKeySet *SigstorePublicKeySet `json:"publicKeySet,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SigstoreAuthority) MarshalJSON() ([]byte, error) { + type NoMethod SigstoreAuthority + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstorePublicKey: A Sigstore public key. `SigstorePublicKey` is the +// public key material used to authenticate Sigstore signatures. +type SigstorePublicKey struct { + // PublicKeyPem: The public key material in PEM format. + PublicKeyPem string `json:"publicKeyPem,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicKeyPem") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKeyPem") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SigstorePublicKey) MarshalJSON() ([]byte, error) { + type NoMethod SigstorePublicKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstorePublicKeySet: A bundle of Sigstore public keys, used to +// verify Sigstore signatures. A signature is authenticated by a +// `SigstorePublicKeySet` if any of the keys verify it. +type SigstorePublicKeySet struct { + // PublicKeys: Required. `public_keys` must have at least one entry. + PublicKeys []*SigstorePublicKey `json:"publicKeys,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicKeys") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKeys") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SigstorePublicKeySet) MarshalJSON() ([]byte, error) { + type NoMethod SigstorePublicKeySet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SigstoreSignatureCheck: A Sigstore signature check, which verifies +// the Sigstore signature associated with an image. +type SigstoreSignatureCheck struct { + // SigstoreAuthorities: Required. The authorities required by this check + // to verify the signature. A signature only needs to be verified by one + // authority to pass the check. + SigstoreAuthorities []*SigstoreAuthority `json:"sigstoreAuthorities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SigstoreAuthorities") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SigstoreAuthorities") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SigstoreSignatureCheck) MarshalJSON() ([]byte, error) { + type NoMethod SigstoreSignatureCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SimpleSigningAttestationCheck: Require a signed DSSE // (https://github.com/secure-systems-lab/dsse) attestation with type // SimpleSigning. diff --git a/blockchainnodeengine/v1/blockchainnodeengine-api.json b/blockchainnodeengine/v1/blockchainnodeengine-api.json index 5796d39ed44..fc971e35591 100644 --- a/blockchainnodeengine/v1/blockchainnodeengine-api.json +++ b/blockchainnodeengine/v1/blockchainnodeengine-api.json @@ -487,7 +487,7 @@ } } }, - "revision": "20240124", + "revision": "20240207", "rootUrl": "https://blockchainnodeengine.googleapis.com/", "schemas": { "BlockchainNode": { @@ -960,6 +960,10 @@ "description": "Configuration for validator-related parameters on the beacon client, and for any GCP-managed validator client.", "id": "ValidatorConfig", "properties": { + "beaconFeeRecipient": { + "description": "An Ethereum address which the beacon client will send fee rewards to if no recipient is configured in the validator client. See https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html or https://docs.prylabs.network/docs/execution-node/fee-recipient for examples of how this is used. Note that while this is often described as \"suggested\", as we run the execution node we can trust the execution node, and therefore this is considered enforced.", + "type": "string" + }, "managedValidatorClient": { "description": "Immutable. When true, deploys a GCP-managed validator client alongside the beacon client.", "type": "boolean" diff --git a/blockchainnodeengine/v1/blockchainnodeengine-gen.go b/blockchainnodeengine/v1/blockchainnodeengine-gen.go index e743ee5c576..ecc6040b980 100644 --- a/blockchainnodeengine/v1/blockchainnodeengine-gen.go +++ b/blockchainnodeengine/v1/blockchainnodeengine-gen.go @@ -888,6 +888,16 @@ func (s *Status) MarshalJSON() ([]byte, error) { // ValidatorConfig: Configuration for validator-related parameters on // the beacon client, and for any GCP-managed validator client. type ValidatorConfig struct { + // BeaconFeeRecipient: An Ethereum address which the beacon client will + // send fee rewards to if no recipient is configured in the validator + // client. See + // https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html or + // https://docs.prylabs.network/docs/execution-node/fee-recipient for + // examples of how this is used. Note that while this is often described + // as "suggested", as we run the execution node we can trust the + // execution node, and therefore this is considered enforced. + BeaconFeeRecipient string `json:"beaconFeeRecipient,omitempty"` + // ManagedValidatorClient: Immutable. When true, deploys a GCP-managed // validator client alongside the beacon client. ManagedValidatorClient bool `json:"managedValidatorClient,omitempty"` @@ -897,19 +907,18 @@ type ValidatorConfig struct { // client. MevRelayUrls []string `json:"mevRelayUrls,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ManagedValidatorClient") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "BeaconFeeRecipient") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedValidatorClient") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "BeaconFeeRecipient") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. diff --git a/books/v1/books-api.json b/books/v1/books-api.json index 8cdf703d446..56896ff6d2c 100644 --- a/books/v1/books-api.json +++ b/books/v1/books-api.json @@ -1241,6 +1241,11 @@ "required": true, "type": "string" }, + "source": { + "description": "Optional. String to identify the originator of this request.", + "location": "query", + "type": "string" + }, "volumeId": { "description": "Volume id to get the summary for.", "location": "query", @@ -2672,7 +2677,7 @@ } } }, - "revision": "20230207", + "revision": "20240214", "rootUrl": "https://books.googleapis.com/", "schemas": { "Annotation": { diff --git a/books/v1/books-gen.go b/books/v1/books-gen.go index ff5ff826076..fbc9feaab05 100644 --- a/books/v1/books-gen.go +++ b/books/v1/books-gen.go @@ -9413,6 +9413,13 @@ func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string return c } +// Source sets the optional parameter "source": String to identify the +// originator of this request. +func (c *MylibraryAnnotationsSummaryCall) Source(source string) *MylibraryAnnotationsSummaryCall { + c.urlParams_.Set("source", source) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9512,6 +9519,11 @@ func (c *MylibraryAnnotationsSummaryCall) Do(opts ...googleapi.CallOption) (*Ann // "required": true, // "type": "string" // }, + // "source": { + // "description": "Optional. String to identify the originator of this request.", + // "location": "query", + // "type": "string" + // }, // "volumeId": { // "description": "Volume id to get the summary for.", // "location": "query", diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 8b1c18a92e6..14ac07a0fbb 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -1280,7 +1280,7 @@ } } }, - "revision": "20230906", + "revision": "20240209", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1646,6 +1646,20 @@ "description": "A user-defined name of the dns authorization. DnsAuthorization names must be unique globally and match pattern `projects/*/locations/*/dnsAuthorizations/*`.", "type": "string" }, + "type": { + "description": "Immutable. Type of DnsAuthorization. If unset during resource creation the following default will be used: - in location global: FIXED_RECORD.", + "enum": [ + "TYPE_UNSPECIFIED", + "FIXED_RECORD", + "PER_PROJECT_RECORD" + ], + "enumDescriptions": [ + "Type is unspecified.", + "FIXED_RECORD DNS authorization uses DNS-01 validation method.", + "PER_PROJECT_RECORD DNS authorization allows for independent management of Google-managed certificates with DNS authorization across multiple projects." + ], + "type": "string" + }, "updateTime": { "description": "Output only. The last update timestamp of a DnsAuthorization.", "format": "google-datetime", diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 73b0aafbaaa..25ac9600a9a 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -704,6 +704,19 @@ type DnsAuthorization struct { // `projects/*/locations/*/dnsAuthorizations/*`. Name string `json:"name,omitempty"` + // Type: Immutable. Type of DnsAuthorization. If unset during resource + // creation the following default will be used: - in location global: + // FIXED_RECORD. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type is unspecified. + // "FIXED_RECORD" - FIXED_RECORD DNS authorization uses DNS-01 + // validation method. + // "PER_PROJECT_RECORD" - PER_PROJECT_RECORD DNS authorization allows + // for independent management of Google-managed certificates with DNS + // authorization across multiple projects. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. The last update timestamp of a // DnsAuthorization. UpdateTime string `json:"updateTime,omitempty"` diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 9ffb3e8bf2f..3f4dd5e6d9a 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20231110", + "revision": "20240220", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -1340,9 +1340,9 @@ ], "enumDescriptions": [ "Health unknown.", - "Battery is healthy.", - "Battery is moderately unhealthy and should be replaced soon.", - "Battery is unhealthy and should be replaced." + "Battery is healthy, full charge capacity / design capacity \u003e 80%", + "Battery is moderately unhealthy and should be replaced soon, full charge capacity / design capacity 75% - 80%", + "Battery is unhealthy and should be replaced, full charge capacity / design capacity \u003c 75%" ], "readOnly": true, "type": "string" diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index f53599c3953..1bf45da3f9a 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -666,11 +666,12 @@ type GoogleChromeManagementV1BatteryStatusReport struct { // // Possible values: // "BATTERY_HEALTH_UNSPECIFIED" - Health unknown. - // "BATTERY_HEALTH_NORMAL" - Battery is healthy. + // "BATTERY_HEALTH_NORMAL" - Battery is healthy, full charge capacity + // / design capacity > 80% // "BATTERY_REPLACE_SOON" - Battery is moderately unhealthy and should - // be replaced soon. + // be replaced soon, full charge capacity / design capacity 75% - 80% // "BATTERY_REPLACE_NOW" - Battery is unhealthy and should be - // replaced. + // replaced, full charge capacity / design capacity < 75% BatteryHealth string `json:"batteryHealth,omitempty"` // CycleCount: Output only. Cycle count. diff --git a/cloudbuild/v2/cloudbuild-api.json b/cloudbuild/v2/cloudbuild-api.json index c66f1783887..90190643765 100644 --- a/cloudbuild/v2/cloudbuild-api.json +++ b/cloudbuild/v2/cloudbuild-api.json @@ -844,7 +844,7 @@ } } }, - "revision": "20240130", + "revision": "20240207", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "AuditConfig": { @@ -945,6 +945,65 @@ }, "type": "object" }, + "BitbucketCloudConfig": { + "description": "Configuration for connections to Bitbucket Cloud.", + "id": "BitbucketCloudConfig", + "properties": { + "authorizerCredential": { + "$ref": "UserCredential", + "description": "Required. An access token with the `webhook`, `repository`, `repository:admin` and `pullrequest` scope access. It can be either a workspace, project or repository access token. It's recommended to use a system account to generate these credentials." + }, + "readAuthorizerCredential": { + "$ref": "UserCredential", + "description": "Required. An access token with the `repository` access. It can be either a workspace, project or repository access token. It's recommended to use a system account to generate the credentials." + }, + "webhookSecretSecretVersion": { + "description": "Required. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "workspace": { + "description": "Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.", + "type": "string" + } + }, + "type": "object" + }, + "BitbucketDataCenterConfig": { + "description": "Configuration for connections to Bitbucket Data Center.", + "id": "BitbucketDataCenterConfig", + "properties": { + "authorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A http access token with the `REPO_ADMIN` scope access." + }, + "hostUri": { + "description": "Required. The URI of the Bitbucket Data Center instance or cluster this connection is for.", + "type": "string" + }, + "readAuthorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A http access token with the `REPO_READ` access." + }, + "serverVersion": { + "description": "Output only. Version of the Bitbucket Data Center running on the `host_uri`.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig", + "description": "Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center. This should only be set if the Bitbucket Data Center is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the Bitbucket Data Center will be made over the public internet." + }, + "sslCa": { + "description": "Optional. SSL certificate to use for requests to the Bitbucket Data Center.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -1008,7 +1067,7 @@ "type": "object" }, "Connection": { - "description": "A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center or GitLab.", + "description": "A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, Bitbucket Cloud or GitLab.", "id": "Connection", "properties": { "annotations": { @@ -1018,6 +1077,14 @@ "description": "Allows clients to store small amounts of arbitrary data.", "type": "object" }, + "bitbucketCloudConfig": { + "$ref": "BitbucketCloudConfig", + "description": "Configuration for connections to Bitbucket Cloud." + }, + "bitbucketDataCenterConfig": { + "$ref": "BitbucketDataCenterConfig", + "description": "Configuration for connections to Bitbucket Data Center." + }, "createTime": { "description": "Output only. Server assigned timestamp for when the connection was created.", "format": "google-datetime", @@ -1911,6 +1978,11 @@ "$ref": "Provenance", "description": "Optional. Provenance configuration." }, + "record": { + "description": "Output only. The `Record` of this `PipelineRun`. Format: `projects/{project}/locations/{location}/results/{result_id}/records/{record_id}`", + "readOnly": true, + "type": "string" + }, "resolvedPipelineSpec": { "$ref": "PipelineSpec", "description": "Output only. The exact PipelineSpec used to instantiate the run.", diff --git a/cloudbuild/v2/cloudbuild-gen.go b/cloudbuild/v2/cloudbuild-gen.go index 4f7e80f9ce6..4f87fc6ccf7 100644 --- a/cloudbuild/v2/cloudbuild-gen.go +++ b/cloudbuild/v2/cloudbuild-gen.go @@ -478,6 +478,116 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BitbucketCloudConfig: Configuration for connections to Bitbucket +// Cloud. +type BitbucketCloudConfig struct { + // AuthorizerCredential: Required. An access token with the `webhook`, + // `repository`, `repository:admin` and `pullrequest` scope access. It + // can be either a workspace, project or repository access token. It's + // recommended to use a system account to generate these credentials. + AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` + + // ReadAuthorizerCredential: Required. An access token with the + // `repository` access. It can be either a workspace, project or + // repository access token. It's recommended to use a system account to + // generate the credentials. + ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` + + // WebhookSecretSecretVersion: Required. SecretManager resource + // containing the webhook secret used to verify webhook events, + // formatted as `projects/*/secrets/*/versions/*`. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + + // Workspace: Required. The Bitbucket Cloud Workspace ID to be connected + // to Google Cloud Platform. + Workspace string `json:"workspace,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AuthorizerCredential") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthorizerCredential") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BitbucketCloudConfig) MarshalJSON() ([]byte, error) { + type NoMethod BitbucketCloudConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BitbucketDataCenterConfig: Configuration for connections to Bitbucket +// Data Center. +type BitbucketDataCenterConfig struct { + // AuthorizerCredential: Required. A http access token with the + // `REPO_ADMIN` scope access. + AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` + + // HostUri: Required. The URI of the Bitbucket Data Center instance or + // cluster this connection is for. + HostUri string `json:"hostUri,omitempty"` + + // ReadAuthorizerCredential: Required. A http access token with the + // `REPO_READ` access. + ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` + + // ServerVersion: Output only. Version of the Bitbucket Data Center + // running on the `host_uri`. + ServerVersion string `json:"serverVersion,omitempty"` + + // ServiceDirectoryConfig: Optional. Configuration for using Service + // Directory to privately connect to a Bitbucket Data Center. This + // should only be set if the Bitbucket Data Center is hosted on-premises + // and not reachable by public internet. If this field is left empty, + // calls to the Bitbucket Data Center will be made over the public + // internet. + ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + + // SslCa: Optional. SSL certificate to use for requests to the Bitbucket + // Data Center. + SslCa string `json:"sslCa,omitempty"` + + // WebhookSecretSecretVersion: Required. Immutable. SecretManager + // resource containing the webhook secret used to verify webhook events, + // formatted as `projects/*/secrets/*/versions/*`. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AuthorizerCredential") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthorizerCredential") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BitbucketDataCenterConfig) MarshalJSON() ([]byte, error) { + type NoMethod BitbucketDataCenterConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -560,11 +670,19 @@ func (s *ChildStatusReference) MarshalJSON() ([]byte, error) { } // Connection: A connection to a SCM like GitHub, GitHub Enterprise, -// Bitbucket Data Center or GitLab. +// Bitbucket Data Center, Bitbucket Cloud or GitLab. type Connection struct { // Annotations: Allows clients to store small amounts of arbitrary data. Annotations map[string]string `json:"annotations,omitempty"` + // BitbucketCloudConfig: Configuration for connections to Bitbucket + // Cloud. + BitbucketCloudConfig *BitbucketCloudConfig `json:"bitbucketCloudConfig,omitempty"` + + // BitbucketDataCenterConfig: Configuration for connections to Bitbucket + // Data Center. + BitbucketDataCenterConfig *BitbucketDataCenterConfig `json:"bitbucketDataCenterConfig,omitempty"` + // CreateTime: Output only. Server assigned timestamp for when the // connection was created. CreateTime string `json:"createTime,omitempty"` @@ -1938,6 +2056,11 @@ type PipelineRun struct { // Provenance: Optional. Provenance configuration. Provenance *Provenance `json:"provenance,omitempty"` + // Record: Output only. The `Record` of this `PipelineRun`. Format: + // `projects/{project}/locations/{location}/results/{result_id}/records/{ + // record_id}` + Record string `json:"record,omitempty"` + // ResolvedPipelineSpec: Output only. The exact PipelineSpec used to // instantiate the run. ResolvedPipelineSpec *PipelineSpec `json:"resolvedPipelineSpec,omitempty"` diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 2efa379967f..6b426a3259a 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -140,23 +140,23 @@ "parameterOrder": [], "parameters": { "filter": { - "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "description": "The standard list filter.", "location": "query", "type": "string" }, "name": { - "description": "Must not be set.", + "description": "The name of the operation's parent resource.", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "description": "The standard list page size.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "description": "The standard list page token.", "location": "query", "type": "string" } @@ -552,7 +552,7 @@ } } }, - "revision": "20240205", + "revision": "20240207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -666,8 +666,7 @@ "id": "CloudFunction", "properties": { "automaticUpdatePolicy": { - "$ref": "AutomaticUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "AutomaticUpdatePolicy" }, "availableMemoryMb": { "description": "The amount of memory in MB available for a function. Defaults to 256MB.", @@ -787,8 +786,7 @@ "type": "string" }, "onDeployUpdatePolicy": { - "$ref": "OnDeployUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "OnDeployUpdatePolicy" }, "runtime": { "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index 8d0eefb9479..df069fc1b2e 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -485,8 +485,6 @@ func (s *CallFunctionResponse) MarshalJSON() ([]byte, error) { // computation executed in response to an event. It encapsulate function // and triggers configurations. type CloudFunction struct { - // AutomaticUpdatePolicy: See the comment next to this message for more - // details. AutomaticUpdatePolicy *AutomaticUpdatePolicy `json:"automaticUpdatePolicy,omitempty"` // AvailableMemoryMb: The amount of memory in MB available for a @@ -632,8 +630,6 @@ type CloudFunction struct { // Network: Deprecated: use vpc_connector Network string `json:"network,omitempty"` - // OnDeployUpdatePolicy: See the comment next to this message for more - // details. OnDeployUpdatePolicy *OnDeployUpdatePolicy `json:"onDeployUpdatePolicy,omitempty"` // Runtime: The runtime in which to run the function. Required when @@ -2643,35 +2639,29 @@ func (r *OperationsService) List() *OperationsListCall { return c } -// Filter sets the optional parameter "filter": Required. A filter for -// matching the requested operations. The supported formats of *filter* -// are: To query for a specific function: -// project:*,location:*,function:* To query for all of the latest -// operations for a project: project:*,latest:true +// Filter sets the optional parameter "filter": The standard list +// filter. func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } -// Name sets the optional parameter "name": Must not be set. +// Name sets the optional parameter "name": The name of the operation's +// parent resource. func (c *OperationsListCall) Name(name string) *OperationsListCall { c.urlParams_.Set("name", name) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of records that should be returned. Requested page size cannot exceed -// 100. If not set, the default page size is 100. Pagination is only -// supported when querying for a specific function. +// PageSize sets the optional parameter "pageSize": The standard list +// page size. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Token identifying -// which result to start with, which is returned by a previous list -// call. Pagination is only supported when querying for a specific -// function. +// PageToken sets the optional parameter "pageToken": The standard list +// page token. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -2780,23 +2770,23 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsRe // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Must not be set.", + // "description": "The name of the operation's parent resource.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index e3024c557d3..3b35e6f2c94 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -639,25 +639,25 @@ ], "parameters": { "filter": { - "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "description": "The standard list filter.", "location": "query", "type": "string" }, "name": { - "description": "Must not be set.", + "description": "The name of the operation's parent resource.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, "pageSize": { - "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "description": "The standard list page size.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "description": "The standard list page token.", "location": "query", "type": "string" } @@ -711,7 +711,7 @@ } } }, - "revision": "20240205", + "revision": "20240207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -801,8 +801,7 @@ "id": "BuildConfig", "properties": { "automaticUpdatePolicy": { - "$ref": "AutomaticUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "AutomaticUpdatePolicy" }, "build": { "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", @@ -839,8 +838,7 @@ "type": "object" }, "onDeployUpdatePolicy": { - "$ref": "OnDeployUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "OnDeployUpdatePolicy" }, "runtime": { "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index a0878043dcf..4150d91e139 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -432,8 +432,6 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // BuildConfig: Describes the Build step of the function that builds a // container from the given source. type BuildConfig struct { - // AutomaticUpdatePolicy: See the comment next to this message for more - // details. AutomaticUpdatePolicy *AutomaticUpdatePolicy `json:"automaticUpdatePolicy,omitempty"` // Build: Output only. The Cloud Build name of the latest successful @@ -482,8 +480,6 @@ type BuildConfig struct { // for the function EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` - // OnDeployUpdatePolicy: See the comment next to this message for more - // details. OnDeployUpdatePolicy *OnDeployUpdatePolicy `json:"onDeployUpdatePolicy,omitempty"` // Runtime: The runtime in which to run the function. Required when @@ -5551,36 +5547,29 @@ type ProjectsLocationsOperationsListCall struct { // request. If the server doesn't support this method, it returns // `UNIMPLEMENTED`. // -// - name: Must not be set. +// - 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": Required. A filter for -// matching the requested operations. The supported formats of *filter* -// are: To query for a specific function: -// project:*,location:*,function:* To query for all of the latest -// operations for a project: project:*,latest:true +// 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 maximum number -// of records that should be returned. Requested page size cannot exceed -// 100. If not set, the default page size is 100. Pagination is only -// supported when querying for a specific function. +// 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": Token identifying -// which result to start with, which is returned by a previous list -// call. Pagination is only supported when querying for a specific -// function. +// 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 @@ -5694,25 +5683,25 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "filter": { - // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Must not be set.", + // "description": "The name of the operation's parent resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 3062b20fff0..bcd6b8f9b2e 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -639,25 +639,25 @@ ], "parameters": { "filter": { - "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "description": "The standard list filter.", "location": "query", "type": "string" }, "name": { - "description": "Must not be set.", + "description": "The name of the operation's parent resource.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, "pageSize": { - "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "description": "The standard list page size.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "description": "The standard list page token.", "location": "query", "type": "string" } @@ -711,7 +711,7 @@ } } }, - "revision": "20240205", + "revision": "20240207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -801,8 +801,7 @@ "id": "BuildConfig", "properties": { "automaticUpdatePolicy": { - "$ref": "AutomaticUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "AutomaticUpdatePolicy" }, "build": { "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", @@ -839,8 +838,7 @@ "type": "object" }, "onDeployUpdatePolicy": { - "$ref": "OnDeployUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "OnDeployUpdatePolicy" }, "runtime": { "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 126d1544b6d..c110da1f2d8 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -432,8 +432,6 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // BuildConfig: Describes the Build step of the function that builds a // container from the given source. type BuildConfig struct { - // AutomaticUpdatePolicy: See the comment next to this message for more - // details. AutomaticUpdatePolicy *AutomaticUpdatePolicy `json:"automaticUpdatePolicy,omitempty"` // Build: Output only. The Cloud Build name of the latest successful @@ -482,8 +480,6 @@ type BuildConfig struct { // for the function EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` - // OnDeployUpdatePolicy: See the comment next to this message for more - // details. OnDeployUpdatePolicy *OnDeployUpdatePolicy `json:"onDeployUpdatePolicy,omitempty"` // Runtime: The runtime in which to run the function. Required when @@ -5551,36 +5547,29 @@ type ProjectsLocationsOperationsListCall struct { // request. If the server doesn't support this method, it returns // `UNIMPLEMENTED`. // -// - name: Must not be set. +// - 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": Required. A filter for -// matching the requested operations. The supported formats of *filter* -// are: To query for a specific function: -// project:*,location:*,function:* To query for all of the latest -// operations for a project: project:*,latest:true +// 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 maximum number -// of records that should be returned. Requested page size cannot exceed -// 100. If not set, the default page size is 100. Pagination is only -// supported when querying for a specific function. +// 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": Token identifying -// which result to start with, which is returned by a previous list -// call. Pagination is only supported when querying for a specific -// function. +// 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 @@ -5694,25 +5683,25 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "filter": { - // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Must not be set.", + // "description": "The name of the operation's parent resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index b6ab296667e..9658beb241e 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -639,25 +639,25 @@ ], "parameters": { "filter": { - "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "description": "The standard list filter.", "location": "query", "type": "string" }, "name": { - "description": "Must not be set.", + "description": "The name of the operation's parent resource.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, "pageSize": { - "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "description": "The standard list page size.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "description": "The standard list page token.", "location": "query", "type": "string" } @@ -711,7 +711,7 @@ } } }, - "revision": "20240205", + "revision": "20240207", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -801,8 +801,7 @@ "id": "BuildConfig", "properties": { "automaticUpdatePolicy": { - "$ref": "AutomaticUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "AutomaticUpdatePolicy" }, "build": { "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", @@ -839,8 +838,7 @@ "type": "object" }, "onDeployUpdatePolicy": { - "$ref": "OnDeployUpdatePolicy", - "description": "See the comment next to this message for more details." + "$ref": "OnDeployUpdatePolicy" }, "runtime": { "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index dd696e0f871..7a37a487f22 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -432,8 +432,6 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // BuildConfig: Describes the Build step of the function that builds a // container from the given source. type BuildConfig struct { - // AutomaticUpdatePolicy: See the comment next to this message for more - // details. AutomaticUpdatePolicy *AutomaticUpdatePolicy `json:"automaticUpdatePolicy,omitempty"` // Build: Output only. The Cloud Build name of the latest successful @@ -482,8 +480,6 @@ type BuildConfig struct { // for the function EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` - // OnDeployUpdatePolicy: See the comment next to this message for more - // details. OnDeployUpdatePolicy *OnDeployUpdatePolicy `json:"onDeployUpdatePolicy,omitempty"` // Runtime: The runtime in which to run the function. Required when @@ -5551,36 +5547,29 @@ type ProjectsLocationsOperationsListCall struct { // request. If the server doesn't support this method, it returns // `UNIMPLEMENTED`. // -// - name: Must not be set. +// - 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": Required. A filter for -// matching the requested operations. The supported formats of *filter* -// are: To query for a specific function: -// project:*,location:*,function:* To query for all of the latest -// operations for a project: project:*,latest:true +// 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 maximum number -// of records that should be returned. Requested page size cannot exceed -// 100. If not set, the default page size is 100. Pagination is only -// supported when querying for a specific function. +// 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": Token identifying -// which result to start with, which is returned by a previous list -// call. Pagination is only supported when querying for a specific -// function. +// 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 @@ -5694,25 +5683,25 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "filter": { - // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, // "name": { - // "description": "Must not be set.", + // "description": "The name of the operation's parent resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index b9af895c932..9e98dd68486 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -2354,7 +2354,7 @@ } } }, - "revision": "20240122", + "revision": "20240207", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -3441,6 +3441,21 @@ "description": "Optional. Location of the custom connector spec.", "type": "string" }, + "state": { + "description": "Output only. State of the custom connector version.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DEPRECATED" + ], + "enumDescriptions": [ + "State Unspecified.", + "Active state. By default we set the state to Active.", + "Deprecated state." + ], + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "Output only. Updated time.", "format": "google-datetime", @@ -3651,9 +3666,9 @@ "CMEK" ], "enumDescriptions": [ - "Egress mode unspecified.", - "Network egress through auto assigned IPs.", - "Network egress through static IPs." + "Encryption type unspecified.", + "Google managed encryption keys", + "Customer managed encryption keys." ], "type": "string" }, diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 8d464a3ec75..098deee99a0 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1585,6 +1585,14 @@ type CustomConnectorVersion struct { // SpecLocation: Optional. Location of the custom connector spec. SpecLocation string `json:"specLocation,omitempty"` + // State: Output only. State of the custom connector version. + // + // Possible values: + // "STATE_UNSPECIFIED" - State Unspecified. + // "ACTIVE" - Active state. By default we set the state to Active. + // "DEPRECATED" - Deprecated state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -1951,9 +1959,9 @@ type EncryptionConfig struct { // EncryptionType: Optional. Encryption type for the region. // // Possible values: - // "ENCRYPTION_TYPE_UNSPECIFIED" - Egress mode unspecified. - // "GMEK" - Network egress through auto assigned IPs. - // "CMEK" - Network egress through static IPs. + // "ENCRYPTION_TYPE_UNSPECIFIED" - Encryption type unspecified. + // "GMEK" - Google managed encryption keys + // "CMEK" - Customer managed encryption keys. EncryptionType string `json:"encryptionType,omitempty"` // KmsKeyName: Optional. KMS crypto key. This field accepts identifiers diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index aaf1b763ca8..7e92c5e0497 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -404,7 +404,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. The attribute by which to order conversations in the response. If empty, conversations will be ordered by descending creation time. Supported values are one of the following: * create_time * duration * turn_count * latest_analysis The default sort order is ascending. To specify order, append `asc` or `desc`, i.e. `create_time desc`. See https://google.aip.dev/132#ordering for more details.", + "description": "Optional. The attribute by which to order conversations in the response. If empty, conversations will be ordered by descending creation time. Supported values are one of the following: * create_time * customer_satisfaction_rating * duration * latest_analysis * start_time * turn_count The default sort order is ascending. To specify order, append `asc` or `desc`, i.e. `create_time desc`. See https://google.aip.dev/132#ordering for more details.", "location": "query", "type": "string" }, @@ -1473,7 +1473,7 @@ } } }, - "revision": "20240206", + "revision": "20240212", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 09170979f9b..e062b4af8e8 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -9488,10 +9488,11 @@ func (c *ProjectsLocationsConversationsListCall) Filter(filter string) *Projects // OrderBy sets the optional parameter "orderBy": The attribute by which // to order conversations in the response. If empty, conversations will // be ordered by descending creation time. Supported values are one of -// the following: * create_time * duration * turn_count * -// latest_analysis The default sort order is ascending. To specify -// order, append `asc` or `desc`, i.e. `create_time desc`. See -// https://google.aip.dev/132#ordering for more details. +// the following: * create_time * customer_satisfaction_rating * +// duration * latest_analysis * start_time * turn_count The default sort +// order is ascending. To specify order, append `asc` or `desc`, i.e. +// `create_time desc`. See https://google.aip.dev/132#ordering for more +// details. func (c *ProjectsLocationsConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsConversationsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -9651,7 +9652,7 @@ func (c *ProjectsLocationsConversationsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "orderBy": { - // "description": "Optional. The attribute by which to order conversations in the response. If empty, conversations will be ordered by descending creation time. Supported values are one of the following: * create_time * duration * turn_count * latest_analysis The default sort order is ascending. To specify order, append `asc` or `desc`, i.e. `create_time desc`. See https://google.aip.dev/132#ordering for more details.", + // "description": "Optional. The attribute by which to order conversations in the response. If empty, conversations will be ordered by descending creation time. Supported values are one of the following: * create_time * customer_satisfaction_rating * duration * latest_analysis * start_time * turn_count The default sort order is ascending. To specify order, append `asc` or `desc`, i.e. `create_time desc`. See https://google.aip.dev/132#ordering for more details.", // "location": "query", // "type": "string" // }, diff --git a/container/v1/container-api.json b/container/v1/container-api.json index b9c73429c53..7824cdf89b5 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240116", + "revision": "20240206", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5165,6 +5165,10 @@ "description": "Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 'pd-standard'", "type": "string" }, + "enableConfidentialStorage": { + "description": "Optional. Reserved for future use.", + "type": "boolean" + }, "ephemeralStorageLocalSsdConfig": { "$ref": "EphemeralStorageLocalSsdConfig", "description": "Parameters for the node ephemeral storage using Local SSDs. If unspecified, ephemeral storage is backed by the boot disk." @@ -7210,6 +7214,10 @@ "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", "type": "string" }, + "queuedProvisioning": { + "$ref": "QueuedProvisioning", + "description": "Specifies the configuration of queued provisioning." + }, "resourceLabels": { "$ref": "ResourceLabels", "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources." diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 77468acd130..3884f153550 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -4667,6 +4667,9 @@ type NodeConfig struct { // 'pd-standard' DiskType string `json:"diskType,omitempty"` + // EnableConfidentialStorage: Optional. Reserved for future use. + EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` + // EphemeralStorageLocalSsdConfig: Parameters for the node ephemeral // storage using Local SSDs. If unspecified, ephemeral storage is backed // by the boot disk. @@ -8038,6 +8041,10 @@ type UpdateNodePoolRequest struct { // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` + // QueuedProvisioning: Specifies the configuration of queued + // provisioning. + QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` + // ResourceLabels: The resource labels for the node pool to use to // annotate any related Google Compute Engine resources. ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 140fa4d3093..30344ba7341 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240116", + "revision": "20240206", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5546,7 +5546,7 @@ "type": "string" }, "enableConfidentialStorage": { - "description": "Optional. Enable confidential storage on Hyperdisk. boot_disk_kms_key is required when enable_confidential_storage is true. This is only available for private preview.", + "description": "Optional. Reserved for future use.", "type": "boolean" }, "ephemeralStorageConfig": { @@ -7714,6 +7714,10 @@ "description": "Required. Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", "type": "string" }, + "queuedProvisioning": { + "$ref": "QueuedProvisioning", + "description": "Specifies the configuration of queued provisioning." + }, "resourceLabels": { "$ref": "ResourceLabels", "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources." diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index e89ea82e756..e5ccb3b5ca6 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -5204,10 +5204,7 @@ type NodeConfig struct { // 'pd-standard' DiskType string `json:"diskType,omitempty"` - // EnableConfidentialStorage: Optional. Enable confidential storage on - // Hyperdisk. boot_disk_kms_key is required when - // enable_confidential_storage is true. This is only available for - // private preview. + // EnableConfidentialStorage: Optional. Reserved for future use. EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` // EphemeralStorageConfig: Parameters for the ephemeral storage @@ -8786,6 +8783,10 @@ type UpdateNodePoolRequest struct { // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` + // QueuedProvisioning: Specifies the configuration of queued + // provisioning. + QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` + // ResourceLabels: The resource labels for the node pool to use to // annotate any related Google Compute Engine resources. ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 29b13f878df..ed1531150a5 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -6186,7 +6186,7 @@ } } }, - "revision": "20240131", + "revision": "20240218", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -7592,7 +7592,7 @@ "id": "AttributionSettings", "properties": { "attributionLookbackWindowInDays": { - "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 60, 90.", + "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.", "format": "int32", "type": "integer" }, diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 7d296f318a3..3cbe16a232a 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -3195,8 +3195,7 @@ func (s *Amount) MarshalJSON() ([]byte, error) { // sources receiving pre-attribution data. type AttributionSettings struct { // AttributionLookbackWindowInDays: Required. Lookback windows (in days) - // used for attribution in this source. Supported values are 7, 30, 60, - // 90. + // used for attribution in this source. Supported values are 7, 30, 40. AttributionLookbackWindowInDays int64 `json:"attributionLookbackWindowInDays,omitempty"` // AttributionModel: Required. Attribution model. diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index c716a3ee64e..e41a0665264 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -1730,7 +1730,7 @@ ], "parameters": { "filter": { - "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", + "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", "location": "query", "type": "string" }, @@ -2034,7 +2034,7 @@ "type": "string" }, "requestId": { - "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequest) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", "location": "query", "type": "string" } @@ -2075,6 +2075,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "repair": { + "description": "Repair nodes in a node group.", + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}:repair", + "httpMethod": "POST", + "id": "dataproc.projects.regions.clusters.nodeGroups.repair", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + "location": "path", + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:repair", + "request": { + "$ref": "RepairNodeGroupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "resize": { "description": "Resizes a node group in a cluster. The returned Operation.metadata is NodeGroupOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).", "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}:resize", @@ -3006,7 +3034,7 @@ } } }, - "revision": "20240103", + "revision": "20240209", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3025,6 +3053,69 @@ }, "type": "object" }, + "AnalyzeOperationMetadata": { + "description": "Metadata describing the Analyze operation.", + "id": "AnalyzeOperationMetadata", + "properties": { + "analyzedWorkloadName": { + "description": "Output only. name of the workload being analyzed.", + "readOnly": true, + "type": "string" + }, + "analyzedWorkloadType": { + "description": "Output only. Type of the workload being analyzed.", + "enum": [ + "WORKLOAD_TYPE_UNSPECIFIED", + "BATCH" + ], + "enumDescriptions": [ + "Undefined option", + "Serverless batch job" + ], + "readOnly": true, + "type": "string" + }, + "analyzedWorkloadUuid": { + "description": "Output only. unique identifier of the workload typically generated by control plane. E.g. batch uuid.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Short description of the operation.", + "readOnly": true, + "type": "string" + }, + "doneTime": { + "description": "Output only. The time when the operation finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. Labels associated with the operation.", + "readOnly": true, + "type": "object" + }, + "warnings": { + "description": "Output only. Warnings encountered during operation execution.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "AutoscalingConfig": { "description": "Autoscaling Policy config associated with the cluster.", "id": "AutoscalingConfig", @@ -3334,7 +3425,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.For an overview of the IAM roles and permissions, see the IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see here (https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -5465,7 +5556,8 @@ "UPDATE", "DELETE", "RESIZE", - "REPAIR" + "REPAIR", + "UPDATE_LABELS" ], "enumDescriptions": [ "Node group operation type is unknown.", @@ -5473,7 +5565,8 @@ "Update node group operation type.", "Delete node group operation type.", "Resize node group operation type.", - "Repair node group operation type." + "Repair node group operation type.", + "Update node group label operation type." ], "type": "string" }, @@ -5963,6 +6056,35 @@ }, "type": "object" }, + "RepairNodeGroupRequest": { + "id": "RepairNodeGroupRequest", + "properties": { + "instanceNames": { + "description": "Required. Name of instances to be repaired. These instances must belong to specified node pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "repairAction": { + "description": "Required. Repair action to take on specified resources of the node pool.", + "enum": [ + "REPAIR_ACTION_UNSPECIFIED", + "REPLACE" + ], + "enumDescriptions": [ + "No action will be taken by default.", + "replace the specified list of nodes." + ], + "type": "string" + }, + "requestId": { + "description": "Optional. A unique ID used to identify the request. If the server receives two RepairNodeGroupRequest with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "type": "string" + } + }, + "type": "object" + }, "RepositoryConfig": { "description": "Configuration for dependency repositories", "id": "RepositoryConfig", diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index d62886e1d6b..07bde40adc9 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -379,6 +379,65 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalyzeOperationMetadata: Metadata describing the Analyze operation. +type AnalyzeOperationMetadata struct { + // AnalyzedWorkloadName: Output only. name of the workload being + // analyzed. + AnalyzedWorkloadName string `json:"analyzedWorkloadName,omitempty"` + + // AnalyzedWorkloadType: Output only. Type of the workload being + // analyzed. + // + // Possible values: + // "WORKLOAD_TYPE_UNSPECIFIED" - Undefined option + // "BATCH" - Serverless batch job + AnalyzedWorkloadType string `json:"analyzedWorkloadType,omitempty"` + + // AnalyzedWorkloadUuid: Output only. unique identifier of the workload + // typically generated by control plane. E.g. batch uuid. + AnalyzedWorkloadUuid string `json:"analyzedWorkloadUuid,omitempty"` + + // CreateTime: Output only. The time when the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Output only. Short description of the operation. + Description string `json:"description,omitempty"` + + // DoneTime: Output only. The time when the operation finished. + DoneTime string `json:"doneTime,omitempty"` + + // Labels: Output only. Labels associated with the operation. + Labels map[string]string `json:"labels,omitempty"` + + // Warnings: Output only. Warnings encountered during operation + // execution. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AnalyzedWorkloadName") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnalyzedWorkloadName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AnalyzeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AnalyzeOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AutoscalingConfig: Autoscaling Policy config associated with the // cluster. type AutoscalingConfig struct { @@ -914,7 +973,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of members, or principals. - // For example, roles/viewer, roles/editor, or roles/owner. + // For example, roles/viewer, roles/editor, or roles/owner.For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -4437,6 +4500,7 @@ type NodeGroupOperationMetadata struct { // "DELETE" - Delete node group operation type. // "RESIZE" - Resize node group operation type. // "REPAIR" - Repair node group operation type. + // "UPDATE_LABELS" - Update node group label operation type. OperationType string `json:"operationType,omitempty"` // Status: Output only. Current operation status. @@ -5245,6 +5309,52 @@ func (s *RepairClusterRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RepairNodeGroupRequest struct { + // InstanceNames: Required. Name of instances to be repaired. These + // instances must belong to specified node pool. + InstanceNames []string `json:"instanceNames,omitempty"` + + // RepairAction: Required. Repair action to take on specified resources + // of the node pool. + // + // Possible values: + // "REPAIR_ACTION_UNSPECIFIED" - No action will be taken by default. + // "REPLACE" - replace the specified list of nodes. + RepairAction string `json:"repairAction,omitempty"` + + // RequestId: Optional. A unique ID used to identify the request. If the + // server receives two RepairNodeGroupRequest with the same ID, the + // second request is ignored and the first google.longrunning.Operation + // created and stored in the backend is returned.Recommendation: Set + // this value to a UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID + // must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + // and hyphens (-). The maximum length is 40 characters. + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InstanceNames") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RepairNodeGroupRequest) MarshalJSON() ([]byte, error) { + type NoMethod RepairNodeGroupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RepositoryConfig: Configuration for dependency repositories type RepositoryConfig struct { // PypiRepositoryConfig: Optional. Configuration for PyPi repository. @@ -15494,13 +15604,14 @@ func (r *ProjectsRegionsClustersService) List(projectId string, region string) * // one of status.state, clusterName, or labels.[KEY], and [KEY] is a // label key. value can be * to match all values. status.state can be // one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, -// DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and -// RUNNING states. INACTIVE contains the DELETING and ERROR states. -// clusterName is the name of the cluster provided at creation time. -// Only the logical AND operator is supported; space-separated items are -// treated as having an implicit AND operator.Example -// filter:status.state = ACTIVE AND clusterName = mycluster AND -// labels.env = staging AND labels.starred = * +// DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the +// CREATING, UPDATING, and RUNNING states. INACTIVE contains the +// DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the +// name of the cluster provided at creation time. Only the logical AND +// operator is supported; space-separated items are treated as having an +// implicit AND operator.Example filter:status.state = ACTIVE AND +// clusterName = mycluster AND labels.env = staging AND labels.starred = +// * func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall { c.urlParams_.Set("filter", filter) return c @@ -15630,7 +15741,7 @@ func (c *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*Lis // ], // "parameters": { // "filter": { - // "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", + // "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, UPDATING, STOPPING, or STOPPED. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING, ERROR, STOPPING, and STOPPED states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", // "location": "query", // "type": "string" // }, @@ -16758,7 +16869,7 @@ func (c *ProjectsRegionsClustersNodeGroupsCreateCall) ParentOperationId(parentOp // RequestId sets the optional parameter "requestId": A unique ID used // to identify the request. If the server receives two // CreateNodeGroupRequest -// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) +// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequest) // with the same ID, the second request is ignored and the first // google.longrunning.Operation created and stored in the backend is // returned.Recommendation: Set this value to a UUID @@ -16887,7 +16998,7 @@ func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "requestId": { - // "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequests) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + // "description": "Optional. A unique ID used to identify the request. If the server receives two CreateNodeGroupRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateNodeGroupRequest) with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", // "location": "query", // "type": "string" // } @@ -17054,6 +17165,150 @@ func (c *ProjectsRegionsClustersNodeGroupsGetCall) Do(opts ...googleapi.CallOpti } +// method id "dataproc.projects.regions.clusters.nodeGroups.repair": + +type ProjectsRegionsClustersNodeGroupsRepairCall struct { + s *Service + name string + repairnodegrouprequest *RepairNodeGroupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Repair: Repair nodes in a node group. +// +// - name: The name of the node group to resize. Format: +// projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{n +// odeGroup}. +func (r *ProjectsRegionsClustersNodeGroupsService) Repair(name string, repairnodegrouprequest *RepairNodeGroupRequest) *ProjectsRegionsClustersNodeGroupsRepairCall { + c := &ProjectsRegionsClustersNodeGroupsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.repairnodegrouprequest = repairnodegrouprequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsRepairCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsRepairCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRegionsClustersNodeGroupsRepairCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairnodegrouprequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:repair") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataproc.projects.regions.clusters.nodeGroups.repair" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Repair nodes in a node group.", + // "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}/nodeGroups/{nodeGroupsId}:repair", + // "httpMethod": "POST", + // "id": "dataproc.projects.regions.clusters.nodeGroups.repair", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the node group to resize. Format: projects/{project}/regions/{region}/clusters/{cluster}/nodeGroups/{nodeGroup}", + // "location": "path", + // "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+/nodeGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:repair", + // "request": { + // "$ref": "RepairNodeGroupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataproc.projects.regions.clusters.nodeGroups.resize": type ProjectsRegionsClustersNodeGroupsResizeCall struct { diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index e0cdf974e46..bdb56dd5580 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -654,7 +654,7 @@ } } }, - "revision": "20240131", + "revision": "20240208", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -993,6 +993,17 @@ }, "type": "object" }, + "ExplainOptions": { + "description": "Explain options for the query.", + "id": "ExplainOptions", + "properties": { + "analyze": { + "description": "Optional. Whether to execute this query. When false (the default), the query will be planned, returning only metrics from the planning stages. When true, the query will be planned and executed, returning the full query results along with both planning and execution stage metrics.", + "type": "boolean" + } + }, + "type": "object" + }, "Filter": { "description": "A holder for any type of filter.", "id": "Filter", @@ -2309,6 +2320,10 @@ "description": "The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database.", "type": "string" }, + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "gqlQuery": { "$ref": "GqlQuery", "description": "The GQL query to run. This query must be an aggregation query." @@ -2352,6 +2367,10 @@ "description": "The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database.", "type": "string" }, + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "gqlQuery": { "$ref": "GqlQuery", "description": "The GQL query to run. This query must be a non-aggregation query." diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index 4eb8dcb16d5..4d8565c6195 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -839,6 +839,38 @@ func (s *EntityResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExplainOptions: Explain options for the query. +type ExplainOptions struct { + // Analyze: Optional. Whether to execute this query. When false (the + // default), the query will be planned, returning only metrics from the + // planning stages. When true, the query will be planned and executed, + // returning the full query results along with both planning and + // execution stage metrics. + Analyze bool `json:"analyze,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Analyze") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Analyze") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExplainOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Filter: A holder for any type of filter. type Filter struct { // CompositeFilter: A composite filter. @@ -3022,6 +3054,11 @@ type RunAggregationQueryRequest struct { // default database. DatabaseId string `json:"databaseId,omitempty"` + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // GqlQuery: The GQL query to run. This query must be an aggregation // query. GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` @@ -3109,6 +3146,11 @@ type RunQueryRequest struct { // default database. DatabaseId string `json:"databaseId,omitempty"` + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // GqlQuery: The GQL query to run. This query must be a non-aggregation // query. GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index 01eaf351f07..de6a8848d2b 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -336,7 +336,7 @@ } } }, - "revision": "20240131", + "revision": "20240208", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -653,6 +653,17 @@ }, "type": "object" }, + "ExplainOptions": { + "description": "Explain options for the query.", + "id": "ExplainOptions", + "properties": { + "analyze": { + "description": "Optional. Whether to execute this query. When false (the default), the query will be planned, returning only metrics from the planning stages. When true, the query will be planned and executed, returning the full query results along with both planning and execution stage metrics.", + "type": "boolean" + } + }, + "type": "object" + }, "Filter": { "description": "A holder for any type of filter.", "id": "Filter", @@ -1743,6 +1754,10 @@ "$ref": "AggregationQuery", "description": "The query to run." }, + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "gqlQuery": { "$ref": "GqlQuery", "description": "The GQL query to run. This query must be an aggregation query." @@ -1777,6 +1792,10 @@ "description": "The request for Datastore.RunQuery.", "id": "RunQueryRequest", "properties": { + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "gqlQuery": { "$ref": "GqlQuery", "description": "The GQL query to run. This query must be a non-aggregation query." diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index a430fd57b0d..90b74963980 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -784,6 +784,38 @@ func (s *EntityResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExplainOptions: Explain options for the query. +type ExplainOptions struct { + // Analyze: Optional. Whether to execute this query. When false (the + // default), the query will be planned, returning only metrics from the + // planning stages. When true, the query will be planned and executed, + // returning the full query results along with both planning and + // execution stage metrics. + Analyze bool `json:"analyze,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Analyze") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Analyze") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExplainOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Filter: A holder for any type of filter. type Filter struct { // CompositeFilter: A composite filter. @@ -2589,6 +2621,11 @@ type RunAggregationQueryRequest struct { // AggregationQuery: The query to run. AggregationQuery *AggregationQuery `json:"aggregationQuery,omitempty"` + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // GqlQuery: The GQL query to run. This query must be an aggregation // query. GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` @@ -2665,6 +2702,11 @@ func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { // RunQueryRequest: The request for Datastore.RunQuery. type RunQueryRequest struct { + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // GqlQuery: The GQL query to run. This query must be a non-aggregation // query. GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` @@ -2681,7 +2723,7 @@ type RunQueryRequest struct { // ReadOptions: The options for this query. ReadOptions *ReadOptions `json:"readOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "GqlQuery") to + // ForceSendFields is a list of field names (e.g. "ExplainOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2689,12 +2731,13 @@ type RunQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GqlQuery") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ExplainOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 5c0f0ea030d..fcc8f1cb71c 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240117", + "revision": "20240215", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -1274,6 +1274,10 @@ "postgresqlExcludedObjects": { "$ref": "PostgresqlRdbms", "description": "PostgreSQL data source objects to avoid backfilling." + }, + "sqlServerExcludedObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer data source objects to avoid backfilling" } }, "type": "object" @@ -1455,6 +1459,10 @@ "$ref": "PrivateConnectivity", "description": "Private connectivity." }, + "sqlServerProfile": { + "$ref": "SqlServerProfile", + "description": "SQLServer Connection Profile configuration." + }, "staticServiceIpConnectivity": { "$ref": "StaticServiceIpConnectivity", "description": "Static Service IP connectivity." @@ -2776,6 +2784,10 @@ "sourceConnectionProfile": { "description": "Required. Source connection profile resoource. Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`", "type": "string" + }, + "sqlServerSourceConfig": { + "$ref": "SqlServerSourceConfig", + "description": "SQLServer data source configuration." } }, "type": "object" @@ -2806,6 +2818,10 @@ "postgresqlIdentifier": { "$ref": "PostgresqlObjectIdentifier", "description": "PostgreSQL data source object identifier." + }, + "sqlServerIdentifier": { + "$ref": "SqlServerObjectIdentifier", + "description": "SQLServer data source object identifier." } }, "type": "object" @@ -2825,6 +2841,167 @@ }, "type": "object" }, + "SqlServerColumn": { + "description": "SQLServer Column.", + "id": "SqlServerColumn", + "properties": { + "column": { + "description": "Column name.", + "type": "string" + }, + "dataType": { + "description": "The SQLServer data type.", + "type": "string" + }, + "length": { + "description": "Column length.", + "format": "int32", + "type": "integer" + }, + "nullable": { + "description": "Whether or not the column can accept a null value.", + "type": "boolean" + }, + "ordinalPosition": { + "description": "The ordinal position of the column in the table.", + "format": "int32", + "type": "integer" + }, + "precision": { + "description": "Column precision.", + "format": "int32", + "type": "integer" + }, + "primaryKey": { + "description": "Whether or not the column represents a primary key.", + "type": "boolean" + }, + "scale": { + "description": "Column scale.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SqlServerObjectIdentifier": { + "description": "SQLServer data source object identifier.", + "id": "SqlServerObjectIdentifier", + "properties": { + "schema": { + "description": "Required. The schema name.", + "type": "string" + }, + "table": { + "description": "Required. The table name.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerProfile": { + "description": "SQLServer database profile", + "id": "SqlServerProfile", + "properties": { + "database": { + "description": "Required. Database for the SQLServer connection.", + "type": "string" + }, + "hostname": { + "description": "Required. Hostname for the SQLServer connection.", + "type": "string" + }, + "password": { + "description": "Required. Password for the SQLServer connection.", + "type": "string" + }, + "port": { + "description": "Port for the SQLServer connection, default value is 1433.", + "format": "int32", + "type": "integer" + }, + "username": { + "description": "Required. Username for the SQLServer connection.", + "type": "string" + } + }, + "type": "object" + }, + "SqlServerRdbms": { + "description": "SQLServer database structure.", + "id": "SqlServerRdbms", + "properties": { + "schemas": { + "description": "SQLServer schemas in the database server.", + "items": { + "$ref": "SqlServerSchema" + }, + "type": "array" + } + }, + "type": "object" + }, + "SqlServerSchema": { + "description": "SQLServer schema.", + "id": "SqlServerSchema", + "properties": { + "schema": { + "description": "Schema name.", + "type": "string" + }, + "tables": { + "description": "Tables in the schema.", + "items": { + "$ref": "SqlServerTable" + }, + "type": "array" + } + }, + "type": "object" + }, + "SqlServerSourceConfig": { + "description": "SQLServer data source configuration", + "id": "SqlServerSourceConfig", + "properties": { + "excludeObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer objects to exclude from the stream." + }, + "includeObjects": { + "$ref": "SqlServerRdbms", + "description": "SQLServer objects to include in the stream." + }, + "maxConcurrentBackfillTasks": { + "description": "Max concurrent backfill tasks.", + "format": "int32", + "type": "integer" + }, + "maxConcurrentCdcTasks": { + "description": "Max concurrent CDC tasks.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SqlServerTable": { + "description": "SQLServer table.", + "id": "SqlServerTable", + "properties": { + "columns": { + "description": "SQLServer columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything.", + "items": { + "$ref": "SqlServerColumn" + }, + "type": "array" + }, + "table": { + "description": "Table name.", + "type": "string" + } + }, + "type": "object" + }, "StartBackfillJobRequest": { "description": "Request for manually initiating a backfill job for a specific stream object.", "id": "StartBackfillJobRequest", diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index dbdb417c633..9c84fdb7f8c 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -266,6 +266,10 @@ type BackfillAllStrategy struct { // backfilling. PostgresqlExcludedObjects *PostgresqlRdbms `json:"postgresqlExcludedObjects,omitempty"` + // SqlServerExcludedObjects: SQLServer data source objects to avoid + // backfilling + SqlServerExcludedObjects *SqlServerRdbms `json:"sqlServerExcludedObjects,omitempty"` + // ForceSendFields is a list of field names (e.g. // "MysqlExcludedObjects") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -479,6 +483,9 @@ type ConnectionProfile struct { // PrivateConnectivity: Private connectivity. PrivateConnectivity *PrivateConnectivity `json:"privateConnectivity,omitempty"` + // SqlServerProfile: SQLServer Connection Profile configuration. + SqlServerProfile *SqlServerProfile `json:"sqlServerProfile,omitempty"` + // StaticServiceIpConnectivity: Static Service IP connectivity. StaticServiceIpConnectivity *StaticServiceIpConnectivity `json:"staticServiceIpConnectivity,omitempty"` @@ -2581,6 +2588,9 @@ type SourceConfig struct { // `projects/{project}/locations/{location}/connectionProfiles/{name}` SourceConnectionProfile string `json:"sourceConnectionProfile,omitempty"` + // SqlServerSourceConfig: SQLServer data source configuration. + SqlServerSourceConfig *SqlServerSourceConfig `json:"sqlServerSourceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "MysqlSourceConfig") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2649,6 +2659,9 @@ type SourceObjectIdentifier struct { // PostgresqlIdentifier: PostgreSQL data source object identifier. PostgresqlIdentifier *PostgresqlObjectIdentifier `json:"postgresqlIdentifier,omitempty"` + // SqlServerIdentifier: SQLServer data source object identifier. + SqlServerIdentifier *SqlServerObjectIdentifier `json:"sqlServerIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "MysqlIdentifier") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2707,6 +2720,255 @@ func (s *SpecificStartPosition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SqlServerColumn: SQLServer Column. +type SqlServerColumn struct { + // Column: Column name. + Column string `json:"column,omitempty"` + + // DataType: The SQLServer data type. + DataType string `json:"dataType,omitempty"` + + // Length: Column length. + Length int64 `json:"length,omitempty"` + + // Nullable: Whether or not the column can accept a null value. + Nullable bool `json:"nullable,omitempty"` + + // OrdinalPosition: The ordinal position of the column in the table. + OrdinalPosition int64 `json:"ordinalPosition,omitempty"` + + // Precision: Column precision. + Precision int64 `json:"precision,omitempty"` + + // PrimaryKey: Whether or not the column represents a primary key. + PrimaryKey bool `json:"primaryKey,omitempty"` + + // Scale: Column scale. + Scale int64 `json:"scale,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Column") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Column") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerColumn) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerColumn + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerObjectIdentifier: SQLServer data source object identifier. +type SqlServerObjectIdentifier struct { + // Schema: Required. The schema name. + Schema string `json:"schema,omitempty"` + + // Table: Required. The table name. + Table string `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schema") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerObjectIdentifier) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerObjectIdentifier + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerProfile: SQLServer database profile +type SqlServerProfile struct { + // Database: Required. Database for the SQLServer connection. + Database string `json:"database,omitempty"` + + // Hostname: Required. Hostname for the SQLServer connection. + Hostname string `json:"hostname,omitempty"` + + // Password: Required. Password for the SQLServer connection. + Password string `json:"password,omitempty"` + + // Port: Port for the SQLServer connection, default value is 1433. + Port int64 `json:"port,omitempty"` + + // Username: Required. Username for the SQLServer connection. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Database") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Database") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerProfile) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerRdbms: SQLServer database structure. +type SqlServerRdbms struct { + // Schemas: SQLServer schemas in the database server. + Schemas []*SqlServerSchema `json:"schemas,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schemas") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schemas") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerRdbms) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerRdbms + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerSchema: SQLServer schema. +type SqlServerSchema struct { + // Schema: Schema name. + Schema string `json:"schema,omitempty"` + + // Tables: Tables in the schema. + Tables []*SqlServerTable `json:"tables,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Schema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Schema") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerSchema) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerSourceConfig: SQLServer data source configuration +type SqlServerSourceConfig struct { + // ExcludeObjects: SQLServer objects to exclude from the stream. + ExcludeObjects *SqlServerRdbms `json:"excludeObjects,omitempty"` + + // IncludeObjects: SQLServer objects to include in the stream. + IncludeObjects *SqlServerRdbms `json:"includeObjects,omitempty"` + + // MaxConcurrentBackfillTasks: Max concurrent backfill tasks. + MaxConcurrentBackfillTasks int64 `json:"maxConcurrentBackfillTasks,omitempty"` + + // MaxConcurrentCdcTasks: Max concurrent CDC tasks. + MaxConcurrentCdcTasks int64 `json:"maxConcurrentCdcTasks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExcludeObjects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExcludeObjects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerSourceConfig) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSourceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlServerTable: SQLServer table. +type SqlServerTable struct { + // Columns: SQLServer columns in the schema. When unspecified as part of + // include/exclude objects, includes/excludes everything. + Columns []*SqlServerColumn `json:"columns,omitempty"` + + // Table: Table name. + Table string `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlServerTable) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerTable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StartBackfillJobRequest: Request for manually initiating a backfill // job for a specific stream object. type StartBackfillJobRequest struct { diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index e561151891d..24162c3b34d 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20240104", + "revision": "20240214", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -1709,7 +1709,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 10fd905417c..f0c8f15eb37 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -536,7 +536,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json index ec110dcfabe..6ddcf6e4eaf 100644 --- a/deploymentmanager/v2/deploymentmanager-api.json +++ b/deploymentmanager/v2/deploymentmanager-api.json @@ -988,7 +988,7 @@ } } }, - "revision": "20240104", + "revision": "20240214", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1055,7 +1055,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go index 7abb5239305..d7e9bc97afd 100644 --- a/deploymentmanager/v2/deploymentmanager-gen.go +++ b/deploymentmanager/v2/deploymentmanager-gen.go @@ -409,7 +409,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index 83e5e169ee5..55ddef43073 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1552,7 +1552,7 @@ } } }, - "revision": "20240104", + "revision": "20240214", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -1673,7 +1673,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go index caedef19917..26d79a3d972 100644 --- a/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -536,7 +536,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 8573b2425fd..99cc0fc6045 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -7695,7 +7695,7 @@ } } }, - "revision": "20240131", + "revision": "20240219", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -14630,6 +14630,10 @@ "$ref": "GoogleCloudDialogflowV2beta1EventInput", "description": "An input event to send to Dialogflow." }, + "intentInput": { + "$ref": "GoogleCloudDialogflowV2beta1IntentInput", + "description": "The intent to be triggered on V3 agent." + }, "messageSendTime": { "description": "Optional. The send time of the message from end user or human agent's perspective. It is used for identifying the same message under one participant. Given two messages under the same participant: * If send time are different regardless of whether the content of the messages are exactly the same, the conversation will regard them as two distinct messages sent by the participant. * If send time is the same regardless of whether the content of the messages are exactly the same, the conversation will regard them as same message, and ignore the message received later. If the value is not provided, a new request will always be regarded as a new message without any de-duplication.", "format": "google-datetime", diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 1278b12b528..9a2e65b29b4 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -13141,6 +13141,9 @@ type GoogleCloudDialogflowV2beta1AnalyzeContentRequest struct { // EventInput: An input event to send to Dialogflow. EventInput *GoogleCloudDialogflowV2beta1EventInput `json:"eventInput,omitempty"` + // IntentInput: The intent to be triggered on V3 agent. + IntentInput *GoogleCloudDialogflowV2beta1IntentInput `json:"intentInput,omitempty"` + // MessageSendTime: Optional. The send time of the message from end user // or human agent's perspective. It is used for identifying the same // message under one participant. Given two messages under the same diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index 99d8f9c07e2..2c5f50f06d2 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -4453,7 +4453,7 @@ } } }, - "revision": "20240131", + "revision": "20240219", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4905,6 +4905,10 @@ "description": "The affected resource display name of the change.", "type": "string" }, + "languageCode": { + "description": "The affected language code of the change.", + "type": "string" + }, "name": { "description": "The unique identifier of the changelog. Format: `projects//locations//agents//changelogs/`.", "type": "string" diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index 09b6f9b0c82..b8c73e6f040 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -1380,6 +1380,9 @@ type GoogleCloudDialogflowCxV3Changelog struct { // DisplayName: The affected resource display name of the change. DisplayName string `json:"displayName,omitempty"` + // LanguageCode: The affected language code of the change. + LanguageCode string `json:"languageCode,omitempty"` + // Name: The unique identifier of the changelog. Format: // `projects//locations//agents//changelogs/`. Name string `json:"name,omitempty"` diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index ce2e995866e..0477d073cb2 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -4453,7 +4453,7 @@ } } }, - "revision": "20240131", + "revision": "20240219", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -7183,6 +7183,10 @@ "description": "The affected resource display name of the change.", "type": "string" }, + "languageCode": { + "description": "The affected language code of the change.", + "type": "string" + }, "name": { "description": "The unique identifier of the changelog. Format: `projects//locations//agents//changelogs/`.", "type": "string" @@ -10306,6 +10310,28 @@ "description": "If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.", "type": "string" }, + "webhookDisplayNames": { + "description": "The list of webhook display names in the order of call sequence.", + "items": { + "type": "string" + }, + "type": "array" + }, + "webhookIds": { + "description": "The list of webhook ids in the order of call sequence.", + "items": { + "type": "string" + }, + "type": "array" + }, + "webhookLatencies": { + "description": "The list of webhook latencies in the order of call sequence.", + "items": { + "format": "google-duration", + "type": "string" + }, + "type": "array" + }, "webhookPayloads": { "description": "The list of webhook payload in WebhookResponse.payload, in the order of call sequence. If some webhook call fails or doesn't return any payload, an empty `Struct` would be used instead.", "items": { @@ -10323,6 +10349,13 @@ "$ref": "GoogleRpcStatus" }, "type": "array" + }, + "webhookTags": { + "description": "The list of webhook tags in the order of call sequence.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index 5350085a740..f4c58572c5e 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -5588,6 +5588,9 @@ type GoogleCloudDialogflowCxV3beta1Changelog struct { // DisplayName: The affected resource display name of the change. DisplayName string `json:"displayName,omitempty"` + // LanguageCode: The affected language code of the change. + LanguageCode string `json:"languageCode,omitempty"` + // Name: The unique identifier of the changelog. Format: // `projects//locations//agents//changelogs/`. Name string `json:"name,omitempty"` @@ -11369,6 +11372,17 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // `projects//locations//agents//intents/`. TriggerIntent string `json:"triggerIntent,omitempty"` + // WebhookDisplayNames: The list of webhook display names in the order + // of call sequence. + WebhookDisplayNames []string `json:"webhookDisplayNames,omitempty"` + + // WebhookIds: The list of webhook ids in the order of call sequence. + WebhookIds []string `json:"webhookIds,omitempty"` + + // WebhookLatencies: The list of webhook latencies in the order of call + // sequence. + WebhookLatencies []string `json:"webhookLatencies,omitempty"` + // WebhookPayloads: The list of webhook payload in // WebhookResponse.payload, in the order of call sequence. If some // webhook call fails or doesn't return any payload, an empty `Struct` @@ -11379,6 +11393,9 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // sequence. WebhookStatuses []*GoogleRpcStatus `json:"webhookStatuses,omitempty"` + // WebhookTags: The list of webhook tags in the order of call sequence. + WebhookTags []string `json:"webhookTags,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index ef87d2eba07..040f1827aaf 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -149,7 +149,7 @@ ] }, "create": { - "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **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", "httpMethod": "POST", "id": "displayvideo.advertisers.create", @@ -452,7 +452,7 @@ ] }, "delete": { - "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **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/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.campaigns.delete", @@ -1378,7 +1378,7 @@ ] }, "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.", + "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", @@ -2765,7 +2765,7 @@ ] }, "duplicate": { - "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **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/{advertisersId}/lineItems/{lineItemsId}:duplicate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.duplicate", @@ -2914,7 +2914,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **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/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -7970,7 +7970,7 @@ ] }, "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.", + "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/partners/{partnerId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.partners.channels.sites.replace", @@ -9267,7 +9267,7 @@ } } }, - "revision": "20240201", + "revision": "20240215", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -9582,7 +9582,7 @@ "type": "string" }, "obaComplianceDisabled": { - "description": "Whether or not to use DV360's Online Behavioral Advertising (OBA) compliance. Starting on February 9, 2024, this field will be affected by an update to the Display \u0026 Video 360 API Terms of Service. See our [announcement](//ads-developers.googleblog.com/2024/01/update-to-display-video-360-api-terms.html) for more detail. Warning: Changing OBA settings may cause the audit status of your creatives to be reset by some ad exchanges, making them ineligible to serve until they are re-approved.", + "description": "Whether or not to disable Google's About this Ad feature that adds badging (to identify the content as an ad) and transparency information (on interaction with About this Ad) to your ads for Online Behavioral Advertising (OBA) and regulatory requirements. About this Ad gives users greater control over the ads they see and helps you explain why they're seeing your ad. [Learn more](//support.google.com/displayvideo/answer/14315795). If you choose to set this field to `true`, note that ads served through Display \u0026 Video 360 must comply to the following: * Be Online Behavioral Advertising (OBA) compliant, as per your contract with Google Marketing Platform. * In the European Economic Area (EEA), include transparency information and a mechanism for users to report illegal content in ads. If using an alternative ad badging, transparency, and reporting solution, you must ensure it includes the required transparency information and illegal content flagging mechanism and that you notify Google of any illegal content reports using the appropriate [form](//support.google.com/legal/troubleshooter/1114905?sjid=6787484030557261960-EU#ts=2981967%2C2982031%2C12980091).", "type": "boolean" }, "videoCreativeDataSharingAuthorized": { @@ -14083,7 +14083,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14160,7 +14166,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" } @@ -14262,7 +14274,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14339,7 +14357,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14442,7 +14466,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14519,7 +14549,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14623,7 +14659,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14700,7 +14742,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "readOnly": true, "type": "string" @@ -15655,7 +15703,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15732,7 +15786,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -16552,7 +16612,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16629,7 +16695,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 0ba073c5eb7..91e2a565916 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -1135,15 +1135,25 @@ type AdvertiserCreativeConfig struct { // "Campaign Monitor" tag containing this ID to the creative tag. IasClientId int64 `json:"iasClientId,omitempty,string"` - // ObaComplianceDisabled: Whether or not to use DV360's Online - // Behavioral Advertising (OBA) compliance. Starting on February 9, - // 2024, this field will be affected by an update to the Display & Video - // 360 API Terms of Service. See our announcement - // (//ads-developers.googleblog.com/2024/01/update-to-display-video-360-a - // pi-terms.html) for more detail. Warning: Changing OBA settings may - // cause the audit status of your creatives to be reset by some ad - // exchanges, making them ineligible to serve until they are - // re-approved. + // ObaComplianceDisabled: Whether or not to disable Google's About this + // Ad feature that adds badging (to identify the content as an ad) and + // transparency information (on interaction with About this Ad) to your + // ads for Online Behavioral Advertising (OBA) and regulatory + // requirements. About this Ad gives users greater control over the ads + // they see and helps you explain why they're seeing your ad. Learn more + // (//support.google.com/displayvideo/answer/14315795). If you choose to + // set this field to `true`, note that ads served through Display & + // Video 360 must comply to the following: * Be Online Behavioral + // Advertising (OBA) compliant, as per your contract with Google + // Marketing Platform. * In the European Economic Area (EEA), include + // transparency information and a mechanism for users to report illegal + // content in ads. If using an alternative ad badging, transparency, and + // reporting solution, you must ensure it includes the required + // transparency information and illegal content flagging mechanism and + // that you notify Google of any illegal content reports using the + // appropriate form + // (//support.google.com/legal/troubleshooter/1114905?sjid=67874840305572 + // 61960-EU#ts=2981967%2C2982031%2C12980091). ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` // VideoCreativeDataSharingAuthorized: By setting this field to `true`, @@ -8282,6 +8292,12 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -8420,6 +8436,12 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. @@ -8540,6 +8562,12 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -8659,6 +8687,12 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9898,6 +9932,12 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the @@ -10843,6 +10883,12 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that @@ -18881,8 +18927,10 @@ type AdvertisersCreateCall struct { } // Create: Creates a new advertiser. Returns the newly created -// advertiser if successful. This method can take up to 180 seconds to -// complete. +// advertiser if successful. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiser = advertiser @@ -18977,7 +19025,7 @@ func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, e } return ret, nil // { - // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **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", // "httpMethod": "POST", // "id": "displayvideo.advertisers.create", @@ -20453,6 +20501,10 @@ type AdvertisersCampaignsDeleteCall struct { // Delete: Permanently deletes a campaign. A deleted campaign cannot be // recovered. The campaign should be archived first, i.e. set // entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. +// **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this campaign belongs to. // - campaignId: The ID of the campaign we need to delete. @@ -20550,7 +20602,7 @@ func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empt } return ret, nil // { - // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **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/{advertisersId}/campaigns/{campaignsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.campaigns.delete", @@ -23649,7 +23701,11 @@ type AdvertisersChannelsSitesReplaceCall struct { // 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. +// 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_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser that owns the parent // channel. @@ -23755,7 +23811,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "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.", + // "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", @@ -28427,7 +28483,10 @@ type AdvertisersLineItemsDuplicateCall struct { // Duplicate: Duplicates a line item. Returns the ID of the created line // item if successful. YouTube & Partners line items cannot be created -// or updated using the API. +// or updated using the API. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this line item belongs to. // - lineItemId: The ID of the line item to duplicate. @@ -28531,7 +28590,7 @@ func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **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/{advertisersId}/lineItems/{lineItemsId}:duplicate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.duplicate", @@ -29147,7 +29206,10 @@ type AdvertisersLineItemsPatchCall struct { // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * // assignedTargetingOptions.create * assignedTargetingOptions.delete // YouTube & Partners line items cannot be created or updated using the -// API. +// API. **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -29260,7 +29322,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **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/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -48015,7 +48077,11 @@ type PartnersChannelsSitesReplaceCall struct { // 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. +// 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_time +// out) to avoid errors. // // - channelId: The ID of the parent channel whose sites will be // replaced. @@ -48120,7 +48186,7 @@ func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*Re } return ret, nil // { - // "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.", + // "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/partners/{partnerId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.partners.channels.sites.replace", diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 04cf32e66f7..3aef0ec0c44 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -149,7 +149,7 @@ ] }, "create": { - "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **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": "v3/advertisers", "httpMethod": "POST", "id": "displayvideo.advertisers.create", @@ -1007,7 +1007,7 @@ ] }, "delete": { - "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **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": "v3/advertisers/{advertisersId}/campaigns/{campaignsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.campaigns.delete", @@ -1933,7 +1933,7 @@ ] }, "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.", + "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": "v3/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.advertisers.channels.sites.replace", @@ -3320,7 +3320,7 @@ ] }, "duplicate": { - "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **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": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.duplicate", @@ -3469,7 +3469,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **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": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -7925,7 +7925,7 @@ ] }, "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.", + "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": "v3/partners/{partnerId}/channels/{channelsId}/sites:replace", "httpMethod": "POST", "id": "displayvideo.partners.channels.sites.replace", @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240201", + "revision": "20240215", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -9724,7 +9724,7 @@ "type": "string" }, "obaComplianceDisabled": { - "description": "Whether or not to use DV360's Online Behavioral Advertising (OBA) compliance. Starting on February 9, 2024, this field will be affected by an update to the Display \u0026 Video 360 API Terms of Service. See our [announcement](//ads-developers.googleblog.com/2024/01/update-to-display-video-360-api-terms.html) for more detail. Warning: Changing OBA settings may cause the audit status of your creatives to be reset by some ad exchanges, making them ineligible to serve until they are re-approved.", + "description": "Whether or not to disable Google's About this Ad feature that adds badging (to identify the content as an ad) and transparency information (on interaction with About this Ad) to your ads for Online Behavioral Advertising (OBA) and regulatory requirements. About this Ad gives users greater control over the ads they see and helps you explain why they're seeing your ad. [Learn more](//support.google.com/displayvideo/answer/14315795). If you choose to set this field to `true`, note that ads served through Display \u0026 Video 360 must comply to the following: * Be Online Behavioral Advertising (OBA) compliant, as per your contract with Google Marketing Platform. * In the European Economic Area (EEA), include transparency information and a mechanism for users to report illegal content in ads. If using an alternative ad badging, transparency, and reporting solution, you must ensure it includes the required transparency information and illegal content flagging mechanism and that you notify Google of any illegal content reports using the appropriate [form](//support.google.com/legal/troubleshooter/1114905?sjid=6787484030557261960-EU#ts=2981967%2C2982031%2C12980091).", "type": "boolean" }, "videoCreativeDataSharingAuthorized": { @@ -10041,7 +10041,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -10118,7 +10124,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -14783,7 +14795,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14860,7 +14878,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" } @@ -14962,7 +14986,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15039,7 +15069,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -15142,7 +15178,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15219,7 +15261,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -15323,7 +15371,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15400,7 +15454,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "readOnly": true, "type": "string" @@ -16355,7 +16415,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16432,7 +16498,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, @@ -17230,7 +17302,13 @@ "EXCHANGE_APPLOVIN", "EXCHANGE_CONNATIX", "EXCHANGE_RESET_DIGITAL", - "EXCHANGE_HIVESTACK" + "EXCHANGE_HIVESTACK", + "EXCHANGE_APPLOVIN_GBID", + "EXCHANGE_FYBER_GBID", + "EXCHANGE_UNITY_GBID", + "EXCHANGE_CHARTBOOST_GBID", + "EXCHANGE_ADMOST_GBID", + "EXCHANGE_TOPON_GBID" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -17307,7 +17385,13 @@ "AppLovin.", "Connatix.", "Reset Digital.", - "Hivestack." + "Hivestack.", + "AppLovin using the gBid SDK.", + "Fyber using the gBid SDK.", + "Unity using the gBid SDK.", + "Chartboost using the gBid SDK.", + "Admost using the gBid SDK.", + "Topon using the gBid SDK." ], "type": "string" }, diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index 6b44accb2b2..dc118299ca9 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1366,15 +1366,25 @@ type AdvertiserCreativeConfig struct { // "Campaign Monitor" tag containing this ID to the creative tag. IasClientId int64 `json:"iasClientId,omitempty,string"` - // ObaComplianceDisabled: Whether or not to use DV360's Online - // Behavioral Advertising (OBA) compliance. Starting on February 9, - // 2024, this field will be affected by an update to the Display & Video - // 360 API Terms of Service. See our announcement - // (//ads-developers.googleblog.com/2024/01/update-to-display-video-360-a - // pi-terms.html) for more detail. Warning: Changing OBA settings may - // cause the audit status of your creatives to be reset by some ad - // exchanges, making them ineligible to serve until they are - // re-approved. + // ObaComplianceDisabled: Whether or not to disable Google's About this + // Ad feature that adds badging (to identify the content as an ad) and + // transparency information (on interaction with About this Ad) to your + // ads for Online Behavioral Advertising (OBA) and regulatory + // requirements. About this Ad gives users greater control over the ads + // they see and helps you explain why they're seeing your ad. Learn more + // (//support.google.com/displayvideo/answer/14315795). If you choose to + // set this field to `true`, note that ads served through Display & + // Video 360 must comply to the following: * Be Online Behavioral + // Advertising (OBA) compliant, as per your contract with Google + // Marketing Platform. * In the European Economic Area (EEA), include + // transparency information and a mechanism for users to report illegal + // content in ads. If using an alternative ad badging, transparency, and + // reporting solution, you must ensure it includes the required + // transparency information and illegal content flagging mechanism and + // that you notify Google of any illegal content reports using the + // appropriate form + // (//support.google.com/legal/troubleshooter/1114905?sjid=67874840305572 + // 61960-EU#ts=2981967%2C2982031%2C12980091). ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` // VideoCreativeDataSharingAuthorized: By setting this field to `true`, @@ -1878,6 +1888,12 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. ExchangeValue string `json:"exchangeValue,omitempty"` // Int64Value: Integer value. @@ -9212,6 +9228,12 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9350,6 +9372,12 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. @@ -9470,6 +9498,12 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -9589,6 +9623,12 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -10828,6 +10868,12 @@ type GuaranteedOrder struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the @@ -11763,6 +11809,12 @@ type InventorySource struct { // "EXCHANGE_CONNATIX" - Connatix. // "EXCHANGE_RESET_DIGITAL" - Reset Digital. // "EXCHANGE_HIVESTACK" - Hivestack. + // "EXCHANGE_APPLOVIN_GBID" - AppLovin using the gBid SDK. + // "EXCHANGE_FYBER_GBID" - Fyber using the gBid SDK. + // "EXCHANGE_UNITY_GBID" - Unity using the gBid SDK. + // "EXCHANGE_CHARTBOOST_GBID" - Chartboost using the gBid SDK. + // "EXCHANGE_ADMOST_GBID" - Admost using the gBid SDK. + // "EXCHANGE_TOPON_GBID" - Topon using the gBid SDK. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that @@ -19564,8 +19616,10 @@ type AdvertisersCreateCall struct { } // Create: Creates a new advertiser. Returns the newly created -// advertiser if successful. This method can take up to 180 seconds to -// complete. +// advertiser if successful. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.advertiser = advertiser @@ -19660,7 +19714,7 @@ func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, e } return ret, nil // { - // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", + // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. **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": "v3/advertisers", // "httpMethod": "POST", // "id": "displayvideo.advertisers.create", @@ -22866,6 +22920,10 @@ type AdvertisersCampaignsDeleteCall struct { // Delete: Permanently deletes a campaign. A deleted campaign cannot be // recovered. The campaign should be archived first, i.e. set // entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. +// **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this campaign belongs to. // - campaignId: The ID of the campaign we need to delete. @@ -22963,7 +23021,7 @@ func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empt } return ret, nil // { - // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", + // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **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": "v3/advertisers/{advertisersId}/campaigns/{campaignsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.campaigns.delete", @@ -26062,7 +26120,11 @@ type AdvertisersChannelsSitesReplaceCall struct { // 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. +// 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_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser that owns the parent // channel. @@ -26168,7 +26230,7 @@ func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "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.", + // "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": "v3/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.advertisers.channels.sites.replace", @@ -30840,7 +30902,10 @@ type AdvertisersLineItemsDuplicateCall struct { // Duplicate: Duplicates a line item. Returns the ID of the created line // item if successful. YouTube & Partners line items cannot be created -// or updated using the API. +// or updated using the API. **This method regularly experiences high +// latency.** We recommend increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: The ID of the advertiser this line item belongs to. // - lineItemId: The ID of the line item to duplicate. @@ -30944,7 +31009,7 @@ func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Duplicates a line item. Returns the ID of the created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API. **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": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.duplicate", @@ -31560,7 +31625,10 @@ type AdvertisersLineItemsPatchCall struct { // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * // assignedTargetingOptions.create * assignedTargetingOptions.delete // YouTube & Partners line items cannot be created or updated using the -// API. +// API. **This method regularly experiences high latency.** We recommend +// increasing your default timeout +// (/display-video/api/guides/best-practices/timeouts#client_library_time +// out) to avoid errors. // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -31673,7 +31741,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API. **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": "v3/advertisers/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -48436,7 +48504,11 @@ type PartnersChannelsSitesReplaceCall struct { // 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. +// 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_time +// out) to avoid errors. // // - channelId: The ID of the parent channel whose sites will be // replaced. @@ -48541,7 +48613,7 @@ func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*Re } return ret, nil // { - // "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.", + // "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": "v3/partners/{partnerId}/channels/{channelsId}/sites:replace", // "httpMethod": "POST", // "id": "displayvideo.partners.channels.sites.replace", diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index d4aade4c674..c825a4510e5 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1672,7 +1672,7 @@ } } }, - "revision": "20240131", + "revision": "20240208", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2179,6 +2179,17 @@ }, "type": "object" }, + "ExplainOptions": { + "description": "Explain options for the query.", + "id": "ExplainOptions", + "properties": { + "analyze": { + "description": "Optional. Whether to execute this query. When false (the default), the query will be planned, returning only metrics from the planning stages. When true, the query will be planned and executed, returning the full query results along with both planning and execution stage metrics.", + "type": "boolean" + } + }, + "type": "object" + }, "FieldFilter": { "description": "A filter on a specific field.", "id": "FieldFilter", @@ -2390,6 +2401,25 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1CmekConfig": { + "description": "The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.", + "id": "GoogleFirestoreAdminV1CmekConfig", + "properties": { + "activeKeyVersion": { + "description": "Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "kmsKeyName": { + "description": "Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1CreateDatabaseMetadata": { "description": "Metadata related to the create database operation.", "id": "GoogleFirestoreAdminV1CreateDatabaseMetadata", @@ -2420,6 +2450,10 @@ ], "type": "string" }, + "cmekConfig": { + "$ref": "GoogleFirestoreAdminV1CmekConfig", + "description": "Optional. Presence indicates CMEK is enabled for this database." + }, "concurrencyMode": { "description": "The concurrency control mode to use for this database.", "enum": [ @@ -3767,6 +3801,10 @@ "description": "The request for Firestore.RunAggregationQuery.", "id": "RunAggregationQueryRequest", "properties": { + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "newTransaction": { "$ref": "TransactionOptions", "description": "Starts a new transaction as part of the query, defaulting to read-only. The new transaction ID will be returned as the first response in the stream." @@ -3813,6 +3851,10 @@ "description": "The request for Firestore.RunQuery.", "id": "RunQueryRequest", "properties": { + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "newTransaction": { "$ref": "TransactionOptions", "description": "Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream." diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index c77cbd6bb9e..42601bb8ddc 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1301,6 +1301,38 @@ func (s *ExistenceFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExplainOptions: Explain options for the query. +type ExplainOptions struct { + // Analyze: Optional. Whether to execute this query. When false (the + // default), the query will be planned, returning only metrics from the + // planning stages. When true, the query will be planned and executed, + // returning the full query results along with both planning and + // execution stage metrics. + Analyze bool `json:"analyze,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Analyze") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Analyze") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExplainOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FieldFilter: A filter on a specific field. type FieldFilter struct { // Field: The field to filter by. @@ -1658,6 +1690,53 @@ func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1CmekConfig: The CMEK (Customer Managed +// Encryption Key) configuration for a Firestore database. If not +// present, the database is secured by the default Google encryption +// key. +type GoogleFirestoreAdminV1CmekConfig struct { + // ActiveKeyVersion: Output only. Currently in-use KMS key versions + // (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + // During key rotation (https://cloud.google.com/kms/docs/key-rotation), + // there can be multiple in-use key versions. The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cr + // yptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + ActiveKeyVersion []string `json:"activeKeyVersion,omitempty"` + + // KmsKeyName: Required. Only keys in the same location as this database + // are allowed to be used for encryption. For Firestore's nam5 + // multi-region, this corresponds to Cloud KMS multi-region us. For + // Firestore's eur3 multi-region, this corresponds to Cloud KMS + // multi-region europe. See https://cloud.google.com/kms/docs/locations. + // The expected format is + // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cr + // yptoKeys/{crypto_key}`. + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActiveKeyVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveKeyVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1CmekConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1CreateDatabaseMetadata: Metadata related to the // create database operation. type GoogleFirestoreAdminV1CreateDatabaseMetadata struct { @@ -1684,6 +1763,10 @@ type GoogleFirestoreAdminV1Database struct { // created with the Firestore API. AppEngineIntegrationMode string `json:"appEngineIntegrationMode,omitempty"` + // CmekConfig: Optional. Presence indicates CMEK is enabled for this + // database. + CmekConfig *GoogleFirestoreAdminV1CmekConfig `json:"cmekConfig,omitempty"` + // ConcurrencyMode: The concurrency control mode to use for this // database. // @@ -3909,6 +3992,11 @@ func (s *RollbackRequest) MarshalJSON() ([]byte, error) { // RunAggregationQueryRequest: The request for // Firestore.RunAggregationQuery. type RunAggregationQueryRequest struct { + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // NewTransaction: Starts a new transaction as part of the query, // defaulting to read-only. The new transaction ID will be returned as // the first response in the stream. @@ -3928,7 +4016,7 @@ type RunAggregationQueryRequest struct { // the query in. Transaction string `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // ForceSendFields is a list of field names (e.g. "ExplainOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3936,7 +4024,7 @@ type RunAggregationQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewTransaction") to + // NullFields is a list of field names (e.g. "ExplainOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -4001,6 +4089,11 @@ func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { // RunQueryRequest: The request for Firestore.RunQuery. type RunQueryRequest struct { + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // NewTransaction: Starts a new transaction and reads the documents. // Defaults to a read-only transaction. The new transaction ID will be // returned as the first response in the stream. @@ -4019,7 +4112,7 @@ type RunQueryRequest struct { // value here is the opaque transaction ID to execute the query in. Transaction string `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // ForceSendFields is a list of field names (e.g. "ExplainOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4027,7 +4120,7 @@ type RunQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewTransaction") to + // NullFields is a list of field names (e.g. "ExplainOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 4c38f8cce62..c6077b68d68 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -950,7 +950,7 @@ } } }, - "revision": "20240131", + "revision": "20240208", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1457,6 +1457,17 @@ }, "type": "object" }, + "ExplainOptions": { + "description": "Explain options for the query.", + "id": "ExplainOptions", + "properties": { + "analyze": { + "description": "Optional. Whether to execute this query. When false (the default), the query will be planned, returning only metrics from the planning stages. When true, the query will be planned and executed, returning the full query results along with both planning and execution stage metrics.", + "type": "boolean" + } + }, + "type": "object" + }, "FieldFilter": { "description": "A filter on a specific field.", "id": "FieldFilter", @@ -2308,6 +2319,10 @@ "description": "The request for Firestore.RunAggregationQuery.", "id": "RunAggregationQueryRequest", "properties": { + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "newTransaction": { "$ref": "TransactionOptions", "description": "Starts a new transaction as part of the query, defaulting to read-only. The new transaction ID will be returned as the first response in the stream." @@ -2354,6 +2369,10 @@ "description": "The request for Firestore.RunQuery.", "id": "RunQueryRequest", "properties": { + "explainOptions": { + "$ref": "ExplainOptions", + "description": "Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned." + }, "newTransaction": { "$ref": "TransactionOptions", "description": "Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream." diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 1352bf54e22..45c2f88d7d3 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -1229,6 +1229,38 @@ func (s *ExistenceFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExplainOptions: Explain options for the query. +type ExplainOptions struct { + // Analyze: Optional. Whether to execute this query. When false (the + // default), the query will be planned, returning only metrics from the + // planning stages. When true, the query will be planned and executed, + // returning the full query results along with both planning and + // execution stage metrics. + Analyze bool `json:"analyze,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Analyze") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Analyze") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExplainOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FieldFilter: A filter on a specific field. type FieldFilter struct { // Field: The field to filter by. @@ -2714,6 +2746,11 @@ func (s *RollbackRequest) MarshalJSON() ([]byte, error) { // RunAggregationQueryRequest: The request for // Firestore.RunAggregationQuery. type RunAggregationQueryRequest struct { + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // NewTransaction: Starts a new transaction as part of the query, // defaulting to read-only. The new transaction ID will be returned as // the first response in the stream. @@ -2733,7 +2770,7 @@ type RunAggregationQueryRequest struct { // the query in. Transaction string `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // ForceSendFields is a list of field names (e.g. "ExplainOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2741,7 +2778,7 @@ type RunAggregationQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewTransaction") to + // NullFields is a list of field names (e.g. "ExplainOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2806,6 +2843,11 @@ func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { // RunQueryRequest: The request for Firestore.RunQuery. type RunQueryRequest struct { + // ExplainOptions: Optional. Explain options for the query. If set, + // additional query statistics will be returned. If not, only query + // results will be returned. + ExplainOptions *ExplainOptions `json:"explainOptions,omitempty"` + // NewTransaction: Starts a new transaction and reads the documents. // Defaults to a read-only transaction. The new transaction ID will be // returned as the first response in the stream. @@ -2824,7 +2866,7 @@ type RunQueryRequest struct { // value here is the opaque transaction ID to execute the query in. Transaction string `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewTransaction") to + // ForceSendFields is a list of field names (e.g. "ExplainOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2832,7 +2874,7 @@ type RunQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewTransaction") to + // NullFields is a list of field names (e.g. "ExplainOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 5a1c12e453e..2273ef8f183 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -1834,7 +1834,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2547,6 +2547,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -2855,6 +2873,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 483dded1ba8..e0622c4608f 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -1476,6 +1476,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -1952,6 +1964,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 0c4d192182a..b5ce16e5ffe 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1685,6 +1685,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listPermitted": { + "description": "Lists permitted Scopes.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes:listPermitted", + "httpMethod": "GET", + "id": "gkehub.projects.locations.scopes.listPermitted", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListPermittedScopes` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/scopes:listPermitted", + "response": { + "$ref": "ListPermittedScopesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates a scopes.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes/{scopesId}", @@ -2098,7 +2134,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3012,6 +3048,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -3325,6 +3379,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." @@ -4601,6 +4669,24 @@ }, "type": "object" }, + "ListPermittedScopesResponse": { + "description": "List of permitted Scopes.", + "id": "ListPermittedScopesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListPermittedScopes` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "scopes": { + "description": "The list of permitted Scopes", + "items": { + "$ref": "Scope" + }, + "type": "array" + } + }, + "type": "object" + }, "ListScopeNamespacesResponse": { "description": "List of fleet namespaces.", "id": "ListScopeNamespacesResponse", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 0a753c111ad..481ef288ae5 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1839,6 +1839,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -2319,6 +2331,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` @@ -4466,6 +4488,43 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListPermittedScopesResponse: List of permitted Scopes. +type ListPermittedScopesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // `ListPermittedScopes` method. The value of an empty string means that + // there are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Scopes: The list of permitted Scopes + Scopes []*Scope `json:"scopes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPermittedScopesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPermittedScopesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListScopeNamespacesResponse: List of fleet namespaces. type ListScopeNamespacesResponse struct { // NextPageToken: A token to request the next page of resources from the @@ -15369,6 +15428,201 @@ func (c *ProjectsLocationsScopesListCall) Pages(ctx context.Context, f func(*Lis } } +// method id "gkehub.projects.locations.scopes.listPermitted": + +type ProjectsLocationsScopesListPermittedCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListPermitted: Lists permitted Scopes. +// +// - parent: The parent (project and location) where the Scope will be +// listed. Specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsScopesService) ListPermitted(parent string) *ProjectsLocationsScopesListPermittedCall { + c := &ProjectsLocationsScopesListPermittedCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// 'page' of resources, `page_size` specifies number of resources to +// return. If unspecified or set to 0, all resources will be returned. +func (c *ProjectsLocationsScopesListPermittedCall) PageSize(pageSize int64) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to `ListPermittedScopes` which specifies the position +// in the list from where to continue listing the resources. +func (c *ProjectsLocationsScopesListPermittedCall) PageToken(pageToken string) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsScopesListPermittedCall) Fields(s ...googleapi.Field) *ProjectsLocationsScopesListPermittedCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsScopesListPermittedCall) IfNoneMatch(entityTag string) *ProjectsLocationsScopesListPermittedCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsScopesListPermittedCall) Context(ctx context.Context) *ProjectsLocationsScopesListPermittedCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsScopesListPermittedCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsScopesListPermittedCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/scopes:listPermitted") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.scopes.listPermitted" call. +// Exactly one of *ListPermittedScopesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPermittedScopesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsScopesListPermittedCall) Do(opts ...googleapi.CallOption) (*ListPermittedScopesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListPermittedScopesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists permitted Scopes.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/scopes:listPermitted", + // "httpMethod": "GET", + // "id": "gkehub.projects.locations.scopes.listPermitted", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to `ListPermittedScopes` which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/scopes:listPermitted", + // "response": { + // "$ref": "ListPermittedScopesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsScopesListPermittedCall) Pages(ctx context.Context, f func(*ListPermittedScopesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "gkehub.projects.locations.scopes.patch": type ProjectsLocationsScopesPatchCall struct { diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index ea3a7ad8363..27bf5ebf29a 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2024,7 +2024,7 @@ } } }, - "revision": "20240118", + "revision": "20240209", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2822,6 +2822,24 @@ ], "type": "string" }, + "state": { + "description": "The state of CS This field summarizes the other fields in this message.", + "enum": [ + "STATE_UNSPECIFIED", + "CONFIG_SYNC_NOT_INSTALLED", + "CONFIG_SYNC_INSTALLED", + "CONFIG_SYNC_ERROR", + "CONFIG_SYNC_PENDING" + ], + "enumDescriptions": [ + "CS's state cannot be determined.", + "CS is not installed.", + "The expected CS version is installed successfully.", + "CS encounters errors.", + "CS is installing or terminating." + ], + "type": "string" + }, "syncState": { "$ref": "ConfigManagementSyncState", "description": "The state of ConfigSync's process to sync configs to a cluster" @@ -3135,6 +3153,20 @@ "$ref": "ConfigManagementHierarchyControllerConfig", "description": "Hierarchy Controller configuration for the cluster." }, + "management": { + "description": "Enables automatic Feature management.", + "enum": [ + "MANAGEMENT_UNSPECIFIED", + "MANAGEMENT_AUTOMATIC", + "MANAGEMENT_MANUAL" + ], + "enumDescriptions": [ + "Unspecified", + "Google will manage the Feature for the cluster.", + "User will manually manage the Feature for the cluster." + ], + "type": "string" + }, "policyController": { "$ref": "ConfigManagementPolicyController", "description": "Policy Controller configuration for the cluster." diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index cd277184710..352a79ce5ed 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1658,6 +1658,18 @@ type ConfigManagementConfigSyncState struct { // "INSTALLING" - CRD is installing RootsyncCrd string `json:"rootsyncCrd,omitempty"` + // State: The state of CS This field summarizes the other fields in this + // message. + // + // Possible values: + // "STATE_UNSPECIFIED" - CS's state cannot be determined. + // "CONFIG_SYNC_NOT_INSTALLED" - CS is not installed. + // "CONFIG_SYNC_INSTALLED" - The expected CS version is installed + // successfully. + // "CONFIG_SYNC_ERROR" - CS encounters errors. + // "CONFIG_SYNC_PENDING" - CS is installing or terminating. + State string `json:"state,omitempty"` + // SyncState: The state of ConfigSync's process to sync configs to a // cluster SyncState *ConfigManagementSyncState `json:"syncState,omitempty"` @@ -2138,6 +2150,16 @@ type ConfigManagementMembershipSpec struct { // cluster. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` + // Management: Enables automatic Feature management. + // + // Possible values: + // "MANAGEMENT_UNSPECIFIED" - Unspecified + // "MANAGEMENT_AUTOMATIC" - Google will manage the Feature for the + // cluster. + // "MANAGEMENT_MANUAL" - User will manually manage the Feature for the + // cluster. + Management string `json:"management,omitempty"` + // PolicyController: Policy Controller configuration for the cluster. PolicyController *ConfigManagementPolicyController `json:"policyController,omitempty"` diff --git a/go.mod b/go.mod index e1592ca44eb..28c8d25fec5 100644 --- a/go.mod +++ b/go.mod @@ -8,22 +8,22 @@ require ( github.com/google/s2a-go v0.1.7 github.com/google/uuid v1.6.0 github.com/googleapis/enterprise-certificate-proxy v0.3.2 - github.com/googleapis/gax-go/v2 v2.12.0 + github.com/googleapis/gax-go/v2 v2.12.1 go.opencensus.io v0.24.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 golang.org/x/net v0.21.0 golang.org/x/oauth2 v0.17.0 golang.org/x/sync v0.6.0 golang.org/x/time v0.5.0 - google.golang.org/genproto/googleapis/bytestream v0.0.0-20240205150955-31a09d347014 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.61.0 + google.golang.org/genproto/googleapis/bytestream v0.0.0-20240213162025-012b6fc9bca9 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 + google.golang.org/grpc v1.61.1 google.golang.org/protobuf v1.32.0 ) require ( - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go/compute v1.23.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -36,5 +36,5 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 // indirect ) diff --git a/go.sum b/go.sum index 9ed6580ac09..7de6d327b88 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.23.4 h1:EBT9Nw4q3zyE7G45Wvv3MzolIrCJEuHys5muLY0wvAw= +cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -57,8 +57,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.1 h1:9F8GV9r9ztXyAi00gsMQHNoF51xPZm8uj1dpYt2ZETM= +github.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -72,10 +72,10 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= go.opentelemetry.io/otel v1.23.0 h1:Df0pqjqExIywbMCMTxkAwzjLZtRf+bBKLbUcpxO2C9E= go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFufObyB0= go.opentelemetry.io/otel/metric v1.23.0 h1:pazkx7ss4LFVVYSxYew7L5I6qvLXHA0Ap2pwV+9Cnpo= @@ -148,20 +148,20 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= -google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac h1:OZkkudMUu9LVQMCoRUbI/1p5VCo9BOrlvkqMvWtqa6s= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240205150955-31a09d347014 h1:d9MrRjDhOUCudL8eHNVgZA1ESnBiE7ZKwlZS9foLoRU= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240205150955-31a09d347014/go.mod h1:EhZbXt+eY4Yr3YVaEGLdNZF5viWowOJZ8KTPqjYMKzg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 h1:FSL3lRCkhaPFxqi0s9o+V4UI2WTzAVOvkgbd4kVV4Wg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014/go.mod h1:SaPjaZGWb0lPqs6Ittu0spdfrOArqji4ZdeP5IC/9N4= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014 h1:g/4bk7P6TPMkAUbUhquq98xey1slwvuVJPosdBqYJlU= +google.golang.org/genproto v0.0.0-20240205150955-31a09d347014/go.mod h1:xEgQu1e4stdSSsxPDK8Azkrk/ECl5HvdPf6nbZrTS5M= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240213162025-012b6fc9bca9 h1:SlwxrP5Neh11ftq/nw7ooqXcJNSqf0VM7wFiGRk8J9Y= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:om8Bj876Z0v9ei+RD1LnEWig7vpHQ371PUqsgjmLQEA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 421e977d70a..f9ee2a492f6 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4487,7 +4487,7 @@ ] }, "executeBundle": { - "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch` and `transaction`, processing them according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", + "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction and history operations. ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch`, `transaction` and `history`, processing `batch` and `transaction` bundles according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a `transaction` or `history` bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. `history` bundles also check the `import` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", @@ -5520,7 +5520,7 @@ } } }, - "revision": "20240130", + "revision": "20240206", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -9338,7 +9338,7 @@ "type": "object" }, "RollbackFhirResourcesResponse": { - "description": "Final response of rollback FIHR resources request.", + "description": "Final response of rollback FHIR resources request.", "id": "RollbackFhirResourcesResponse", "properties": { "fhirStore": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index e14f8c410fc..9eb3b1d7212 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -7977,7 +7977,7 @@ func (s *RollbackFhirResourcesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RollbackFhirResourcesResponse: Final response of rollback FIHR +// RollbackFhirResourcesResponse: Final response of rollback FHIR // resources request. type RollbackFhirResourcesResponse struct { // FhirStore: The name of the FHIR store to rollback, in the format of @@ -30449,15 +30449,17 @@ type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { } // ExecuteBundle: Executes all the requests in the given Bundle. -// Implements the FHIR standard batch/transaction interaction (DSTU2 +// Implements the FHIR standard batch/transaction interaction and +// history operations. (DSTU2 // (https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), // STU3 // (https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), // R4 // (https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). // Supports all interactions within a bundle, except search. This method -// accepts Bundles of type `batch` and `transaction`, processing them -// according to the batch processing rules (DSTU2 +// accepts Bundles of type `batch`, `transaction` and `history`, +// processing `batch` and `transaction` bundles according to the batch +// processing rules (DSTU2 // (https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), // STU3 // (https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), @@ -30474,18 +30476,20 @@ type ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall struct { // of a `Bundle` resource of type `batch-response` or // `transaction-response` containing one entry for each entry in the // request, with the outcome of processing the entry. In the case of an -// error for a transaction bundle, the response body contains a -// JSON-encoded `OperationOutcome` resource describing the reason for -// the error. If the request cannot be mapped to a valid API method on a -// FHIR store, a generic GCP error might be returned instead. This -// method checks permissions for each request in the bundle. The -// `executeBundle` permission is required to call this method, but you -// must also grant sufficient permissions to execute the individual -// requests in the bundle. For example, if the bundle contains a request -// to create a FHIR resource, the caller must also have been granted the -// `healthcare.fhirResources.create` permission. You can use audit logs -// to view the permissions for `executeBundle` and each request in the -// bundle. For more information, see Viewing Cloud Audit logs +// error for a `transaction` or `history` bundle, the response body +// contains a JSON-encoded `OperationOutcome` resource describing the +// reason for the error. If the request cannot be mapped to a valid API +// method on a FHIR store, a generic GCP error might be returned +// instead. This method checks permissions for each request in the +// bundle. The `executeBundle` permission is required to call this +// method, but you must also grant sufficient permissions to execute the +// individual requests in the bundle. For example, if the bundle +// contains a request to create a FHIR resource, the caller must also +// have been granted the `healthcare.fhirResources.create` permission. +// `history` bundles also check the `import` permission. You can use +// audit logs to view the permissions for `executeBundle` and each +// request in the bundle. For more information, see Viewing Cloud Audit +// logs // (https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). // For samples that show how to call `executeBundle`, see Managing FHIR // resources using FHIR bundles @@ -30552,7 +30556,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirExecuteBundleCall) Do(opts ...go gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch` and `transaction`, processing them according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a transaction bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", + // "description": "Executes all the requests in the given Bundle. Implements the FHIR standard batch/transaction interaction and history operations. ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#transaction), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)). Supports all interactions within a bundle, except search. This method accepts Bundles of type `batch`, `transaction` and `history`, processing `batch` and `transaction` bundles according to the batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.16.2), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The request body must contain a JSON-encoded FHIR `Bundle` resource, and the request headers must contain `Content-Type: application/fhir+json`. For a batch bundle or a successful transaction, the response body contains a JSON-encoded representation of a `Bundle` resource of type `batch-response` or `transaction-response` containing one entry for each entry in the request, with the outcome of processing the entry. In the case of an error for a `transaction` or `history` bundle, the response body contains a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. This method checks permissions for each request in the bundle. The `executeBundle` permission is required to call this method, but you must also grant sufficient permissions to execute the individual requests in the bundle. For example, if the bundle contains a request to create a FHIR resource, the caller must also have been granted the `healthcare.fhirResources.create` permission. `history` bundles also check the `import` permission. You can use audit logs to view the permissions for `executeBundle` and each request in the bundle. For more information, see [Viewing Cloud Audit logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging). For samples that show how to call `executeBundle`, see [Managing FHIR resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-tos/fhir-bundles).", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle", diff --git a/internal/version.go b/internal/version.go index 58d6a5d7519..5e418fd8e2e 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.165.0" +const Version = "0.166.0" diff --git a/language/v1/language-api.json b/language/v1/language-api.json index 5435de7f558..1bd3a68d51f 100644 --- a/language/v1/language-api.json +++ b/language/v1/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20231209", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index 85b539d0c94..e3da5ec13e9 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20231209", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { diff --git a/language/v2/language-api.json b/language/v2/language-api.json index 23d4aa6d419..88b57e50812 100644 --- a/language/v2/language-api.json +++ b/language/v2/language-api.json @@ -208,7 +208,7 @@ } } }, - "revision": "20240211", + "revision": "20240217", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -338,35 +338,12 @@ "type": "string" }, "features": { - "$ref": "AnnotateTextRequestFeatures", + "$ref": "Features", "description": "Required. The enabled features." } }, "type": "object" }, - "AnnotateTextRequestFeatures": { - "description": "All available features. Setting each one to true will enable that specific analysis for the input.", - "id": "AnnotateTextRequestFeatures", - "properties": { - "classifyText": { - "description": "Optional. Classify the full document into categories.", - "type": "boolean" - }, - "extractDocumentSentiment": { - "description": "Optional. Extract document-level sentiment.", - "type": "boolean" - }, - "extractEntities": { - "description": "Optional. Extract entities.", - "type": "boolean" - }, - "moderateText": { - "description": "Optional. Moderate the document for harmful and sensitive categories.", - "type": "boolean" - } - }, - "type": "object" - }, "AnnotateTextResponse": { "description": "The text annotations response message.", "id": "AnnotateTextResponse", @@ -463,450 +440,6 @@ }, "type": "object" }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:\u0026red green:\u0026green blue:\u0026blue alpha:\u0026alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha \u003c= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i \u003c missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", - "id": "Color", - "properties": { - "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", - "format": "float", - "type": "number" - }, - "blue": { - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "green": { - "description": "The amount of green in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - }, - "red": { - "description": "The amount of red in the color as a value in the interval [0, 1].", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CpuMetric": { - "description": "Metric for billing reports.", - "id": "CpuMetric", - "properties": { - "coreNumber": { - "description": "Required. Number of CPU cores.", - "format": "int64", - "type": "string" - }, - "coreSec": { - "description": "Required. Total seconds of core usage, e.g. 4.", - "format": "int64", - "type": "string" - }, - "cpuType": { - "description": "Required. Type of cpu, e.g. N2.", - "enum": [ - "UNKNOWN_CPU_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "GPU-based machine, skip quota reporting.", - "GPU-based machine, skip quota reporting.", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "GPU-based machine, skip quota reporting.", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "DiskMetric": { - "id": "DiskMetric", - "properties": { - "diskType": { - "description": "Required. Type of Disk, e.g. REGIONAL_SSD.", - "enum": [ - "UNKNOWN_DISK_TYPE", - "REGIONAL_SSD", - "REGIONAL_STORAGE", - "PD_SSD", - "PD_STANDARD", - "STORAGE_SNAPSHOT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "gibSec": { - "description": "Required. Seconds of physical disk usage, e.g. 3600.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "Document": { "description": "Represents the input to API methods.", "id": "Document", @@ -1037,414 +570,25 @@ }, "type": "object" }, - "GpuMetric": { - "id": "GpuMetric", - "properties": { - "gpuSec": { - "description": "Required. Seconds of GPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "gpuType": { - "description": "Required. Type of GPU, e.g. NVIDIA_TESLA_V100.", - "enum": [ - "UNKNOWN_GPU_TYPE", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_TESLA_K80", - "NVIDIA_L4", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_V100", - "NVIDIA_H100_80GB" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, - "InfraUsage": { - "description": "Infra Usage of billing metrics. Next ID: 6", - "id": "InfraUsage", + "Features": { + "description": "All available features. Setting each one to true will enable that specific analysis for the input.", + "id": "Features", "properties": { - "cpuMetrics": { - "description": "Aggregated core metrics since requested start_time.", - "items": { - "$ref": "CpuMetric" - }, - "type": "array" - }, - "diskMetrics": { - "description": "Aggregated persistent disk metrics since requested start_time.", - "items": { - "$ref": "DiskMetric" - }, - "type": "array" + "classifyText": { + "description": "Optional. Classify the full document into categories.", + "type": "boolean" }, - "gpuMetrics": { - "description": "Aggregated gpu metrics since requested start_time.", - "items": { - "$ref": "GpuMetric" - }, - "type": "array" + "extractDocumentSentiment": { + "description": "Optional. Extract document-level sentiment.", + "type": "boolean" }, - "ramMetrics": { - "description": "Aggregated ram metrics since requested start_time.", - "items": { - "$ref": "RamMetric" - }, - "type": "array" + "extractEntities": { + "description": "Optional. Extract entities.", + "type": "boolean" }, - "tpuMetrics": { - "description": "Aggregated tpu metrics since requested start_time.", - "items": { - "$ref": "TpuMetric" - }, - "type": "array" + "moderateText": { + "description": "Optional. Moderate the document for harmful and sensitive categories.", + "type": "boolean" } }, "type": "object" @@ -1482,391 +626,6 @@ }, "type": "object" }, - "RamMetric": { - "id": "RamMetric", - "properties": { - "gibSec": { - "description": "Required. VM memory in Gigabyte second, e.g. 3600. Using int64 type to match billing metrics definition.", - "format": "int64", - "type": "string" - }, - "machineSpec": { - "description": "Required. Machine spec, e.g. N1_STANDARD_4.", - "enum": [ - "UNKNOWN_MACHINE_SPEC", - "N1_STANDARD_2", - "N1_STANDARD_4", - "N1_STANDARD_8", - "N1_STANDARD_16", - "N1_STANDARD_32", - "N1_STANDARD_64", - "N1_STANDARD_96", - "N1_HIGHMEM_2", - "N1_HIGHMEM_4", - "N1_HIGHMEM_8", - "N1_HIGHMEM_16", - "N1_HIGHMEM_32", - "N1_HIGHMEM_64", - "N1_HIGHMEM_96", - "N1_HIGHCPU_2", - "N1_HIGHCPU_4", - "N1_HIGHCPU_8", - "N1_HIGHCPU_16", - "N1_HIGHCPU_32", - "N1_HIGHCPU_64", - "N1_HIGHCPU_96", - "A2_HIGHGPU_1G", - "A2_HIGHGPU_2G", - "A2_HIGHGPU_4G", - "A2_HIGHGPU_8G", - "A2_MEGAGPU_16G", - "A2_ULTRAGPU_1G", - "A2_ULTRAGPU_2G", - "A2_ULTRAGPU_4G", - "A2_ULTRAGPU_8G", - "A3_HIGHGPU_8G", - "E2_STANDARD_2", - "E2_STANDARD_4", - "E2_STANDARD_8", - "E2_STANDARD_16", - "E2_STANDARD_32", - "E2_HIGHMEM_2", - "E2_HIGHMEM_4", - "E2_HIGHMEM_8", - "E2_HIGHMEM_16", - "E2_HIGHCPU_2", - "E2_HIGHCPU_4", - "E2_HIGHCPU_8", - "E2_HIGHCPU_16", - "E2_HIGHCPU_32", - "N2_STANDARD_2", - "N2_STANDARD_4", - "N2_STANDARD_8", - "N2_STANDARD_16", - "N2_STANDARD_32", - "N2_STANDARD_48", - "N2_STANDARD_64", - "N2_STANDARD_80", - "N2_STANDARD_96", - "N2_STANDARD_128", - "N2_HIGHMEM_2", - "N2_HIGHMEM_4", - "N2_HIGHMEM_8", - "N2_HIGHMEM_16", - "N2_HIGHMEM_32", - "N2_HIGHMEM_48", - "N2_HIGHMEM_64", - "N2_HIGHMEM_80", - "N2_HIGHMEM_96", - "N2_HIGHMEM_128", - "N2_HIGHCPU_2", - "N2_HIGHCPU_4", - "N2_HIGHCPU_8", - "N2_HIGHCPU_16", - "N2_HIGHCPU_32", - "N2_HIGHCPU_48", - "N2_HIGHCPU_64", - "N2_HIGHCPU_80", - "N2_HIGHCPU_96", - "N2D_STANDARD_2", - "N2D_STANDARD_4", - "N2D_STANDARD_8", - "N2D_STANDARD_16", - "N2D_STANDARD_32", - "N2D_STANDARD_48", - "N2D_STANDARD_64", - "N2D_STANDARD_80", - "N2D_STANDARD_96", - "N2D_STANDARD_128", - "N2D_STANDARD_224", - "N2D_HIGHMEM_2", - "N2D_HIGHMEM_4", - "N2D_HIGHMEM_8", - "N2D_HIGHMEM_16", - "N2D_HIGHMEM_32", - "N2D_HIGHMEM_48", - "N2D_HIGHMEM_64", - "N2D_HIGHMEM_80", - "N2D_HIGHMEM_96", - "N2D_HIGHCPU_2", - "N2D_HIGHCPU_4", - "N2D_HIGHCPU_8", - "N2D_HIGHCPU_16", - "N2D_HIGHCPU_32", - "N2D_HIGHCPU_48", - "N2D_HIGHCPU_64", - "N2D_HIGHCPU_80", - "N2D_HIGHCPU_96", - "N2D_HIGHCPU_128", - "N2D_HIGHCPU_224", - "C2_STANDARD_4", - "C2_STANDARD_8", - "C2_STANDARD_16", - "C2_STANDARD_30", - "C2_STANDARD_60", - "C2D_STANDARD_2", - "C2D_STANDARD_4", - "C2D_STANDARD_8", - "C2D_STANDARD_16", - "C2D_STANDARD_32", - "C2D_STANDARD_56", - "C2D_STANDARD_112", - "C2D_HIGHCPU_2", - "C2D_HIGHCPU_4", - "C2D_HIGHCPU_8", - "C2D_HIGHCPU_16", - "C2D_HIGHCPU_32", - "C2D_HIGHCPU_56", - "C2D_HIGHCPU_112", - "C2D_HIGHMEM_2", - "C2D_HIGHMEM_4", - "C2D_HIGHMEM_8", - "C2D_HIGHMEM_16", - "C2D_HIGHMEM_32", - "C2D_HIGHMEM_56", - "C2D_HIGHMEM_112", - "G2_STANDARD_4", - "G2_STANDARD_8", - "G2_STANDARD_12", - "G2_STANDARD_16", - "G2_STANDARD_24", - "G2_STANDARD_32", - "G2_STANDARD_48", - "G2_STANDARD_96", - "C3_STANDARD_4", - "C3_STANDARD_8", - "C3_STANDARD_22", - "C3_STANDARD_44", - "C3_STANDARD_88", - "C3_STANDARD_176", - "C3_HIGHCPU_4", - "C3_HIGHCPU_8", - "C3_HIGHCPU_22", - "C3_HIGHCPU_44", - "C3_HIGHCPU_88", - "C3_HIGHCPU_176", - "C3_HIGHMEM_4", - "C3_HIGHMEM_8", - "C3_HIGHMEM_22", - "C3_HIGHMEM_44", - "C3_HIGHMEM_88", - "C3_HIGHMEM_176" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "memories": { - "description": "Required. VM memory in gb.", - "format": "double", - "type": "number" - }, - "ramType": { - "description": "Required. Type of ram.", - "enum": [ - "UNKNOWN_RAM_TYPE", - "A2", - "A3", - "C2", - "C2D", - "CUSTOM", - "E2", - "G2", - "C3", - "M2", - "M1", - "N1", - "N2_CUSTOM", - "N2", - "N2D" - ], - "enumDescriptions": [ - "", - "", - "", - "COMPUTE_OPTIMIZED", - "", - "", - "", - "", - "", - "MEMORY_OPTIMIZED_UPGRADE_PREMIUM", - "MEMORY_OPTIMIZED", - "", - "", - "", - "" - ], - "type": "string" - }, - "trackingLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Billing tracking labels. They do not contain any user data but only the labels set by Vertex Core Infra itself. Tracking labels' keys are defined with special format: goog-[\\p{Ll}\\p{N}]+ E.g. \"key\": \"goog-k8s-cluster-name\",\"value\": \"us-east1-b4rk\"", - "type": "object" - } - }, - "type": "object" - }, "Sentence": { "description": "Represents a sentence in the input document.", "id": "Sentence", @@ -1941,3080 +700,6 @@ } }, "type": "object" - }, - "TpuMetric": { - "id": "TpuMetric", - "properties": { - "tpuSec": { - "description": "Required. Seconds of TPU usage, e.g. 3600.", - "format": "int64", - "type": "string" - }, - "tpuType": { - "description": "Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD.", - "enum": [ - "UNKNOWN_TPU_TYPE", - "TPU_V2_POD", - "TPU_V2", - "TPU_V3_POD", - "TPU_V3", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSArrayStats": { - "description": "The data statistics of a series of ARRAY values.", - "id": "XPSArrayStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "memberStats": { - "$ref": "XPSDataStats", - "description": "Stats of all the values of all arrays, as if they were a single long series of data. The type depends on the element type of the array." - } - }, - "type": "object" - }, - "XPSBatchPredictResponse": { - "id": "XPSBatchPredictResponse", - "properties": { - "exampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples for batch prediction result. Under full API implementation, results are stored in shared RecordIO of AnnotatedExample protobufs, the annotations field of which is populated by XPS backend." - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntry": { - "description": "Bounding box matching model metrics for a single intersection-over-union threshold and multiple label match confidence thresholds.", - "id": "XPSBoundingBoxMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "The intersection-over-union threshold value used to compute this metrics entry.", - "format": "float", - "type": "number" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSBoundingBoxMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSCategoryStats": { - "description": "The data statistics of a series of CATEGORY values.", - "id": "XPSCategoryStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topCategoryStats": { - "description": "The statistics of the top 20 CATEGORY values, ordered by CategoryStats.SingleCategoryStats.count.", - "items": { - "$ref": "XPSCategoryStatsSingleCategoryStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCategoryStatsSingleCategoryStats": { - "description": "The statistics of a single CATEGORY value.", - "id": "XPSCategoryStatsSingleCategoryStats", - "properties": { - "count": { - "description": "The number of occurrences of this value in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The CATEGORY value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSClassificationEvaluationMetrics": { - "description": "Model evaluation metrics for classification problems. It can be used for image and video classification. Next tag: 9.", - "id": "XPSClassificationEvaluationMetrics", - "properties": { - "auPrc": { - "description": "The Area under precision recall curve metric.", - "format": "float", - "type": "number" - }, - "auRoc": { - "description": "The Area Under Receiver Operating Characteristic curve metric. Micro-averaged for the overall evaluation.", - "format": "float", - "type": "number" - }, - "baseAuPrc": { - "description": "The Area under precision recall curve metric based on priors.", - "format": "float", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the evaluation. Only set for MULTICLASS classification problems where number of annotation specs is no more than 10. Only set for model level evaluation, not for evaluation per label." - }, - "evaluatedExamplesCount": { - "description": "The number of examples used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "logLoss": { - "description": "The Log Loss metric.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSColorMap": { - "description": "Map from color to display name. Will only be used by Image Segmentation for uCAIP.", - "id": "XPSColorMap", - "properties": { - "annotationSpecIdToken": { - "description": "Should be used during training.", - "type": "string" - }, - "color": { - "$ref": "Color", - "deprecated": true, - "description": "This type is deprecated in favor of the IntColor below. This is because google.type.Color represent color has a float which semantically does not reflect discrete classes/categories concept. Moreover, to handle it well we need to have some tolerance when converting to a discretized color. As such, the recommendation is to have API surface still use google.type.Color while internally IntColor is used." - }, - "displayName": { - "description": "Should be used during preprocessing.", - "type": "string" - }, - "intColor": { - "$ref": "XPSColorMapIntColor" - } - }, - "type": "object" - }, - "XPSColorMapIntColor": { - "description": "RGB color and each channel is represented by an integer.", - "id": "XPSColorMapIntColor", - "properties": { - "blue": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "green": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - }, - "red": { - "description": "The value should be in range of [0, 255].", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSColumnSpec": { - "id": "XPSColumnSpec", - "properties": { - "columnId": { - "description": "The unique id of the column. When Preprocess, the Tables BE will popuate the order id of the column, which reflects the order of the column inside the table, i.e. 0 means the first column in the table, N-1 means the last column. AutoML BE will persist this order id in Spanner and set the order id here when calling RefreshTablesStats and Train. Note: it's different than the column_spec_id that is generated in AutoML BE.", - "format": "int32", - "type": "integer" - }, - "dataStats": { - "$ref": "XPSDataStats", - "description": "The data stats of the column. It's outputed in RefreshTablesStats and a required input for Train." - }, - "dataType": { - "$ref": "XPSDataType", - "description": "The data type of the column. It's outputed in Preprocess rpc and a required input for RefreshTablesStats and Train." - }, - "displayName": { - "description": "The display name of the column. It's outputed in Preprocess and a required input for RefreshTablesStats and Train.", - "type": "string" - }, - "forecastingMetadata": { - "$ref": "XPSColumnSpecForecastingMetadata" - }, - "topCorrelatedColumns": { - "description": "It's outputed in RefreshTablesStats, and a required input in Train.", - "items": { - "$ref": "XPSColumnSpecCorrelatedColumn" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSColumnSpecCorrelatedColumn": { - "description": "Identifies a table's column, and its correlation with the column this ColumnSpec describes.", - "id": "XPSColumnSpecCorrelatedColumn", - "properties": { - "columnId": { - "format": "int32", - "type": "integer" - }, - "correlationStats": { - "$ref": "XPSCorrelationStats" - } - }, - "type": "object" - }, - "XPSColumnSpecForecastingMetadata": { - "description": "=========================================================================== # The fields below are used exclusively for Forecasting.", - "id": "XPSColumnSpecForecastingMetadata", - "properties": { - "columnType": { - "description": "The type of the column for FORECASTING model training purposes.", - "enum": [ - "COLUMN_TYPE_UNSPECIFIED", - "KEY", - "KEY_METADATA", - "TIME_SERIES_AVAILABLE_PAST_ONLY", - "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - ], - "enumDescriptions": [ - "An un-set value of this enum.", - "Key columns are used to identify timeseries.", - "This column contains information describing static properties of the entities identified by the key column(s) (e.g. city's ZIP code).", - "This column contains information for the given entity, at any time poinrt, they are only available in the time series before.", - "This column contains information for the given entity is known both for the past and the sufficiently far future." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSCommonStats": { - "description": "Common statistics for a column with a specified data type.", - "id": "XPSCommonStats", - "properties": { - "distinctValueCount": { - "format": "int64", - "type": "string" - }, - "nullValueCount": { - "format": "int64", - "type": "string" - }, - "validValueCount": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfidenceMetricsEntry": { - "description": "ConfidenceMetricsEntry includes generic precision, recall, f1 score etc. Next tag: 16.", - "id": "XPSConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Metrics are computed with an assumption that the model never return predictions with score lower than this value.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "f1ScoreAt1": { - "description": "The harmonic mean of recall_at1 and precision_at1.", - "format": "float", - "type": "number" - }, - "falseNegativeCount": { - "description": "The number of ground truth labels that are not matched by a model created label.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "The number of model created labels that do not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "False Positive Rate for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "falsePositiveRateAt1": { - "description": "The False Positive Rate when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "positionThreshold": { - "description": "Metrics are computed with an assumption that the model always returns at most this many predictions (ordered by their score, descendingly), but they all still need to meet the confidence_threshold.", - "format": "int32", - "type": "integer" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "precisionAt1": { - "description": "The precision when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall (true positive rate) for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recallAt1": { - "description": "The recall (true positive rate) when only considering the label that has the highest prediction score and not below the confidence threshold for each example.", - "format": "float", - "type": "number" - }, - "trueNegativeCount": { - "description": "The number of labels that were not created by the model, but if they would, they would not match a ground truth label.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "The number of model created labels that match a ground truth label.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSConfusionMatrix": { - "description": "Confusion matrix of the model running the classification.", - "id": "XPSConfusionMatrix", - "properties": { - "annotationSpecIdToken": { - "description": "For the following three repeated fields, only one is intended to be set. annotation_spec_id_token is preferable to be set. ID tokens of the annotation specs used in the confusion matrix.", - "items": { - "type": "string" - }, - "type": "array" - }, - "category": { - "description": "Category (mainly for segmentation). Set only for image segmentation models. Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "row": { - "description": "Rows in the confusion matrix. The number of rows is equal to the size of `annotation_spec_id_token`. `row[i].value[j]` is the number of examples that have ground truth of the `annotation_spec_id_token[i]` and are predicted as `annotation_spec_id_token[j]` by the model being evaluated.", - "items": { - "$ref": "XPSConfusionMatrixRow" - }, - "type": "array" - }, - "sentimentLabel": { - "description": "Sentiment labels used in the confusion matrix. Set only for text sentiment models. For AutoML Text Revamp, use `annotation_spec_id_token` instead and leave this field empty.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSConfusionMatrixRow": { - "description": "A row in the confusion matrix.", - "id": "XPSConfusionMatrixRow", - "properties": { - "count": { - "description": "Same as above except intended to represent other counts (for e.g. for segmentation this is pixel count). NOTE(params): Only example_count or count is set (oneoff does not support repeated fields unless they are embedded inside another message).", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "exampleCount": { - "description": "Value of the specific cell in the confusion matrix. The number of values each row has (i.e. the length of the row) is equal to the length of the annotation_spec_id_token field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSCoreMlFormat": { - "description": "A model format used for iOS mobile devices.", - "id": "XPSCoreMlFormat", - "properties": {}, - "type": "object" - }, - "XPSCorrelationStats": { - "description": "A correlation statistics between two series of DataType values. The series may have differing DataType-s, but within a single series the DataType must be the same.", - "id": "XPSCorrelationStats", - "properties": { - "cramersV": { - "description": "The correlation value using the Cramer's V measure.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSDataErrors": { - "description": "Different types of errors and the stats associatesd with each error.", - "id": "XPSDataErrors", - "properties": { - "count": { - "description": "Number of records having errors associated with the enum.", - "format": "int32", - "type": "integer" - }, - "errorType": { - "description": "Type of the error.", - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "UNSUPPORTED_AUDIO_FORMAT", - "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT", - "FILE_TOO_LARGE", - "MISSING_TRANSCRIPTION" - ], - "enumDescriptions": [ - "Not specified.", - "Audio format not in the formats by cloud-speech AutoML. Currently only wav and flac file formats are supported.", - "File format differnt from what is specified in the file name extension.", - "File too large. Maximum allowed size is 50 MB.", - "Transcript is missing." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDataStats": { - "description": "The data statistics of a series of values that share the same DataType.", - "id": "XPSDataStats", - "properties": { - "arrayStats": { - "$ref": "XPSArrayStats", - "description": "The statistics for ARRAY DataType." - }, - "categoryStats": { - "$ref": "XPSCategoryStats", - "description": "The statistics for CATEGORY DataType." - }, - "distinctValueCount": { - "description": "The number of distinct values.", - "format": "int64", - "type": "string" - }, - "float64Stats": { - "$ref": "XPSFloat64Stats", - "description": "The statistics for FLOAT64 DataType." - }, - "nullValueCount": { - "description": "The number of values that are null.", - "format": "int64", - "type": "string" - }, - "stringStats": { - "$ref": "XPSStringStats", - "description": "The statistics for STRING DataType." - }, - "structStats": { - "$ref": "XPSStructStats", - "description": "The statistics for STRUCT DataType." - }, - "timestampStats": { - "$ref": "XPSTimestampStats", - "description": "The statistics for TIMESTAMP DataType." - }, - "validValueCount": { - "description": "The number of values that are valid.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSDataType": { - "description": "Indicated the type of data that can be stored in a structured data entity (e.g. a table).", - "id": "XPSDataType", - "properties": { - "compatibleDataTypes": { - "description": "The highly compatible data types to this data type.", - "items": { - "$ref": "XPSDataType" - }, - "type": "array" - }, - "listElementType": { - "$ref": "XPSDataType", - "description": "If type_code == ARRAY, then `list_element_type` is the type of the elements." - }, - "nullable": { - "description": "If true, this DataType can also be `null`.", - "type": "boolean" - }, - "structType": { - "$ref": "XPSStructType", - "description": "If type_code == STRUCT, then `struct_type` provides type information for the struct's fields." - }, - "timeFormat": { - "description": "If type_code == TIMESTAMP then `time_format` provides the format in which that time field is expressed. The time_format must be written in `strftime` syntax. If time_format is not set, then the default format as described on the field is used.", - "type": "string" - }, - "typeCode": { - "description": "Required. The TypeCode for this type.", - "enum": [ - "TYPE_CODE_UNSPECIFIED", - "FLOAT64", - "TIMESTAMP", - "STRING", - "ARRAY", - "STRUCT", - "CATEGORY" - ], - "enumDescriptions": [ - "Not specified. Should not be used.", - "Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", - "Must be between 0AD and 9999AD. Encoded as `string` according to time_format, or, if that format is not set, then in RFC 3339 `date-time` format, where `time-offset` = `\"Z\"` (e.g. 1985-04-12T23:20:50.52Z).", - "Encoded as `string`.", - "Encoded as `list`, where the list elements are represented according to list_element_type.", - "Encoded as `struct`, where field values are represented according to struct_type.", - "Values of this type are not further understood by AutoML, e.g. AutoML is unable to tell the order of values (as it could with FLOAT64), or is unable to say if one value contains another (as it could with STRING). Encoded as `string` (bytes should be base64-encoded, as described in RFC 4648, section 4)." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSDockerFormat": { - "description": "A model format used for Docker containers. Use the params field to customize the container. The container is verified to work correctly on ubuntu 16.04 operating system.", - "id": "XPSDockerFormat", - "properties": { - "cpuArchitecture": { - "description": "Optional. Additional cpu information describing the requirements for the to be exported model files.", - "enum": [ - "CPU_ARCHITECTURE_UNSPECIFIED", - "CPU_ARCHITECTURE_X86_64" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "gpuArchitecture": { - "description": "Optional. Additional gpu information describing the requirements for the to be exported model files.", - "enum": [ - "GPU_ARCHITECTURE_UNSPECIFIED", - "GPU_ARCHITECTURE_NVIDIA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSEdgeTpuTfLiteFormat": { - "description": "A model format used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "id": "XPSEdgeTpuTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSEvaluationMetrics": { - "description": "Contains xPS-specific model evaluation metrics either for a single annotation spec (label), or for the model overall. Next tag: 18.", - "id": "XPSEvaluationMetrics", - "properties": { - "annotationSpecIdToken": { - "description": "The annotation_spec for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The value comes from the input annotations in AnnotatedExample. For MVP product or for text sentiment models where annotation_spec_id_token is not available, set label instead.", - "type": "string" - }, - "category": { - "description": "The integer category label for which this evaluation metric instance had been created. Valid categories are 0 or higher. Overall model evaluation should set this to negative values (rather than implicit zero). Only used for Image Segmentation (prefer to set annotation_spec_id_token instead). Note: uCAIP Image Segmentation should use annotation_spec_id_token.", - "format": "int32", - "type": "integer" - }, - "evaluatedExampleCount": { - "description": "The number of examples used to create this evaluation metrics instance.", - "format": "int32", - "type": "integer" - }, - "imageClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "imageObjectDetectionEvalMetrics": { - "$ref": "XPSImageObjectDetectionEvaluationMetrics" - }, - "imageSegmentationEvalMetrics": { - "$ref": "XPSImageSegmentationEvaluationMetrics" - }, - "label": { - "description": "The label for which this evaluation metrics instance had been created. Empty iff this is an overall model evaluation (like Tables evaluation metrics), i.e. aggregated across all labels. The label maps to AnnotationSpec.display_name in Public API protos. Only used by MVP implementation and text sentiment FULL implementation.", - "type": "string" - }, - "regressionEvalMetrics": { - "$ref": "XPSRegressionEvaluationMetrics" - }, - "tablesClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "tablesEvalMetrics": { - "$ref": "XPSTablesEvaluationMetrics" - }, - "textClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "textExtractionEvalMetrics": { - "$ref": "XPSTextExtractionEvaluationMetrics" - }, - "textSentimentEvalMetrics": { - "$ref": "XPSTextSentimentEvaluationMetrics" - }, - "translationEvalMetrics": { - "$ref": "XPSTranslationEvaluationMetrics" - }, - "videoActionRecognitionEvalMetrics": { - "$ref": "XPSVideoActionRecognitionEvaluationMetrics" - }, - "videoClassificationEvalMetrics": { - "$ref": "XPSClassificationEvaluationMetrics" - }, - "videoObjectTrackingEvalMetrics": { - "$ref": "XPSVideoObjectTrackingEvaluationMetrics" - } - }, - "type": "object" - }, - "XPSEvaluationMetricsSet": { - "description": "Specifies location of model evaluation metrics.", - "id": "XPSEvaluationMetricsSet", - "properties": { - "evaluationMetrics": { - "description": "Inline EvaluationMetrics - should be relatively small. For passing large quantities of exhaustive metrics, use file_spec.", - "items": { - "$ref": "XPSEvaluationMetrics" - }, - "type": "array" - }, - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec containing evaluation metrics of a model, must point to RecordIO file(s) of intelligence.cloud.automl.xps.EvaluationMetrics messages." - }, - "numEvaluationMetrics": { - "description": "Number of the evaluation metrics (usually one per label plus overall).", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExampleSet": { - "description": "Set of examples or input sources.", - "id": "XPSExampleSet", - "properties": { - "fileSpec": { - "$ref": "XPSFileSpec", - "description": "File spec of the examples or input sources." - }, - "fingerprint": { - "description": "Fingerprint of the example set.", - "format": "int64", - "type": "string" - }, - "numExamples": { - "description": "Number of examples.", - "format": "int64", - "type": "string" - }, - "numInputSources": { - "description": "Number of input sources.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSExportModelOutputConfig": { - "id": "XPSExportModelOutputConfig", - "properties": { - "coreMlFormat": { - "$ref": "XPSCoreMlFormat" - }, - "dockerFormat": { - "$ref": "XPSDockerFormat" - }, - "edgeTpuTfLiteFormat": { - "$ref": "XPSEdgeTpuTfLiteFormat" - }, - "exportFirebaseAuxiliaryInfo": { - "description": "For any model and format: If true, will additionally export FirebaseExportedModelInfo in a firebase.txt file.", - "type": "boolean" - }, - "outputGcrUri": { - "description": "The Google Contained Registry (GCR) path the exported files to be pushed to. This location is set if the exported format is DOCKDER.", - "type": "string" - }, - "outputGcsUri": { - "description": "The Google Cloud Storage (GCS) directory where XPS will output the exported models and related files. Format: gs://bucket/directory", - "type": "string" - }, - "tfJsFormat": { - "$ref": "XPSTfJsFormat" - }, - "tfLiteFormat": { - "$ref": "XPSTfLiteFormat" - }, - "tfSavedModelFormat": { - "$ref": "XPSTfSavedModelFormat" - } - }, - "type": "object" - }, - "XPSFileSpec": { - "description": "Spec of input and output files, on external file systems (CNS, GCS, etc).", - "id": "XPSFileSpec", - "properties": { - "directoryPath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - }, - "fileFormat": { - "enum": [ - "FILE_FORMAT_UNKNOWN", - "FILE_FORMAT_SSTABLE", - "FILE_FORMAT_TRANSLATION_RKV", - "FILE_FORMAT_RECORDIO", - "FILE_FORMAT_RAW_CSV", - "FILE_FORMAT_RAW_CAPACITOR" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "Internal format for parallel text data used by Google Translate. go/rkvtools", - "", - "Only the lexicographically first file described by the file_spec contains the header line.", - "" - ], - "type": "string" - }, - "fileSpec": { - "description": "Single file path, or file pattern of format \"/path/to/file@shard_count\". E.g. /cns/cell-d/somewhere/file@2 is expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and /cns/cell-d/somewhere/file-00001-of-00002.", - "type": "string" - }, - "singleFilePath": { - "deprecated": true, - "description": "Deprecated. Use file_spec.", - "type": "string" - } - }, - "type": "object" - }, - "XPSFloat64Stats": { - "description": "The data statistics of a series of FLOAT64 values.", - "id": "XPSFloat64Stats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "histogramBuckets": { - "description": "Histogram buckets of the data series. Sorted by the min value of the bucket, ascendingly, and the number of the buckets is dynamically generated. The buckets are non-overlapping and completely cover whole FLOAT64 range with min of first bucket being `\"-Infinity\"`, and max of the last one being `\"Infinity\"`.", - "items": { - "$ref": "XPSFloat64StatsHistogramBucket" - }, - "type": "array" - }, - "mean": { - "description": "The mean of the series.", - "format": "double", - "type": "number" - }, - "quantiles": { - "description": "Ordered from 0 to k k-quantile values of the data series of n values. The value at index i is, approximately, the i*n/k-th smallest value in the series; for i = 0 and i = k these are, respectively, the min and max values.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - }, - "standardDeviation": { - "description": "The standard deviation of the series.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSFloat64StatsHistogramBucket": { - "description": "A bucket of a histogram.", - "id": "XPSFloat64StatsHistogramBucket", - "properties": { - "count": { - "description": "The number of data values that are in the bucket, i.e. are between min and max values.", - "format": "int64", - "type": "string" - }, - "max": { - "description": "The maximum value of the bucket, exclusive unless max = `\"Infinity\"`, in which case it's inclusive.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum value of the bucket, inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageClassificationTrainResponse": { - "id": "XPSImageClassificationTrainResponse", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Populated for AutoMl requests." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostInNodeTime": { - "description": "The actual cost to create this model. - For edge type model, the cost is expressed in node hour. - For cloud type model,the cost is expressed in compute hour. - Populated for models created before GA. To be deprecated after GA.", - "format": "google-duration", - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual training cost, expressed in node seconds. Populated for models trained in node time.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSImageExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageModelArtifactSpec": { - "description": "Stores the locations and related metadata of the model artifacts. Populated for uCAIP requests only.", - "id": "XPSImageModelArtifactSpec", - "properties": { - "checkpointArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The Tensorflow checkpoint files. e.g. Used for resumable training." - }, - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "labelGcsUri": { - "description": "GCS uri of decoded labels file for model export 'dict.txt'.", - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud AI Platform API." - }, - "tfJsBinaryGcsPrefix": { - "description": "GCS uri prefix of Tensorflow JavaScript binary files 'groupX-shardXofX.bin' Deprecated.", - "type": "string" - }, - "tfLiteMetadataGcsUri": { - "description": "GCS uri of Tensorflow Lite metadata 'tflite_metadata.json'.", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpec": { - "description": "Serving specification for image models.", - "id": "XPSImageModelServingSpec", - "properties": { - "modelThroughputEstimation": { - "description": "Populate under uCAIP request scope.", - "items": { - "$ref": "XPSImageModelServingSpecModelThroughputEstimation" - }, - "type": "array" - }, - "nodeQps": { - "description": "An estimated value of how much traffic a node can serve. Populated for AutoMl request only.", - "format": "double", - "type": "number" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageModelServingSpecModelThroughputEstimation": { - "id": "XPSImageModelServingSpecModelThroughputEstimation", - "properties": { - "computeEngineAcceleratorType": { - "enum": [ - "UNSPECIFIED", - "NVIDIA_TESLA_K80", - "NVIDIA_TESLA_P100", - "NVIDIA_TESLA_V100", - "NVIDIA_TESLA_P4", - "NVIDIA_TESLA_T4", - "NVIDIA_TESLA_A100", - "NVIDIA_A100_80GB", - "NVIDIA_L4", - "NVIDIA_H100_80GB", - "TPU_V2", - "TPU_V3", - "TPU_V4_POD", - "TPU_V5_LITEPOD" - ], - "enumDescriptions": [ - "", - "Nvidia Tesla K80 GPU.", - "Nvidia Tesla P100 GPU.", - "Nvidia Tesla V100 GPU.", - "Nvidia Tesla P4 GPU.", - "Nvidia Tesla T4 GPU.", - "Nvidia Tesla A100 GPU.", - "Nvidia A100 80GB GPU.", - "Nvidia L4 GPU.", - "Nvidia H100 80Gb GPU.", - "TPU v2 (JellyFish).", - "TPU v3 (DragonFish).", - "TPU_v4 (PufferFish).", - "TPU v5 Lite Pods." - ], - "type": "string" - }, - "latencyInMilliseconds": { - "description": "Estimated latency.", - "format": "double", - "type": "number" - }, - "nodeQps": { - "description": "The approximate qps a deployed node can serve.", - "format": "double", - "type": "number" - }, - "servomaticPartitionType": { - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionEvaluationMetrics": { - "description": "Model evaluation metrics for image object detection problems. Evaluates prediction quality of labeled bounding boxes.", - "id": "XPSImageObjectDetectionEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingBoxCount": { - "description": "The total number of bounding boxes (i.e. summed over all images) the ground truth used to create this evaluation had.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSImageObjectDetectionModelSpec": { - "id": "XPSImageObjectDetectionModelSpec", - "properties": { - "classCount": { - "description": "Total number of classes.", - "format": "int64", - "type": "string" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec" - }, - "maxBoundingBoxCount": { - "description": "Max number of bounding box.", - "format": "int64", - "type": "string" - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetrics": { - "description": "Model evaluation metrics for image segmentation problems. Next tag: 4.", - "id": "XPSImageSegmentationEvaluationMetrics", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve can be derived from it.", - "items": { - "$ref": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the per confidence_threshold evaluation. Pixel counts are set here. Only set for model level evaluation, not for evaluation per label." - }, - "diceScoreCoefficient": { - "description": "DSC or the F1 score: The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "iouScore": { - "description": "IOU score.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSImageSegmentationTrainResponse": { - "id": "XPSImageSegmentationTrainResponse", - "properties": { - "colorMaps": { - "description": "Color map of the model.", - "items": { - "$ref": "XPSColorMap" - }, - "type": "array" - }, - "exportModelSpec": { - "$ref": "XPSImageExportModelSpec", - "description": "NOTE: These fields are not used/needed in EAP but will be set later." - }, - "modelArtifactSpec": { - "$ref": "XPSImageModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope. Model artifact spec stores and model gcs pathes and related metadata" - }, - "modelServingSpec": { - "$ref": "XPSImageModelServingSpec" - }, - "stopReason": { - "description": "Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'.", - "enum": [ - "TRAIN_STOP_REASON_UNSPECIFIED", - "TRAIN_STOP_REASON_BUDGET_REACHED", - "TRAIN_STOP_REASON_MODEL_CONVERGED", - "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - ], - "enumDescriptions": [ - "", - "", - "Model fully converged, can not be resumbed training.", - "Model early converged, can be further trained till full convergency." - ], - "type": "string" - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSIntegratedGradientsAttribution": { - "deprecated": true, - "description": "An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365", - "id": "XPSIntegratedGradientsAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSMetricEntry": { - "id": "XPSMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "XPSMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSMetricEntryLabel": { - "id": "XPSMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "XPSModelArtifactItem": { - "description": "A single model artifact item.", - "id": "XPSModelArtifactItem", - "properties": { - "artifactFormat": { - "description": "The model artifact format.", - "enum": [ - "ARTIFACT_FORMAT_UNSPECIFIED", - "TF_CHECKPOINT", - "TF_SAVED_MODEL", - "TF_LITE", - "EDGE_TPU_TF_LITE", - "TF_JS", - "CORE_ML" - ], - "enumDescriptions": [ - "Should not be used.", - "The Tensorflow checkpoints. See https://www.tensorflow.org/guide/checkpoint.", - "The Tensorflow SavedModel binary.", - "Model artifact in generic TensorFlow Lite (.tflite) format. See https://www.tensorflow.org/lite.", - "Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.", - "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "Used for iOS mobile devices in (.mlmodel) format. See https://developer.apple.com/documentation/coreml" - ], - "type": "string" - }, - "gcsUri": { - "description": "The Google Cloud Storage (GCS) uri that stores the model binary files.", - "type": "string" - } - }, - "type": "object" - }, - "XPSPreprocessResponse": { - "description": "Next ID: 8", - "id": "XPSPreprocessResponse", - "properties": { - "outputExampleSet": { - "$ref": "XPSExampleSet", - "description": "Preprocessed examples, that are to be imported into AutoML storage. This should point to RecordIO file(s) of PreprocessedExample messages. The PreprocessedExample.mvp_training_data-s returned here are later verbatim passed to Train() call in TrainExample.mvp_training_data." - }, - "speechPreprocessResp": { - "$ref": "XPSSpeechPreprocessResponse" - }, - "tablesPreprocessResponse": { - "$ref": "XPSTablesPreprocessResponse" - }, - "translationPreprocessResp": { - "$ref": "XPSTranslationPreprocessResponse" - } - }, - "type": "object" - }, - "XPSRegressionEvaluationMetrics": { - "description": "Model evaluation metrics for regression problems. It can be used for Tables.", - "id": "XPSRegressionEvaluationMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean Absolute Error (MAE).", - "format": "float", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error. Only set if all ground truth values are positive.", - "format": "float", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "float", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root Mean Squared Error (RMSE).", - "format": "float", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSRegressionMetricsEntry": { - "description": "A pair of actual \u0026 observed values for the model being evaluated.", - "id": "XPSRegressionMetricsEntry", - "properties": { - "predictedValue": { - "description": "The observed value for a row in the dataset.", - "format": "float", - "type": "number" - }, - "trueValue": { - "description": "The actual target value for a row in the dataset.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSReportingMetrics": { - "id": "XPSReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "XPSMetricEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadata": { - "deprecated": true, - "id": "XPSResponseExplanationMetadata", - "properties": { - "inputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataInputMetadata" - }, - "description": "Metadata of the input.", - "type": "object" - }, - "outputs": { - "additionalProperties": { - "$ref": "XPSResponseExplanationMetadataOutputMetadata" - }, - "description": "Metadata of the output.", - "type": "object" - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataInputMetadata": { - "description": "Metadata of the input of a feature.", - "id": "XPSResponseExplanationMetadataInputMetadata", - "properties": { - "inputTensorName": { - "description": "Name of the input tensor for this model. Only needed in train response.", - "type": "string" - }, - "modality": { - "description": "Modality of the feature. Valid values are: numeric, image. Defaults to numeric.", - "enum": [ - "MODALITY_UNSPECIFIED", - "NUMERIC", - "IMAGE", - "CATEGORICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "visualizationConfig": { - "$ref": "XPSVisualization", - "description": "Visualization configurations for image explanation." - } - }, - "type": "object" - }, - "XPSResponseExplanationMetadataOutputMetadata": { - "description": "Metadata of the prediction output to be explained.", - "id": "XPSResponseExplanationMetadataOutputMetadata", - "properties": { - "outputTensorName": { - "description": "Name of the output tensor. Only needed in train response.", - "type": "string" - } - }, - "type": "object" - }, - "XPSResponseExplanationParameters": { - "deprecated": true, - "id": "XPSResponseExplanationParameters", - "properties": { - "integratedGradientsAttribution": { - "$ref": "XPSIntegratedGradientsAttribution", - "description": "An attribution method that computes Aumann-Shapley values taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365" - }, - "xraiAttribution": { - "$ref": "XPSXraiAttribution", - "description": "An attribution method that redistributes Integrated Gradients attribution to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 XRAI currently performs better on natural images, like a picture of a house or an animal. If the images are taken in artificial environments, like a lab or manufacturing line, or from diagnostic equipment, like x-rays or quality-control cameras, use Integrated Gradients instead." - } - }, - "type": "object" - }, - "XPSResponseExplanationSpec": { - "deprecated": true, - "description": "Specification of Model explanation. Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 for context.", - "id": "XPSResponseExplanationSpec", - "properties": { - "explanationType": { - "description": "Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`", - "type": "string" - }, - "metadata": { - "$ref": "XPSResponseExplanationMetadata", - "description": "Metadata describing the Model's input and output for explanation." - }, - "parameters": { - "$ref": "XPSResponseExplanationParameters", - "description": "Parameters that configure explaining of the Model's predictions." - } - }, - "type": "object" - }, - "XPSRow": { - "id": "XPSRow", - "properties": { - "columnIds": { - "description": "The ids of the columns. Note: The below `values` field must match order of this field, if this field is set.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "values": { - "description": "The values of the row cells, given in the same order as the column_ids. If column_ids is not set, then in the same order as the input_feature_column_ids in TablesModelMetadata.", - "items": { - "type": "any" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetrics": { - "id": "XPSSpeechEvaluationMetrics", - "properties": { - "subModelEvaluationMetrics": { - "description": "Evaluation metrics for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechEvaluationMetricsSubModelEvaluationMetric": { - "id": "XPSSpeechEvaluationMetricsSubModelEvaluationMetric", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - }, - "numDeletions": { - "format": "int32", - "type": "integer" - }, - "numInsertions": { - "format": "int32", - "type": "integer" - }, - "numSubstitutions": { - "format": "int32", - "type": "integer" - }, - "numUtterances": { - "description": "Number of utterances used in the wer computation.", - "format": "int32", - "type": "integer" - }, - "numWords": { - "description": "Number of words over which the word error rate was computed.", - "format": "int32", - "type": "integer" - }, - "sentenceAccuracy": { - "description": "Below fields are used for debugging purposes", - "format": "double", - "type": "number" - }, - "wer": { - "description": "Word error rate (standard error metric used for speech recognition).", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSSpeechModelSpec": { - "id": "XPSSpeechModelSpec", - "properties": { - "datasetId": { - "description": "Required for speech xps backend. Speech xps has to use dataset_id and model_id as the primary key in db so that speech API can query the db directly.", - "format": "int64", - "type": "string" - }, - "language": { - "type": "string" - }, - "subModelSpecs": { - "description": "Model specs for all submodels contained in this model.", - "items": { - "$ref": "XPSSpeechModelSpecSubModelSpec" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSSpeechModelSpecSubModelSpec": { - "id": "XPSSpeechModelSpecSubModelSpec", - "properties": { - "biasingModelType": { - "description": "Type of the biasing model.", - "enum": [ - "BIASING_MODEL_TYPE_UNSPECIFIED", - "COMMAND_AND_SEARCH", - "PHONE_CALL", - "VIDEO", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "Build biasing model on top of COMMAND_AND_SEARCH model", - "Build biasing model on top of PHONE_CALL model", - "Build biasing model on top of VIDEO model", - "Build biasing model on top of DEFAULT model" - ], - "type": "string" - }, - "clientId": { - "description": "In S3, Recognition ClientContextId.client_id", - "type": "string" - }, - "contextId": { - "description": "In S3, Recognition ClientContextId.context_id", - "type": "string" - }, - "isEnhancedModel": { - "description": "If true then it means we have an enhanced version of the biasing models.", - "type": "boolean" - } - }, - "type": "object" - }, - "XPSSpeechPreprocessResponse": { - "id": "XPSSpeechPreprocessResponse", - "properties": { - "cnsTestDataPath": { - "description": "Location od shards of sstables (test data) of DataUtterance protos.", - "type": "string" - }, - "cnsTrainDataPath": { - "description": "Location of shards of sstables (training data) of DataUtterance protos.", - "type": "string" - }, - "prebuiltModelEvaluationMetrics": { - "$ref": "XPSSpeechEvaluationMetrics", - "description": "The metrics for prebuilt speech models. They are included here because there is no prebuilt speech models stored in the AutoML." - }, - "speechPreprocessStats": { - "$ref": "XPSSpeechPreprocessStats", - "description": "Stats associated with the data." - } - }, - "type": "object" - }, - "XPSSpeechPreprocessStats": { - "id": "XPSSpeechPreprocessStats", - "properties": { - "dataErrors": { - "description": "Different types of data errors and the counts associated with them.", - "items": { - "$ref": "XPSDataErrors" - }, - "type": "array" - }, - "numHumanLabeledExamples": { - "description": "The number of rows marked HUMAN_LABELLED", - "format": "int32", - "type": "integer" - }, - "numLogsExamples": { - "description": "The number of samples found in the previously recorded logs data.", - "format": "int32", - "type": "integer" - }, - "numMachineTranscribedExamples": { - "description": "The number of rows marked as MACHINE_TRANSCRIBED", - "format": "int32", - "type": "integer" - }, - "testExamplesCount": { - "description": "The number of examples labelled as TEST by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "testSentencesCount": { - "description": "The number of sentences in the test data set.", - "format": "int32", - "type": "integer" - }, - "testWordsCount": { - "description": "The number of words in the test data set.", - "format": "int32", - "type": "integer" - }, - "trainExamplesCount": { - "description": "The number of examples labeled as TRAIN by Speech xps server.", - "format": "int32", - "type": "integer" - }, - "trainSentencesCount": { - "description": "The number of sentences in the training data set.", - "format": "int32", - "type": "integer" - }, - "trainWordsCount": { - "description": "The number of words in the training data set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSStringStats": { - "description": "The data statistics of a series of STRING values.", - "id": "XPSStringStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "topUnigramStats": { - "description": "The statistics of the top 20 unigrams, ordered by StringStats.UnigramStats.count.", - "items": { - "$ref": "XPSStringStatsUnigramStats" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSStringStatsUnigramStats": { - "description": "The statistics of a unigram.", - "id": "XPSStringStatsUnigramStats", - "properties": { - "count": { - "description": "The number of occurrences of this unigram in the series.", - "format": "int64", - "type": "string" - }, - "value": { - "description": "The unigram.", - "type": "string" - } - }, - "type": "object" - }, - "XPSStructStats": { - "description": "The data statistics of a series of STRUCT values.", - "id": "XPSStructStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "fieldStats": { - "additionalProperties": { - "$ref": "XPSDataStats" - }, - "description": "Map from a field name of the struct to data stats aggregated over series of all data in that field across all the structs.", - "type": "object" - } - }, - "type": "object" - }, - "XPSStructType": { - "description": "`StructType` defines the DataType-s of a STRUCT type.", - "id": "XPSStructType", - "properties": { - "fields": { - "additionalProperties": { - "$ref": "XPSDataType" - }, - "description": "Unordered map of struct field names to their data types.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTableSpec": { - "id": "XPSTableSpec", - "properties": { - "columnSpecs": { - "additionalProperties": { - "$ref": "XPSColumnSpec" - }, - "description": "Mapping from column id to column spec.", - "type": "object" - }, - "importedDataSizeInBytes": { - "description": "The total size of imported data of the table.", - "format": "int64", - "type": "string" - }, - "rowCount": { - "description": "The number of rows in the table.", - "format": "int64", - "type": "string" - }, - "timeColumnId": { - "description": "The id of the time column.", - "format": "int32", - "type": "integer" - }, - "validRowCount": { - "description": "The number of valid rows.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetrics": { - "description": "Metrics for Tables classification problems.", - "id": "XPSTablesClassificationMetrics", - "properties": { - "curveMetrics": { - "description": "Metrics building a curve.", - "items": { - "$ref": "XPSTablesClassificationMetricsCurveMetrics" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesClassificationMetricsCurveMetrics": { - "description": "Metrics curve data point for a single value.", - "id": "XPSTablesClassificationMetricsCurveMetrics", - "properties": { - "aucPr": { - "description": "The area under the precision-recall curve.", - "format": "double", - "type": "number" - }, - "aucRoc": { - "description": "The area under receiver operating characteristic curve.", - "format": "double", - "type": "number" - }, - "confidenceMetricsEntries": { - "description": "Metrics that have confidence thresholds. Precision-recall curve and ROC curve can be derived from them.", - "items": { - "$ref": "XPSTablesConfidenceMetricsEntry" - }, - "type": "array" - }, - "logLoss": { - "description": "The Log loss metric.", - "format": "double", - "type": "number" - }, - "positionThreshold": { - "description": "The position threshold value used to compute the metrics.", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The CATEGORY row value (for ARRAY unnested) the curve metrics are for.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSTablesConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "The confidence threshold value used to compute the metrics.", - "format": "double", - "type": "number" - }, - "f1Score": { - "description": "The harmonic mean of recall and precision. (2 * precision * recall) / (precision + recall)", - "format": "double", - "type": "number" - }, - "falseNegativeCount": { - "description": "False negative count.", - "format": "int64", - "type": "string" - }, - "falsePositiveCount": { - "description": "False positive count.", - "format": "int64", - "type": "string" - }, - "falsePositiveRate": { - "description": "FPR = #false positives / (#false positives + #true negatives)", - "format": "double", - "type": "number" - }, - "precision": { - "description": "Precision = #true positives / (#true positives + #false positives).", - "format": "double", - "type": "number" - }, - "recall": { - "description": "Recall = #true positives / (#true positives + #false negatives).", - "format": "double", - "type": "number" - }, - "trueNegativeCount": { - "description": "True negative count.", - "format": "int64", - "type": "string" - }, - "truePositiveCount": { - "description": "True positive count.", - "format": "int64", - "type": "string" - }, - "truePositiveRate": { - "description": "TPR = #true positives / (#true positives + #false negatvies)", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesDatasetMetadata": { - "description": "Metadata for a dataset used for AutoML Tables. Next ID: 6", - "id": "XPSTablesDatasetMetadata", - "properties": { - "mlUseColumnId": { - "description": "Id the column to split the table.", - "format": "int32", - "type": "integer" - }, - "primaryTableSpec": { - "$ref": "XPSTableSpec", - "description": "Primary table." - }, - "targetColumnCorrelations": { - "additionalProperties": { - "$ref": "XPSCorrelationStats" - }, - "description": "(the column id : its CorrelationStats with target column).", - "type": "object" - }, - "targetColumnId": { - "description": "Id of the primary table column that should be used as the training label.", - "format": "int32", - "type": "integer" - }, - "weightColumnId": { - "description": "Id of the primary table column that should be used as the weight column.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "XPSTablesEvaluationMetrics": { - "id": "XPSTablesEvaluationMetrics", - "properties": { - "classificationMetrics": { - "$ref": "XPSTablesClassificationMetrics", - "description": "Classification metrics." - }, - "regressionMetrics": { - "$ref": "XPSTablesRegressionMetrics", - "description": "Regression metrics." - } - }, - "type": "object" - }, - "XPSTablesModelColumnInfo": { - "description": "An information specific to given column and Tables Model, in context of the Model and the predictions created by it.", - "id": "XPSTablesModelColumnInfo", - "properties": { - "columnId": { - "description": "The ID of the column.", - "format": "int32", - "type": "integer" - }, - "featureImportance": { - "description": "When given as part of a Model: Measurement of how much model predictions correctness on the TEST data depend on values in this column. A value between 0 and 1, higher means higher influence. These values are normalized - for all input feature columns of a given model they add to 1. When given back by Predict or Batch Predict: Measurement of how impactful for the prediction returned for the given row the value in this column was. Specifically, the feature importance specifies the marginal contribution that the feature made to the prediction score compared to the baseline score. These values are computed using the Sampled Shapley method.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesModelStructure": { - "description": "A description of Tables model structure.", - "id": "XPSTablesModelStructure", - "properties": { - "modelParameters": { - "description": "A list of models.", - "items": { - "$ref": "XPSTablesModelStructureModelParameters" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParameters": { - "description": "Model hyper-parameters for a model.", - "id": "XPSTablesModelStructureModelParameters", - "properties": { - "hyperparameters": { - "items": { - "$ref": "XPSTablesModelStructureModelParametersParameter" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTablesModelStructureModelParametersParameter": { - "id": "XPSTablesModelStructureModelParametersParameter", - "properties": { - "floatValue": { - "description": "Float type parameter value.", - "format": "double", - "type": "number" - }, - "intValue": { - "description": "Integer type parameter value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Parameter name.", - "type": "string" - }, - "stringValue": { - "description": "String type parameter value.", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesPreprocessResponse": { - "id": "XPSTablesPreprocessResponse", - "properties": { - "tablesDatasetMetadata": { - "$ref": "XPSTablesDatasetMetadata", - "description": "The table/column id, column_name and the DataTypes of the columns will be populated." - } - }, - "type": "object" - }, - "XPSTablesRegressionMetrics": { - "description": "Metrics for Tables regression problems.", - "id": "XPSTablesRegressionMetrics", - "properties": { - "meanAbsoluteError": { - "description": "Mean absolute error.", - "format": "double", - "type": "number" - }, - "meanAbsolutePercentageError": { - "description": "Mean absolute percentage error, only set if all of the target column's values are positive.", - "format": "double", - "type": "number" - }, - "rSquared": { - "description": "R squared.", - "format": "double", - "type": "number" - }, - "regressionMetricsEntries": { - "description": "A list of actual versus predicted points for the model being evaluated.", - "items": { - "$ref": "XPSRegressionMetricsEntry" - }, - "type": "array" - }, - "rootMeanSquaredError": { - "description": "Root mean squared error.", - "format": "double", - "type": "number" - }, - "rootMeanSquaredLogError": { - "description": "Root mean squared log error.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTablesTrainResponse": { - "id": "XPSTablesTrainResponse", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure" - }, - "predictionSampleRows": { - "description": "Sample rows from the dataset this model was trained.", - "items": { - "$ref": "XPSRow" - }, - "type": "array" - }, - "tablesModelColumnInfo": { - "description": "Output only. Auxiliary information for each of the input_feature_column_specs, with respect to this particular model.", - "items": { - "$ref": "XPSTablesModelColumnInfo" - }, - "type": "array" - }, - "trainCostMilliNodeHours": { - "description": "The actual training cost of the model, expressed in milli node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed to not exceed the train budget.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTablesTrainingOperationMetadata": { - "id": "XPSTablesTrainingOperationMetadata", - "properties": { - "createModelStage": { - "description": "Current stage of creating model.", - "enum": [ - "CREATE_MODEL_STAGE_UNSPECIFIED", - "DATA_PREPROCESSING", - "TRAINING", - "EVALUATING", - "MODEL_POST_PROCESSING" - ], - "enumDescriptions": [ - "Unspecified stage.", - "Prepare the model training pipeline and run data processing.", - "Training model.", - "Run evaluation.", - "Finalizing model training pipeline." - ], - "type": "string" - }, - "optimizationObjective": { - "description": "The optimization objective for model.", - "type": "string" - }, - "topTrials": { - "description": "This field is for training. When the operation is terminated successfully, AutoML Backend post this field to operation metadata in spanner. If the metadata has no trials returned, the training operation is supposed to be a failure.", - "items": { - "$ref": "XPSTuningTrial" - }, - "type": "array" - }, - "trainBudgetMilliNodeHours": { - "description": "Creating model budget.", - "format": "int64", - "type": "string" - }, - "trainingObjectivePoints": { - "description": "This field records the training objective value with respect to time, giving insight into how the model architecture search is performing as training time elapses.", - "items": { - "$ref": "XPSTrainingObjectivePoint" - }, - "type": "array" - }, - "trainingStartTime": { - "description": "Timestamp when training process starts.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextComponentModel": { - "description": "Component model. Next ID: 10", - "id": "XPSTextComponentModel", - "properties": { - "batchPredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold batch prediction model.", - "type": "string" - }, - "onlinePredictionModelGcsUri": { - "description": "The Cloud Storage resource path to hold online prediction model.", - "type": "string" - }, - "partition": { - "description": "The partition where the model is deployed. Populated by uCAIP BE as part of online PredictRequest.", - "enum": [ - "PARTITION_TYPE_UNSPECIFIED", - "PARTITION_ZERO", - "PARTITION_REDUCED_HOMING", - "PARTITION_JELLYFISH", - "PARTITION_CPU", - "PARTITION_CUSTOM_STORAGE_CPU" - ], - "enumDescriptions": [ - "", - "The default partition.", - "It has significantly lower replication than partition-0 and is located in the US only. It also has a larger model size limit and higher default RAM quota than partition-0. Customers with batch traffic, US-based traffic, or very large models should use this partition. Capacity in this partition is significantly cheaper than partition-0.", - "To be used by customers with Jellyfish-accelerated ops. See go/servomatic-jellyfish for details.", - "The partition used by regionalized servomatic cloud regions.", - "The partition used for loading models from custom storage." - ], - "type": "string" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. online predict, batch predict) via public Cloud Ai Platform API." - }, - "servoModelName": { - "description": "The name of servo model. Populated by uCAIP BE as part of online PredictRequest.", - "type": "string" - }, - "submodelName": { - "description": "The name of the trained NL submodel.", - "type": "string" - }, - "submodelType": { - "description": "The type of trained NL submodel", - "enum": [ - "TEXT_MODEL_TYPE_UNSPECIFIED", - "TEXT_MODEL_TYPE_DEFAULT", - "TEXT_MODEL_TYPE_META_ARCHITECT", - "TEXT_MODEL_TYPE_ATC", - "TEXT_MODEL_TYPE_CLARA2", - "TEXT_MODEL_TYPE_CHATBASE", - "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING", - "TEXT_MODEL_TYPE_TEXT_EXTRACTION", - "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION", - "TEXT_MODEL_TYPE_COMPOSITE", - "TEXT_MODEL_TYPE_ALL_MODELS", - "TEXT_MODEL_TYPE_BERT", - "TEXT_MODEL_TYPE_ENC_PALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "Model type for entity extraction.", - "Model type for relationship extraction.", - "A composite model represents a set of component models that have to be used together for prediction. A composite model appears to be a single model to the model user. It may contain only one component model. Please refer to go/cnl-composite-models for more information.", - "Model type used to train default, MA, and ATC models in a single batch worker pipeline.", - "BERT pipeline needs a specific model type, since it uses a different TFX configuration compared with DEFAULT (despite sharing most of the code).", - "Model type for EncPaLM." - ], - "type": "string" - }, - "tfRuntimeVersion": { - "description": "## The fields below are only populated under uCAIP request scope. https://cloud.google.com/ml-engine/docs/runtime-version-list", - "type": "string" - }, - "versionNumber": { - "description": "The servomatic model version number. Populated by uCAIP BE as part of online PredictRequest.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTextExtractionEvaluationMetrics": { - "id": "XPSTextExtractionEvaluationMetrics", - "properties": { - "bestF1ConfidenceMetrics": { - "$ref": "XPSConfidenceMetricsEntry", - "deprecated": true, - "description": "Values are at the highest F1 score on the precision-recall curve. Only confidence_threshold, recall, precision, and f1_score will be set." - }, - "confidenceMetricsEntries": { - "description": "If the enclosing EvaluationMetrics.label is empty, confidence_metrics_entries is an evaluation of the entire model across all labels. If the enclosing EvaluationMetrics.label is set, confidence_metrics_entries applies to that label.", - "items": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "type": "array" - }, - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Confusion matrix of the model, at the default confidence threshold (0.0). Only set for whole-model evaluation, not for evaluation per label." - }, - "perLabelConfidenceMetrics": { - "additionalProperties": { - "$ref": "XPSConfidenceMetricsEntry" - }, - "deprecated": true, - "description": "Only recall, precision, and f1_score will be set.", - "type": "object" - } - }, - "type": "object" - }, - "XPSTextSentimentEvaluationMetrics": { - "description": "Model evaluation metrics for text sentiment problems.", - "id": "XPSTextSentimentEvaluationMetrics", - "properties": { - "confusionMatrix": { - "$ref": "XPSConfusionMatrix", - "description": "Output only. Confusion matrix of the evaluation. Only set for the overall model evaluation, not for evaluation of a single annotation spec." - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "linearKappa": { - "description": "Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanAbsoluteError": { - "description": "Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "meanSquaredError": { - "description": "Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision.", - "format": "float", - "type": "number" - }, - "quadraticKappa": { - "description": "Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTextToSpeechTrainResponse": { - "description": "TextToSpeech train response", - "id": "XPSTextToSpeechTrainResponse", - "properties": {}, - "type": "object" - }, - "XPSTextTrainResponse": { - "id": "XPSTextTrainResponse", - "properties": { - "componentModel": { - "description": "Component submodels.", - "items": { - "$ref": "XPSTextComponentModel" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSTfJsFormat": { - "description": "A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used in the browser and in Node.js using JavaScript.", - "id": "XPSTfJsFormat", - "properties": {}, - "type": "object" - }, - "XPSTfLiteFormat": { - "description": "LINT.IfChange A model format used for mobile and IoT devices. See https://www.tensorflow.org/lite.", - "id": "XPSTfLiteFormat", - "properties": {}, - "type": "object" - }, - "XPSTfSavedModelFormat": { - "description": "A tensorflow model format in SavedModel format.", - "id": "XPSTfSavedModelFormat", - "properties": {}, - "type": "object" - }, - "XPSTimestampStats": { - "description": "The data statistics of a series of TIMESTAMP values.", - "id": "XPSTimestampStats", - "properties": { - "commonStats": { - "$ref": "XPSCommonStats" - }, - "granularStats": { - "additionalProperties": { - "$ref": "XPSTimestampStatsGranularStats" - }, - "description": "The string key is the pre-defined granularity. Currently supported: hour_of_day, day_of_week, month_of_year. Granularities finer that the granularity of timestamp data are not populated (e.g. if timestamps are at day granularity, then hour_of_day is not populated).", - "type": "object" - }, - "medianTimestampNanos": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTimestampStatsGranularStats": { - "description": "Stats split by a defined in context granularity.", - "id": "XPSTimestampStatsGranularStats", - "properties": { - "buckets": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "A map from granularity key to example count for that key. E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).", - "type": "object" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntry": { - "description": "Track matching model metrics for a single track match threshold and multiple label match confidence thresholds. Next tag: 6.", - "id": "XPSTrackMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Output only. Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is derived from them.", - "items": { - "$ref": "XPSTrackMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "iouThreshold": { - "description": "Output only. The intersection-over-union threshold value between bounding boxes across frames used to compute this metric entry.", - "format": "float", - "type": "number" - }, - "meanBoundingBoxIou": { - "description": "Output only. The mean bounding box iou over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanMismatchRate": { - "description": "Output only. The mean mismatch rate over all confidence thresholds.", - "format": "float", - "type": "number" - }, - "meanTrackingAveragePrecision": { - "description": "Output only. The mean average precision over all confidence thresholds.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrackMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold. Next tag: 6.", - "id": "XPSTrackMetricsEntryConfidenceMetricsEntry", - "properties": { - "boundingBoxIou": { - "description": "Output only. Bounding box intersection-over-union precision. Measures how well the bounding boxes overlap between each other (e.g. complete overlap or just barely above iou_threshold).", - "format": "float", - "type": "number" - }, - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "mismatchRate": { - "description": "Output only. Mismatch rate, which measures the tracking consistency, i.e. correctness of instance ID continuity.", - "format": "float", - "type": "number" - }, - "trackingPrecision": { - "description": "Output only. Tracking precision.", - "format": "float", - "type": "number" - }, - "trackingRecall": { - "description": "Output only. Tracking recall.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTrainResponse": { - "description": "Next ID: 18", - "id": "XPSTrainResponse", - "properties": { - "deployedModelSizeBytes": { - "description": "Estimated model size in bytes once deployed.", - "format": "int64", - "type": "string" - }, - "errorAnalysisConfigs": { - "description": "Optional vision model error analysis configuration. The field is set when model error analysis is enabled in the training request. The results of error analysis will be binded together with evaluation results (in the format of AnnotatedExample).", - "items": { - "$ref": "XPSVisionErrorAnalysisConfig" - }, - "type": "array" - }, - "evaluatedExampleSet": { - "$ref": "XPSExampleSet", - "description": "Examples used to evaluate the model (usually the test set), with the predicted annotations. The file_spec should point to recordio file(s) of AnnotatedExample. For each returned example, the example_id_token and annotations predicted by the model must be set. The example payload can and is recommended to be omitted." - }, - "evaluationMetricsSet": { - "$ref": "XPSEvaluationMetricsSet", - "description": "The trained model evaluation metrics. This can be optionally returned." - }, - "explanationConfigs": { - "deprecated": true, - "description": "VisionExplanationConfig for XAI on test set. Optional for when XAI is enable in training request.", - "items": { - "$ref": "XPSResponseExplanationSpec" - }, - "type": "array" - }, - "imageClassificationTrainResp": { - "$ref": "XPSImageClassificationTrainResponse" - }, - "imageObjectDetectionTrainResp": { - "$ref": "XPSImageObjectDetectionModelSpec" - }, - "imageSegmentationTrainResp": { - "$ref": "XPSImageSegmentationTrainResponse" - }, - "modelToken": { - "description": "Token that represents the trained model. This is considered immutable and is persisted in AutoML. xPS can put their own proto in the byte string, to e.g. point to the model checkpoints. The token is passed to other xPS APIs to refer to the model.", - "format": "byte", - "type": "string" - }, - "speechTrainResp": { - "$ref": "XPSSpeechModelSpec" - }, - "tablesTrainResp": { - "$ref": "XPSTablesTrainResponse" - }, - "textToSpeechTrainResp": { - "$ref": "XPSTextToSpeechTrainResponse" - }, - "textTrainResp": { - "$ref": "XPSTextTrainResponse", - "description": "Will only be needed for uCAIP from Beta." - }, - "translationTrainResp": { - "$ref": "XPSTranslationTrainResponse" - }, - "videoActionRecognitionTrainResp": { - "$ref": "XPSVideoActionRecognitionTrainResponse" - }, - "videoClassificationTrainResp": { - "$ref": "XPSVideoClassificationTrainResponse" - }, - "videoObjectTrackingTrainResp": { - "$ref": "XPSVideoObjectTrackingTrainResponse" - } - }, - "type": "object" - }, - "XPSTrainingObjectivePoint": { - "id": "XPSTrainingObjectivePoint", - "properties": { - "createTime": { - "description": "The time at which this point was recorded.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "The objective value when this point was recorded.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationEvaluationMetrics": { - "description": "Evaluation metrics for the dataset.", - "id": "XPSTranslationEvaluationMetrics", - "properties": { - "baseBleuScore": { - "description": "BLEU score for base model.", - "format": "double", - "type": "number" - }, - "bleuScore": { - "description": "BLEU score.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "XPSTranslationPreprocessResponse": { - "description": "Translation preprocess response.", - "id": "XPSTranslationPreprocessResponse", - "properties": { - "parsedExampleCount": { - "description": "Total example count parsed.", - "format": "int64", - "type": "string" - }, - "validExampleCount": { - "description": "Total valid example count.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSTranslationTrainResponse": { - "description": "Train response for translation.", - "id": "XPSTranslationTrainResponse", - "properties": { - "modelType": { - "description": "Type of the model.", - "enum": [ - "MODEL_TYPE_UNSPECIFIED", - "LEGACY", - "CURRENT" - ], - "enumDescriptions": [ - "Default", - "Legacy model. Will be deprecated.", - "Current model." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSTuningTrial": { - "description": "Metrics for a tuning job generated, will get forwarded to Stackdriver as model tuning logs. Setting this as a standalone message out of CreateModelMetadata to avoid confusion as we expose this message only to users.", - "id": "XPSTuningTrial", - "properties": { - "modelStructure": { - "$ref": "XPSTablesModelStructure", - "description": "Model parameters for the trial." - }, - "trainingObjectivePoint": { - "$ref": "XPSTrainingObjectivePoint", - "description": "The optimization objective evaluation of the eval split data." - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntry": { - "description": "The Evaluation metrics entry given a specific precision_window_length.", - "id": "XPSVideoActionMetricsEntry", - "properties": { - "confidenceMetricsEntries": { - "description": "Metrics for each label-match confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSVideoActionMetricsEntryConfidenceMetricsEntry" - }, - "type": "array" - }, - "meanAveragePrecision": { - "description": "The mean average precision.", - "format": "float", - "type": "number" - }, - "precisionWindowLength": { - "description": "This VideoActionMetricsEntry is calculated based on this prediction window length. If the predicted action's timestamp is inside the time window whose center is the ground truth action's timestamp with this specific length, the prediction result is treated as a true positive.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoActionMetricsEntryConfidenceMetricsEntry": { - "description": "Metrics for a single confidence threshold.", - "id": "XPSVideoActionMetricsEntryConfidenceMetricsEntry", - "properties": { - "confidenceThreshold": { - "description": "Output only. The confidence threshold value used to compute the metrics.", - "format": "float", - "type": "number" - }, - "f1Score": { - "description": "Output only. The harmonic mean of recall and precision.", - "format": "float", - "type": "number" - }, - "precision": { - "description": "Output only. Precision for the given confidence threshold.", - "format": "float", - "type": "number" - }, - "recall": { - "description": "Output only. Recall for the given confidence threshold.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionEvaluationMetrics": { - "description": "Model evaluation metrics for video action recognition.", - "id": "XPSVideoActionRecognitionEvaluationMetrics", - "properties": { - "evaluatedActionCount": { - "description": "Output only. The number of ground truth actions used to create this evaluation.", - "format": "int32", - "type": "integer" - }, - "videoActionMetricsEntries": { - "description": "Output only. The metric entries for precision window lengths: 1s,2s,3s,4s, 5s.", - "items": { - "$ref": "XPSVideoActionMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoActionRecognitionTrainResponse": { - "id": "XPSVideoActionRecognitionTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoBatchPredictOperationMetadata": { - "id": "XPSVideoBatchPredictOperationMetadata", - "properties": { - "outputExamples": { - "description": "All the partial batch prediction results that are completed at the moment. Output examples are sorted by completion time. The order will not be changed. Each output example should be the path of a single RecordIO file of AnnotatedExamples.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoClassificationTrainResponse": { - "id": "XPSVideoClassificationTrainResponse", - "properties": { - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoExportModelSpec": { - "description": "Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Upon receiving ExportModel request from user, AutoMl backend can serve the pre-generated models to user if exists (by copying the files from internal path to user provided location), otherwise, AutoMl backend will call xPS ExportModel API to generate the model on the fly with the requesting format.", - "id": "XPSVideoExportModelSpec", - "properties": { - "exportModelOutputConfig": { - "description": "Contains the model format and internal location of the model files to be exported/downloaded. Use the GCS bucket name which is provided via TrainRequest.gcs_bucket_name to store the model files.", - "items": { - "$ref": "XPSExportModelOutputConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoModelArtifactSpec": { - "id": "XPSVideoModelArtifactSpec", - "properties": { - "exportArtifact": { - "description": "The model binary files in different formats for model export.", - "items": { - "$ref": "XPSModelArtifactItem" - }, - "type": "array" - }, - "servingArtifact": { - "$ref": "XPSModelArtifactItem", - "description": "The default model binary file used for serving (e.g. batch predict) via public Cloud AI Platform API." - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingEvaluationMetrics": { - "description": "Model evaluation metrics for ObjectTracking problems. Next tag: 10.", - "id": "XPSVideoObjectTrackingEvaluationMetrics", - "properties": { - "boundingBoxMeanAveragePrecision": { - "description": "Output only. The single metric for bounding boxes evaluation: the mean_average_precision averaged over all bounding_box_metrics_entries.", - "format": "float", - "type": "number" - }, - "boundingBoxMetricsEntries": { - "description": "Output only. The bounding boxes match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSBoundingBoxMetricsEntry" - }, - "type": "array" - }, - "evaluatedBoundingboxCount": { - "description": "The number of bounding boxes used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedFrameCount": { - "description": "The number of video frames used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "evaluatedTrackCount": { - "description": "The number of tracks used for model evaluation.", - "format": "int32", - "type": "integer" - }, - "trackMeanAveragePrecision": { - "description": "Output only. The single metric for tracks accuracy evaluation: the mean_average_precision averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanBoundingBoxIou": { - "description": "Output only. The single metric for tracks bounding box iou evaluation: the mean_bounding_box_iou averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMeanMismatchRate": { - "description": "Output only. The single metric for tracking consistency evaluation: the mean_mismatch_rate averaged over all track_metrics_entries.", - "format": "float", - "type": "number" - }, - "trackMetricsEntries": { - "description": "Output only. The tracks match metrics for each Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99.", - "items": { - "$ref": "XPSTrackMetricsEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "XPSVideoObjectTrackingTrainResponse": { - "id": "XPSVideoObjectTrackingTrainResponse", - "properties": { - "exportModelSpec": { - "$ref": "XPSVideoExportModelSpec", - "description": "Populated for AutoML request only." - }, - "modelArtifactSpec": { - "$ref": "XPSVideoModelArtifactSpec", - "description": "## The fields below are only populated under uCAIP request scope." - }, - "trainCostNodeSeconds": { - "description": "The actual train cost of creating this model, expressed in node seconds, i.e. 3,600 value in this field means 1 node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVideoTrainingOperationMetadata": { - "id": "XPSVideoTrainingOperationMetadata", - "properties": { - "trainCostMilliNodeHour": { - "description": "This is an estimation of the node hours necessary for training a model, expressed in milli node hours (i.e. 1,000 value in this field means 1 node hour). A node hour represents the time a virtual machine spends running your training job. The cost of one node running for one hour is a node hour.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionErrorAnalysisConfig": { - "description": "The vision model error analysis configuration. Next tag: 3", - "id": "XPSVisionErrorAnalysisConfig", - "properties": { - "exampleCount": { - "description": "The number of query examples in error analysis.", - "format": "int32", - "type": "integer" - }, - "queryType": { - "description": "The query type used in retrieval. The enum values are frozen in the foreseeable future.", - "enum": [ - "QUERY_TYPE_UNSPECIFIED", - "QUERY_TYPE_ALL_SIMILAR", - "QUERY_TYPE_SAME_CLASS_SIMILAR", - "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - ], - "enumDescriptions": [ - "Unspecified query type for model error analysis.", - "Query similar samples across all classes in the dataset.", - "Query similar samples from the same class of the input sample.", - "Query dissimilar samples from the same class of the input sample." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSVisionTrainingOperationMetadata": { - "deprecated": true, - "id": "XPSVisionTrainingOperationMetadata", - "properties": { - "explanationUsage": { - "$ref": "InfraUsage", - "description": "Aggregated infra usage within certain time period, for billing report purpose if XAI is enable in training request." - } - }, - "type": "object" - }, - "XPSVisualization": { - "deprecated": true, - "description": "Visualization configurations for image explanation.", - "id": "XPSVisualization", - "properties": { - "clipPercentLowerbound": { - "description": "Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62.", - "format": "float", - "type": "number" - }, - "clipPercentUpperbound": { - "description": "Excludes attributions above the specified percentile from the highlighted areas. Using the clip_percent_upperbound and clip_percent_lowerbound together can be useful for filtering out noise and making it easier to see areas of strong attribution. Defaults to 99.9.", - "format": "float", - "type": "number" - }, - "colorMap": { - "description": "The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue.", - "enum": [ - "COLOR_MAP_UNSPECIFIED", - "PINK_GREEN", - "VIRIDIS", - "RED", - "GREEN", - "RED_GREEN", - "PINK_WHITE_GREEN" - ], - "enumDescriptions": [ - "Should not be used.", - "Positive: green. Negative: pink.", - "Viridis color map: A perceptually uniform color mapping which is easier to see by those with colorblindness and progresses from yellow to green to blue. Positive: yellow. Negative: blue.", - "Positive: red. Negative: red.", - "Positive: green. Negative: green.", - "Positive: green. Negative: red.", - "PiYG palette." - ], - "type": "string" - }, - "overlayType": { - "description": "How the original image is displayed in the visualization. Adjusting the overlay can help increase visual clarity if the original image makes it difficult to view the visualization. Defaults to NONE.", - "enum": [ - "OVERLAY_TYPE_UNSPECIFIED", - "NONE", - "ORIGINAL", - "GRAYSCALE", - "MASK_BLACK" - ], - "enumDescriptions": [ - "Default value. This is the same as NONE.", - "No overlay.", - "The attributions are shown on top of the original image.", - "The attributions are shown on top of grayscaled version of the original image.", - "The attributions are used as a mask to reveal predictive parts of the image and hide the un-predictive parts." - ], - "type": "string" - }, - "polarity": { - "description": "Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE.", - "enum": [ - "POLARITY_UNSPECIFIED", - "POSITIVE", - "NEGATIVE", - "BOTH" - ], - "enumDescriptions": [ - "Default value. This is the same as POSITIVE.", - "Highlights the pixels/outlines that were most influential to the model's prediction.", - "Setting polarity to negative highlights areas that does not lead to the models's current prediction.", - "Shows both positive and negative attributions." - ], - "type": "string" - }, - "type": { - "description": "Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES.", - "enum": [ - "TYPE_UNSPECIFIED", - "PIXELS", - "OUTLINES" - ], - "enumDescriptions": [ - "Should not be used.", - "Shows which pixel contributed to the image prediction.", - "Shows which region contributed to the image prediction by outlining the region." - ], - "type": "string" - } - }, - "type": "object" - }, - "XPSXpsOperationMetadata": { - "id": "XPSXpsOperationMetadata", - "properties": { - "exampleCount": { - "description": "Optional. XPS server can opt to provide example count of the long running operation (e.g. training, data importing, batch prediction).", - "format": "int64", - "type": "string" - }, - "reportingMetrics": { - "$ref": "XPSReportingMetrics", - "description": "Metrics for the operation. By the time the operation is terminated (whether succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are finalized. AutoML BE transparently posts the metrics to Chemist if it's not empty, regardless of the response content or error type. If user is supposed to be charged in case of cancellation/error, this field should be set. In the case where the type of LRO doesn't require any billing, this field should be left unset." - }, - "tablesTrainingOperationMetadata": { - "$ref": "XPSTablesTrainingOperationMetadata" - }, - "videoBatchPredictOperationMetadata": { - "$ref": "XPSVideoBatchPredictOperationMetadata" - }, - "videoTrainingOperationMetadata": { - "$ref": "XPSVideoTrainingOperationMetadata" - }, - "visionTrainingOperationMetadata": { - "$ref": "XPSVisionTrainingOperationMetadata" - } - }, - "type": "object" - }, - "XPSXraiAttribution": { - "deprecated": true, - "description": "An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Only supports image Models (modality is IMAGE).", - "id": "XPSXraiAttribution", - "properties": { - "stepCount": { - "description": "The number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. Valid range of its value is [1, 100], inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/language/v2/language-gen.go b/language/v2/language-gen.go index e3e350b8855..54b88ccd8a8 100644 --- a/language/v2/language-gen.go +++ b/language/v2/language-gen.go @@ -378,7 +378,7 @@ type AnnotateTextRequest struct { EncodingType string `json:"encodingType,omitempty"` // Features: Required. The enabled features. - Features *AnnotateTextRequestFeatures `json:"features,omitempty"` + Features *Features `json:"features,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with @@ -403,45 +403,6 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AnnotateTextRequestFeatures: All available features. Setting each one -// to true will enable that specific analysis for the input. -type AnnotateTextRequestFeatures struct { - // ClassifyText: Optional. Classify the full document into categories. - ClassifyText bool `json:"classifyText,omitempty"` - - // ExtractDocumentSentiment: Optional. Extract document-level sentiment. - ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - - // ExtractEntities: Optional. Extract entities. - ExtractEntities bool `json:"extractEntities,omitempty"` - - // ModerateText: Optional. Moderate the document for harmful and - // sensitive categories. - ModerateText bool `json:"moderateText,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClassifyText") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClassifyText") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AnnotateTextRequestFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AnnotateTextRequestFeatures - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // AnnotateTextResponse: The text annotations response message. type AnnotateTextResponse struct { // Categories: Categories identified in the input document. @@ -623,385 +584,6 @@ func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Color: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from -// color representations in various languages over compactness. For -// example, the fields of this representation can be trivially provided -// to the constructor of `java.awt.Color` in Java; it can also be -// trivially provided to UIColor's `+colorWithRed:green:blue:alpha` -// method in iOS; and, with just a little work, it can be easily -// formatted into a CSS `rgba()` string in JavaScript. This reference -// page doesn't have information about the absolute color space that -// should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the -// sRGB color space. When color equality needs to be decided, -// implementations, unless documented otherwise, treat two colors as -// equal if all their red, green, blue, and alpha values each differ by -// at most `1e-5`. Example (Java): import com.google.type.Color; // ... -// public static java.awt.Color fromProto(Color protocolor) { float -// alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : -// 1.0; return new java.awt.Color( protocolor.getRed(), -// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static -// Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = -// (float) color.getBlue(); float denominator = 255.0; Color.Builder -// resultBuilder = Color .newBuilder() .setRed(red / denominator) -// .setGreen(green / denominator) .setBlue(blue / denominator); int -// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( -// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) -// .build()); } return resultBuilder.build(); } // ... Example (iOS / -// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float -// red = [protocolor red]; float green = [protocolor green]; float blue -// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper -// value]; } return [UIColor colorWithRed:red green:green blue:blue -// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, -// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue -// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; -// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result -// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; -// return result; } // ... Example (JavaScript): // ... var -// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red -// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = -// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green -// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); -// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, -// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams -// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', -// alphaFrac, ')'].join(”); }; var rgbToCssColor = function(red, green, -// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | -// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - -// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < -// missingZeros; i++) { resultBuilder.push('0'); } -// resultBuilder.push(hexString); return resultBuilder.join(”); }; // -// ... -type Color struct { - // Alpha: The fraction of this color that should be applied to the - // pixel. That is, the final pixel color is defined by the equation: - // `pixel color = alpha * (this color) + (1.0 - alpha) * (background - // color)` This means that a value of 1.0 corresponds to a solid color, - // whereas a value of 0.0 corresponds to a completely transparent color. - // This uses a wrapper message rather than a simple float scalar so that - // it is possible to distinguish between a default value and the value - // being unset. If omitted, this color object is rendered as a solid - // color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - - // Blue: The amount of blue in the color as a value in the interval [0, - // 1]. - Blue float64 `json:"blue,omitempty"` - - // Green: The amount of green in the color as a value in the interval - // [0, 1]. - Green float64 `json:"green,omitempty"` - - // Red: The amount of red in the color as a value in the interval [0, - // 1]. - Red float64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Alpha") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Alpha") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Color) MarshalJSON() ([]byte, error) { - type NoMethod Color - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Color) UnmarshalJSON(data []byte) error { - type NoMethod Color - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) - return nil -} - -// CpuMetric: Metric for billing reports. -type CpuMetric struct { - // CoreNumber: Required. Number of CPU cores. - CoreNumber int64 `json:"coreNumber,omitempty,string"` - - // CoreSec: Required. Total seconds of core usage, e.g. 4. - CoreSec int64 `json:"coreSec,omitempty,string"` - - // CpuType: Required. Type of cpu, e.g. N2. - // - // Possible values: - // "UNKNOWN_CPU_TYPE" - // "A2" - GPU-based machine, skip quota reporting. - // "A3" - GPU-based machine, skip quota reporting. - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - GPU-based machine, skip quota reporting. - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - CpuType string `json:"cpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreNumber") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CoreNumber") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod CpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskMetric struct { - // DiskType: Required. Type of Disk, e.g. REGIONAL_SSD. - // - // Possible values: - // "UNKNOWN_DISK_TYPE" - // "REGIONAL_SSD" - // "REGIONAL_STORAGE" - // "PD_SSD" - // "PD_STANDARD" - // "STORAGE_SNAPSHOT" - DiskType string `json:"diskType,omitempty"` - - // GibSec: Required. Seconds of physical disk usage, e.g. 3600. - GibSec int64 `json:"gibSec,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DiskType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskMetric) MarshalJSON() ([]byte, error) { - type NoMethod DiskMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Document: Represents the input to API methods. type Document struct { // Content: The content of the input in string format. Cloud audit @@ -1197,236 +779,23 @@ func (s *EntityMention) UnmarshalJSON(data []byte) error { return nil } -type GpuMetric struct { - // GpuSec: Required. Seconds of GPU usage, e.g. 3600. - GpuSec int64 `json:"gpuSec,omitempty,string"` - - // GpuType: Required. Type of GPU, e.g. NVIDIA_TESLA_V100. - // - // Possible values: - // "UNKNOWN_GPU_TYPE" - // "NVIDIA_TESLA_A100" - // "NVIDIA_A100_80GB" - // "NVIDIA_TESLA_K80" - // "NVIDIA_L4" - // "NVIDIA_TESLA_P100" - // "NVIDIA_TESLA_P4" - // "NVIDIA_TESLA_T4" - // "NVIDIA_TESLA_V100" - // "NVIDIA_H100_80GB" - GpuType string `json:"gpuType,omitempty"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GpuSec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod GpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InfraUsage: Infra Usage of billing metrics. Next ID: 6 -type InfraUsage struct { - // CpuMetrics: Aggregated core metrics since requested start_time. - CpuMetrics []*CpuMetric `json:"cpuMetrics,omitempty"` - - // DiskMetrics: Aggregated persistent disk metrics since requested - // start_time. - DiskMetrics []*DiskMetric `json:"diskMetrics,omitempty"` +// Features: All available features. Setting each one to true will +// enable that specific analysis for the input. +type Features struct { + // ClassifyText: Optional. Classify the full document into categories. + ClassifyText bool `json:"classifyText,omitempty"` - // GpuMetrics: Aggregated gpu metrics since requested start_time. - GpuMetrics []*GpuMetric `json:"gpuMetrics,omitempty"` + // ExtractDocumentSentiment: Optional. Extract document-level sentiment. + ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"` - // RamMetrics: Aggregated ram metrics since requested start_time. - RamMetrics []*RamMetric `json:"ramMetrics,omitempty"` + // ExtractEntities: Optional. Extract entities. + ExtractEntities bool `json:"extractEntities,omitempty"` - // TpuMetrics: Aggregated tpu metrics since requested start_time. - TpuMetrics []*TpuMetric `json:"tpuMetrics,omitempty"` + // ModerateText: Optional. Moderate the document for harmful and + // sensitive categories. + ModerateText bool `json:"moderateText,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuMetrics") to + // ForceSendFields is a list of field names (e.g. "ClassifyText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1434,17 +803,17 @@ type InfraUsage struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpuMetrics") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ClassifyText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InfraUsage) MarshalJSON() ([]byte, error) { - type NoMethod InfraUsage +func (s *Features) MarshalJSON() ([]byte, error) { + type NoMethod Features raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1521,240 +890,6 @@ func (s *ModerateTextResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RamMetric struct { - // GibSec: Required. VM memory in Gigabyte second, e.g. 3600. Using - // int64 type to match billing metrics definition. - GibSec int64 `json:"gibSec,omitempty,string"` - - // MachineSpec: Required. Machine spec, e.g. N1_STANDARD_4. - // - // Possible values: - // "UNKNOWN_MACHINE_SPEC" - // "N1_STANDARD_2" - // "N1_STANDARD_4" - // "N1_STANDARD_8" - // "N1_STANDARD_16" - // "N1_STANDARD_32" - // "N1_STANDARD_64" - // "N1_STANDARD_96" - // "N1_HIGHMEM_2" - // "N1_HIGHMEM_4" - // "N1_HIGHMEM_8" - // "N1_HIGHMEM_16" - // "N1_HIGHMEM_32" - // "N1_HIGHMEM_64" - // "N1_HIGHMEM_96" - // "N1_HIGHCPU_2" - // "N1_HIGHCPU_4" - // "N1_HIGHCPU_8" - // "N1_HIGHCPU_16" - // "N1_HIGHCPU_32" - // "N1_HIGHCPU_64" - // "N1_HIGHCPU_96" - // "A2_HIGHGPU_1G" - // "A2_HIGHGPU_2G" - // "A2_HIGHGPU_4G" - // "A2_HIGHGPU_8G" - // "A2_MEGAGPU_16G" - // "A2_ULTRAGPU_1G" - // "A2_ULTRAGPU_2G" - // "A2_ULTRAGPU_4G" - // "A2_ULTRAGPU_8G" - // "A3_HIGHGPU_8G" - // "E2_STANDARD_2" - // "E2_STANDARD_4" - // "E2_STANDARD_8" - // "E2_STANDARD_16" - // "E2_STANDARD_32" - // "E2_HIGHMEM_2" - // "E2_HIGHMEM_4" - // "E2_HIGHMEM_8" - // "E2_HIGHMEM_16" - // "E2_HIGHCPU_2" - // "E2_HIGHCPU_4" - // "E2_HIGHCPU_8" - // "E2_HIGHCPU_16" - // "E2_HIGHCPU_32" - // "N2_STANDARD_2" - // "N2_STANDARD_4" - // "N2_STANDARD_8" - // "N2_STANDARD_16" - // "N2_STANDARD_32" - // "N2_STANDARD_48" - // "N2_STANDARD_64" - // "N2_STANDARD_80" - // "N2_STANDARD_96" - // "N2_STANDARD_128" - // "N2_HIGHMEM_2" - // "N2_HIGHMEM_4" - // "N2_HIGHMEM_8" - // "N2_HIGHMEM_16" - // "N2_HIGHMEM_32" - // "N2_HIGHMEM_48" - // "N2_HIGHMEM_64" - // "N2_HIGHMEM_80" - // "N2_HIGHMEM_96" - // "N2_HIGHMEM_128" - // "N2_HIGHCPU_2" - // "N2_HIGHCPU_4" - // "N2_HIGHCPU_8" - // "N2_HIGHCPU_16" - // "N2_HIGHCPU_32" - // "N2_HIGHCPU_48" - // "N2_HIGHCPU_64" - // "N2_HIGHCPU_80" - // "N2_HIGHCPU_96" - // "N2D_STANDARD_2" - // "N2D_STANDARD_4" - // "N2D_STANDARD_8" - // "N2D_STANDARD_16" - // "N2D_STANDARD_32" - // "N2D_STANDARD_48" - // "N2D_STANDARD_64" - // "N2D_STANDARD_80" - // "N2D_STANDARD_96" - // "N2D_STANDARD_128" - // "N2D_STANDARD_224" - // "N2D_HIGHMEM_2" - // "N2D_HIGHMEM_4" - // "N2D_HIGHMEM_8" - // "N2D_HIGHMEM_16" - // "N2D_HIGHMEM_32" - // "N2D_HIGHMEM_48" - // "N2D_HIGHMEM_64" - // "N2D_HIGHMEM_80" - // "N2D_HIGHMEM_96" - // "N2D_HIGHCPU_2" - // "N2D_HIGHCPU_4" - // "N2D_HIGHCPU_8" - // "N2D_HIGHCPU_16" - // "N2D_HIGHCPU_32" - // "N2D_HIGHCPU_48" - // "N2D_HIGHCPU_64" - // "N2D_HIGHCPU_80" - // "N2D_HIGHCPU_96" - // "N2D_HIGHCPU_128" - // "N2D_HIGHCPU_224" - // "C2_STANDARD_4" - // "C2_STANDARD_8" - // "C2_STANDARD_16" - // "C2_STANDARD_30" - // "C2_STANDARD_60" - // "C2D_STANDARD_2" - // "C2D_STANDARD_4" - // "C2D_STANDARD_8" - // "C2D_STANDARD_16" - // "C2D_STANDARD_32" - // "C2D_STANDARD_56" - // "C2D_STANDARD_112" - // "C2D_HIGHCPU_2" - // "C2D_HIGHCPU_4" - // "C2D_HIGHCPU_8" - // "C2D_HIGHCPU_16" - // "C2D_HIGHCPU_32" - // "C2D_HIGHCPU_56" - // "C2D_HIGHCPU_112" - // "C2D_HIGHMEM_2" - // "C2D_HIGHMEM_4" - // "C2D_HIGHMEM_8" - // "C2D_HIGHMEM_16" - // "C2D_HIGHMEM_32" - // "C2D_HIGHMEM_56" - // "C2D_HIGHMEM_112" - // "G2_STANDARD_4" - // "G2_STANDARD_8" - // "G2_STANDARD_12" - // "G2_STANDARD_16" - // "G2_STANDARD_24" - // "G2_STANDARD_32" - // "G2_STANDARD_48" - // "G2_STANDARD_96" - // "C3_STANDARD_4" - // "C3_STANDARD_8" - // "C3_STANDARD_22" - // "C3_STANDARD_44" - // "C3_STANDARD_88" - // "C3_STANDARD_176" - // "C3_HIGHCPU_4" - // "C3_HIGHCPU_8" - // "C3_HIGHCPU_22" - // "C3_HIGHCPU_44" - // "C3_HIGHCPU_88" - // "C3_HIGHCPU_176" - // "C3_HIGHMEM_4" - // "C3_HIGHMEM_8" - // "C3_HIGHMEM_22" - // "C3_HIGHMEM_44" - // "C3_HIGHMEM_88" - // "C3_HIGHMEM_176" - MachineSpec string `json:"machineSpec,omitempty"` - - // Memories: Required. VM memory in gb. - Memories float64 `json:"memories,omitempty"` - - // RamType: Required. Type of ram. - // - // Possible values: - // "UNKNOWN_RAM_TYPE" - // "A2" - // "A3" - // "C2" - COMPUTE_OPTIMIZED - // "C2D" - // "CUSTOM" - // "E2" - // "G2" - // "C3" - // "M2" - MEMORY_OPTIMIZED_UPGRADE_PREMIUM - // "M1" - MEMORY_OPTIMIZED - // "N1" - // "N2_CUSTOM" - // "N2" - // "N2D" - RamType string `json:"ramType,omitempty"` - - // TrackingLabels: Billing tracking labels. They do not contain any user - // data but only the labels set by Vertex Core Infra itself. Tracking - // labels' keys are defined with special format: goog-[\p{Ll}\p{N}]+ - // E.g. "key": "goog-k8s-cluster-name","value": "us-east1-b4rk" - TrackingLabels map[string]string `json:"trackingLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GibSec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GibSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RamMetric) MarshalJSON() ([]byte, error) { - type NoMethod RamMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *RamMetric) UnmarshalJSON(data []byte) error { - type NoMethod RamMetric - var s1 struct { - Memories gensupport.JSONFloat64 `json:"memories"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Memories = float64(s1.Memories) - return nil -} - // Sentence: Represents a sentence in the input document. type Sentence struct { // Sentiment: For calls to AnalyzeSentiment or if @@ -1917,5155 +1052,6 @@ func (s *TextSpan) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TpuMetric struct { - // TpuSec: Required. Seconds of TPU usage, e.g. 3600. - TpuSec int64 `json:"tpuSec,omitempty,string"` - - // TpuType: Required. Type of TPU, e.g. TPU_V2, TPU_V3_POD. - // - // Possible values: - // "UNKNOWN_TPU_TYPE" - // "TPU_V2_POD" - // "TPU_V2" - // "TPU_V3_POD" - // "TPU_V3" - // "TPU_V5_LITEPOD" - TpuType string `json:"tpuType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TpuSec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TpuSec") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TpuMetric) MarshalJSON() ([]byte, error) { - type NoMethod TpuMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSArrayStats: The data statistics of a series of ARRAY values. -type XPSArrayStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // MemberStats: Stats of all the values of all arrays, as if they were a - // single long series of data. The type depends on the element type of - // the array. - MemberStats *XPSDataStats `json:"memberStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSArrayStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSArrayStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSBatchPredictResponse struct { - // ExampleSet: Examples for batch prediction result. Under full API - // implementation, results are stored in shared RecordIO of - // AnnotatedExample protobufs, the annotations field of which is - // populated by XPS backend. - ExampleSet *XPSExampleSet `json:"exampleSet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleSet") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExampleSet") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSBatchPredictResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSBatchPredictResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSBoundingBoxMetricsEntry: Bounding box matching model metrics for a -// single intersection-over-union threshold and multiple label match -// confidence thresholds. -type XPSBoundingBoxMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSBoundingBoxMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: The intersection-over-union threshold value used to - // compute this metrics entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSBoundingBoxMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSBoundingBoxMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSBoundingBoxMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSBoundingBoxMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSCategoryStats: The data statistics of a series of CATEGORY values. -type XPSCategoryStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopCategoryStats: The statistics of the top 20 CATEGORY values, - // ordered by CategoryStats.SingleCategoryStats.count. - TopCategoryStats []*XPSCategoryStatsSingleCategoryStats `json:"topCategoryStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCategoryStatsSingleCategoryStats: The statistics of a single -// CATEGORY value. -type XPSCategoryStatsSingleCategoryStats struct { - // Count: The number of occurrences of this value in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The CATEGORY value. - Value string `json:"value,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCategoryStatsSingleCategoryStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCategoryStatsSingleCategoryStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSClassificationEvaluationMetrics: Model evaluation metrics for -// classification problems. It can be used for image and video -// classification. Next tag: 9. -type XPSClassificationEvaluationMetrics struct { - // AuPrc: The Area under precision recall curve metric. - AuPrc float64 `json:"auPrc,omitempty"` - - // AuRoc: The Area Under Receiver Operating Characteristic curve metric. - // Micro-averaged for the overall evaluation. - AuRoc float64 `json:"auRoc,omitempty"` - - // BaseAuPrc: The Area under precision recall curve metric based on - // priors. - BaseAuPrc float64 `json:"baseAuPrc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the evaluation. Only set for - // MULTICLASS classification problems where number of annotation specs - // is no more than 10. Only set for model level evaluation, not for - // evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // EvaluatedExamplesCount: The number of examples used for model - // evaluation. - EvaluatedExamplesCount int64 `json:"evaluatedExamplesCount,omitempty"` - - // LogLoss: The Log Loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuPrc") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuPrc") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSClassificationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSClassificationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSClassificationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSClassificationEvaluationMetrics - var s1 struct { - AuPrc gensupport.JSONFloat64 `json:"auPrc"` - AuRoc gensupport.JSONFloat64 `json:"auRoc"` - BaseAuPrc gensupport.JSONFloat64 `json:"baseAuPrc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AuPrc = float64(s1.AuPrc) - s.AuRoc = float64(s1.AuRoc) - s.BaseAuPrc = float64(s1.BaseAuPrc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSColorMap: Map from color to display name. Will only be used by -// Image Segmentation for uCAIP. -type XPSColorMap struct { - // AnnotationSpecIdToken: Should be used during training. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Color: This type is deprecated in favor of the IntColor below. This - // is because google.type.Color represent color has a float which - // semantically does not reflect discrete classes/categories concept. - // Moreover, to handle it well we need to have some tolerance when - // converting to a discretized color. As such, the recommendation is to - // have API surface still use google.type.Color while internally - // IntColor is used. - Color *Color `json:"color,omitempty"` - - // DisplayName: Should be used during preprocessing. - DisplayName string `json:"displayName,omitempty"` - - IntColor *XPSColorMapIntColor `json:"intColor,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMap) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMap - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColorMapIntColor: RGB color and each channel is represented by an -// integer. -type XPSColorMapIntColor struct { - // Blue: The value should be in range of [0, 255]. - Blue int64 `json:"blue,omitempty"` - - // Green: The value should be in range of [0, 255]. - Green int64 `json:"green,omitempty"` - - // Red: The value should be in range of [0, 255]. - Red int64 `json:"red,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Blue") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColorMapIntColor) MarshalJSON() ([]byte, error) { - type NoMethod XPSColorMapIntColor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSColumnSpec struct { - // ColumnId: The unique id of the column. When Preprocess, the Tables BE - // will popuate the order id of the column, which reflects the order of - // the column inside the table, i.e. 0 means the first column in the - // table, N-1 means the last column. AutoML BE will persist this order - // id in Spanner and set the order id here when calling - // RefreshTablesStats and Train. Note: it's different than the - // column_spec_id that is generated in AutoML BE. - ColumnId int64 `json:"columnId,omitempty"` - - // DataStats: The data stats of the column. It's outputed in - // RefreshTablesStats and a required input for Train. - DataStats *XPSDataStats `json:"dataStats,omitempty"` - - // DataType: The data type of the column. It's outputed in Preprocess - // rpc and a required input for RefreshTablesStats and Train. - DataType *XPSDataType `json:"dataType,omitempty"` - - // DisplayName: The display name of the column. It's outputed in - // Preprocess and a required input for RefreshTablesStats and Train. - DisplayName string `json:"displayName,omitempty"` - - ForecastingMetadata *XPSColumnSpecForecastingMetadata `json:"forecastingMetadata,omitempty"` - - // TopCorrelatedColumns: It's outputed in RefreshTablesStats, and a - // required input in Train. - TopCorrelatedColumns []*XPSColumnSpecCorrelatedColumn `json:"topCorrelatedColumns,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecCorrelatedColumn: Identifies a table's column, and its -// correlation with the column this ColumnSpec describes. -type XPSColumnSpecCorrelatedColumn struct { - ColumnId int64 `json:"columnId,omitempty"` - - CorrelationStats *XPSCorrelationStats `json:"correlationStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecCorrelatedColumn) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecCorrelatedColumn - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSColumnSpecForecastingMetadata: -// ====================================================================== -// ===== # The fields below are used exclusively for Forecasting. -type XPSColumnSpecForecastingMetadata struct { - // ColumnType: The type of the column for FORECASTING model training - // purposes. - // - // Possible values: - // "COLUMN_TYPE_UNSPECIFIED" - An un-set value of this enum. - // "KEY" - Key columns are used to identify timeseries. - // "KEY_METADATA" - This column contains information describing static - // properties of the entities identified by the key column(s) (e.g. - // city's ZIP code). - // "TIME_SERIES_AVAILABLE_PAST_ONLY" - This column contains - // information for the given entity, at any time poinrt, they are only - // available in the time series before. - // "TIME_SERIES_AVAILABLE_PAST_AND_FUTURE" - This column contains - // information for the given entity is known both for the past and the - // sufficiently far future. - ColumnType string `json:"columnType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSColumnSpecForecastingMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSColumnSpecForecastingMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCommonStats: Common statistics for a column with a specified data -// type. -type XPSCommonStats struct { - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DistinctValueCount") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DistinctValueCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSCommonStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCommonStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfidenceMetricsEntry: ConfidenceMetricsEntry includes generic -// precision, recall, f1 score etc. Next tag: 16. -type XPSConfidenceMetricsEntry struct { - // ConfidenceThreshold: Metrics are computed with an assumption that the - // model never return predictions with score lower than this value. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // F1ScoreAt1: The harmonic mean of recall_at1 and precision_at1. - F1ScoreAt1 float64 `json:"f1ScoreAt1,omitempty"` - - // FalseNegativeCount: The number of ground truth labels that are not - // matched by a model created label. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: The number of model created labels that do not - // match a ground truth label. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: False Positive Rate for the given confidence - // threshold. - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // FalsePositiveRateAt1: The False Positive Rate when only considering - // the label that has the highest prediction score and not below the - // confidence threshold for each example. - FalsePositiveRateAt1 float64 `json:"falsePositiveRateAt1,omitempty"` - - // PositionThreshold: Metrics are computed with an assumption that the - // model always returns at most this many predictions (ordered by their - // score, descendingly), but they all still need to meet the - // confidence_threshold. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // PrecisionAt1: The precision when only considering the label that has - // the highest prediction score and not below the confidence threshold - // for each example. - PrecisionAt1 float64 `json:"precisionAt1,omitempty"` - - // Recall: Recall (true positive rate) for the given confidence - // threshold. - Recall float64 `json:"recall,omitempty"` - - // RecallAt1: The recall (true positive rate) when only considering the - // label that has the highest prediction score and not below the - // confidence threshold for each example. - RecallAt1 float64 `json:"recallAt1,omitempty"` - - // TrueNegativeCount: The number of labels that were not created by the - // model, but if they would, they would not match a ground truth label. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: The number of model created labels that match a - // ground truth label. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - F1ScoreAt1 gensupport.JSONFloat64 `json:"f1ScoreAt1"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - FalsePositiveRateAt1 gensupport.JSONFloat64 `json:"falsePositiveRateAt1"` - Precision gensupport.JSONFloat64 `json:"precision"` - PrecisionAt1 gensupport.JSONFloat64 `json:"precisionAt1"` - Recall gensupport.JSONFloat64 `json:"recall"` - RecallAt1 gensupport.JSONFloat64 `json:"recallAt1"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.F1ScoreAt1 = float64(s1.F1ScoreAt1) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.FalsePositiveRateAt1 = float64(s1.FalsePositiveRateAt1) - s.Precision = float64(s1.Precision) - s.PrecisionAt1 = float64(s1.PrecisionAt1) - s.Recall = float64(s1.Recall) - s.RecallAt1 = float64(s1.RecallAt1) - return nil -} - -// XPSConfusionMatrix: Confusion matrix of the model running the -// classification. -type XPSConfusionMatrix struct { - // AnnotationSpecIdToken: For the following three repeated fields, only - // one is intended to be set. annotation_spec_id_token is preferable to - // be set. ID tokens of the annotation specs used in the confusion - // matrix. - AnnotationSpecIdToken []string `json:"annotationSpecIdToken,omitempty"` - - // Category: Category (mainly for segmentation). Set only for image - // segmentation models. Note: uCAIP Image Segmentation should use - // annotation_spec_id_token. - Category []int64 `json:"category,omitempty"` - - // Row: Rows in the confusion matrix. The number of rows is equal to the - // size of `annotation_spec_id_token`. `row[i].value[j]` is the number - // of examples that have ground truth of the - // `annotation_spec_id_token[i]` and are predicted as - // `annotation_spec_id_token[j]` by the model being evaluated. - Row []*XPSConfusionMatrixRow `json:"row,omitempty"` - - // SentimentLabel: Sentiment labels used in the confusion matrix. Set - // only for text sentiment models. For AutoML Text Revamp, use - // `annotation_spec_id_token` instead and leave this field empty. - SentimentLabel []int64 `json:"sentimentLabel,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrix) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrix - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSConfusionMatrixRow: A row in the confusion matrix. -type XPSConfusionMatrixRow struct { - // Count: Same as above except intended to represent other counts (for - // e.g. for segmentation this is pixel count). NOTE(params): Only - // example_count or count is set (oneoff does not support repeated - // fields unless they are embedded inside another message). - Count googleapi.Int64s `json:"count,omitempty"` - - // ExampleCount: Value of the specific cell in the confusion matrix. The - // number of values each row has (i.e. the length of the row) is equal - // to the length of the annotation_spec_id_token field. - ExampleCount []int64 `json:"exampleCount,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSConfusionMatrixRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSConfusionMatrixRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSCoreMlFormat: A model format used for iOS mobile devices. -type XPSCoreMlFormat struct { -} - -// XPSCorrelationStats: A correlation statistics between two series of -// DataType values. The series may have differing DataType-s, but within -// a single series the DataType must be the same. -type XPSCorrelationStats struct { - // CramersV: The correlation value using the Cramer's V measure. - CramersV float64 `json:"cramersV,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CramersV") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CramersV") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSCorrelationStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSCorrelationStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSCorrelationStats) UnmarshalJSON(data []byte) error { - type NoMethod XPSCorrelationStats - var s1 struct { - CramersV gensupport.JSONFloat64 `json:"cramersV"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CramersV = float64(s1.CramersV) - return nil -} - -// XPSDataErrors: Different types of errors and the stats associatesd -// with each error. -type XPSDataErrors struct { - // Count: Number of records having errors associated with the enum. - Count int64 `json:"count,omitempty"` - - // ErrorType: Type of the error. - // - // Possible values: - // "ERROR_TYPE_UNSPECIFIED" - Not specified. - // "UNSUPPORTED_AUDIO_FORMAT" - Audio format not in the formats by - // cloud-speech AutoML. Currently only wav and flac file formats are - // supported. - // "FILE_EXTENSION_MISMATCH_WITH_AUDIO_FORMAT" - File format differnt - // from what is specified in the file name extension. - // "FILE_TOO_LARGE" - File too large. Maximum allowed size is 50 MB. - // "MISSING_TRANSCRIPTION" - Transcript is missing. - ErrorType string `json:"errorType,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataErrors) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataStats: The data statistics of a series of values that share -// the same DataType. -type XPSDataStats struct { - // ArrayStats: The statistics for ARRAY DataType. - ArrayStats *XPSArrayStats `json:"arrayStats,omitempty"` - - // CategoryStats: The statistics for CATEGORY DataType. - CategoryStats *XPSCategoryStats `json:"categoryStats,omitempty"` - - // DistinctValueCount: The number of distinct values. - DistinctValueCount int64 `json:"distinctValueCount,omitempty,string"` - - // Float64Stats: The statistics for FLOAT64 DataType. - Float64Stats *XPSFloat64Stats `json:"float64Stats,omitempty"` - - // NullValueCount: The number of values that are null. - NullValueCount int64 `json:"nullValueCount,omitempty,string"` - - // StringStats: The statistics for STRING DataType. - StringStats *XPSStringStats `json:"stringStats,omitempty"` - - // StructStats: The statistics for STRUCT DataType. - StructStats *XPSStructStats `json:"structStats,omitempty"` - - // TimestampStats: The statistics for TIMESTAMP DataType. - TimestampStats *XPSTimestampStats `json:"timestampStats,omitempty"` - - // ValidValueCount: The number of values that are valid. - ValidValueCount int64 `json:"validValueCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ArrayStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArrayStats") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDataType: Indicated the type of data that can be stored in a -// structured data entity (e.g. a table). -type XPSDataType struct { - // CompatibleDataTypes: The highly compatible data types to this data - // type. - CompatibleDataTypes []*XPSDataType `json:"compatibleDataTypes,omitempty"` - - // ListElementType: If type_code == ARRAY, then `list_element_type` is - // the type of the elements. - ListElementType *XPSDataType `json:"listElementType,omitempty"` - - // Nullable: If true, this DataType can also be `null`. - Nullable bool `json:"nullable,omitempty"` - - // StructType: If type_code == STRUCT, then `struct_type` provides type - // information for the struct's fields. - StructType *XPSStructType `json:"structType,omitempty"` - - // TimeFormat: If type_code == TIMESTAMP then `time_format` provides the - // format in which that time field is expressed. The time_format must be - // written in `strftime` syntax. If time_format is not set, then the - // default format as described on the field is used. - TimeFormat string `json:"timeFormat,omitempty"` - - // TypeCode: Required. The TypeCode for this type. - // - // Possible values: - // "TYPE_CODE_UNSPECIFIED" - Not specified. Should not be used. - // "FLOAT64" - Encoded as `number`, or the strings "NaN", - // "Infinity", or "-Infinity". - // "TIMESTAMP" - Must be between 0AD and 9999AD. Encoded as `string` - // according to time_format, or, if that format is not set, then in RFC - // 3339 `date-time` format, where `time-offset` = "Z" (e.g. - // 1985-04-12T23:20:50.52Z). - // "STRING" - Encoded as `string`. - // "ARRAY" - Encoded as `list`, where the list elements are - // represented according to list_element_type. - // "STRUCT" - Encoded as `struct`, where field values are represented - // according to struct_type. - // "CATEGORY" - Values of this type are not further understood by - // AutoML, e.g. AutoML is unable to tell the order of values (as it - // could with FLOAT64), or is unable to say if one value contains - // another (as it could with STRING). Encoded as `string` (bytes should - // be base64-encoded, as described in RFC 4648, section 4). - TypeCode string `json:"typeCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompatibleDataTypes") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CompatibleDataTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDataType) MarshalJSON() ([]byte, error) { - type NoMethod XPSDataType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSDockerFormat: A model format used for Docker containers. Use the -// params field to customize the container. The container is verified to -// work correctly on ubuntu 16.04 operating system. -type XPSDockerFormat struct { - // CpuArchitecture: Optional. Additional cpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "CPU_ARCHITECTURE_UNSPECIFIED" - // "CPU_ARCHITECTURE_X86_64" - CpuArchitecture string `json:"cpuArchitecture,omitempty"` - - // GpuArchitecture: Optional. Additional gpu information describing the - // requirements for the to be exported model files. - // - // Possible values: - // "GPU_ARCHITECTURE_UNSPECIFIED" - // "GPU_ARCHITECTURE_NVIDIA" - GpuArchitecture string `json:"gpuArchitecture,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CpuArchitecture") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CpuArchitecture") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSDockerFormat) MarshalJSON() ([]byte, error) { - type NoMethod XPSDockerFormat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEdgeTpuTfLiteFormat: A model format used for Edge TPU -// (https://cloud.google.com/edge-tpu/) devices. -type XPSEdgeTpuTfLiteFormat struct { -} - -// XPSEvaluationMetrics: Contains xPS-specific model evaluation metrics -// either for a single annotation spec (label), or for the model -// overall. Next tag: 18. -type XPSEvaluationMetrics struct { - // AnnotationSpecIdToken: The annotation_spec for which this evaluation - // metrics instance had been created. Empty iff this is an overall model - // evaluation (like Tables evaluation metrics), i.e. aggregated across - // all labels. The value comes from the input annotations in - // AnnotatedExample. For MVP product or for text sentiment models where - // annotation_spec_id_token is not available, set label instead. - AnnotationSpecIdToken string `json:"annotationSpecIdToken,omitempty"` - - // Category: The integer category label for which this evaluation metric - // instance had been created. Valid categories are 0 or higher. Overall - // model evaluation should set this to negative values (rather than - // implicit zero). Only used for Image Segmentation (prefer to set - // annotation_spec_id_token instead). Note: uCAIP Image Segmentation - // should use annotation_spec_id_token. - Category int64 `json:"category,omitempty"` - - // EvaluatedExampleCount: The number of examples used to create this - // evaluation metrics instance. - EvaluatedExampleCount int64 `json:"evaluatedExampleCount,omitempty"` - - ImageClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"imageClassificationEvalMetrics,omitempty"` - - ImageObjectDetectionEvalMetrics *XPSImageObjectDetectionEvaluationMetrics `json:"imageObjectDetectionEvalMetrics,omitempty"` - - ImageSegmentationEvalMetrics *XPSImageSegmentationEvaluationMetrics `json:"imageSegmentationEvalMetrics,omitempty"` - - // Label: The label for which this evaluation metrics instance had been - // created. Empty iff this is an overall model evaluation (like Tables - // evaluation metrics), i.e. aggregated across all labels. The label - // maps to AnnotationSpec.display_name in Public API protos. Only used - // by MVP implementation and text sentiment FULL implementation. - Label string `json:"label,omitempty"` - - RegressionEvalMetrics *XPSRegressionEvaluationMetrics `json:"regressionEvalMetrics,omitempty"` - - TablesClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"tablesClassificationEvalMetrics,omitempty"` - - TablesEvalMetrics *XPSTablesEvaluationMetrics `json:"tablesEvalMetrics,omitempty"` - - TextClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"textClassificationEvalMetrics,omitempty"` - - TextExtractionEvalMetrics *XPSTextExtractionEvaluationMetrics `json:"textExtractionEvalMetrics,omitempty"` - - TextSentimentEvalMetrics *XPSTextSentimentEvaluationMetrics `json:"textSentimentEvalMetrics,omitempty"` - - TranslationEvalMetrics *XPSTranslationEvaluationMetrics `json:"translationEvalMetrics,omitempty"` - - VideoActionRecognitionEvalMetrics *XPSVideoActionRecognitionEvaluationMetrics `json:"videoActionRecognitionEvalMetrics,omitempty"` - - VideoClassificationEvalMetrics *XPSClassificationEvaluationMetrics `json:"videoClassificationEvalMetrics,omitempty"` - - VideoObjectTrackingEvalMetrics *XPSVideoObjectTrackingEvaluationMetrics `json:"videoObjectTrackingEvalMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AnnotationSpecIdToken") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AnnotationSpecIdToken") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSEvaluationMetricsSet: Specifies location of model evaluation -// metrics. -type XPSEvaluationMetricsSet struct { - // EvaluationMetrics: Inline EvaluationMetrics - should be relatively - // small. For passing large quantities of exhaustive metrics, use - // file_spec. - EvaluationMetrics []*XPSEvaluationMetrics `json:"evaluationMetrics,omitempty"` - - // FileSpec: File spec containing evaluation metrics of a model, must - // point to RecordIO file(s) of - // intelligence.cloud.automl.xps.EvaluationMetrics messages. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // NumEvaluationMetrics: Number of the evaluation metrics (usually one - // per label plus overall). - NumEvaluationMetrics int64 `json:"numEvaluationMetrics,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "EvaluationMetrics") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EvaluationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSEvaluationMetricsSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSEvaluationMetricsSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSExampleSet: Set of examples or input sources. -type XPSExampleSet struct { - // FileSpec: File spec of the examples or input sources. - FileSpec *XPSFileSpec `json:"fileSpec,omitempty"` - - // Fingerprint: Fingerprint of the example set. - Fingerprint int64 `json:"fingerprint,omitempty,string"` - - // NumExamples: Number of examples. - NumExamples int64 `json:"numExamples,omitempty,string"` - - // NumInputSources: Number of input sources. - NumInputSources int64 `json:"numInputSources,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FileSpec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FileSpec") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExampleSet) MarshalJSON() ([]byte, error) { - type NoMethod XPSExampleSet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSExportModelOutputConfig struct { - CoreMlFormat *XPSCoreMlFormat `json:"coreMlFormat,omitempty"` - - DockerFormat *XPSDockerFormat `json:"dockerFormat,omitempty"` - - EdgeTpuTfLiteFormat *XPSEdgeTpuTfLiteFormat `json:"edgeTpuTfLiteFormat,omitempty"` - - // ExportFirebaseAuxiliaryInfo: For any model and format: If true, will - // additionally export FirebaseExportedModelInfo in a firebase.txt file. - ExportFirebaseAuxiliaryInfo bool `json:"exportFirebaseAuxiliaryInfo,omitempty"` - - // OutputGcrUri: The Google Contained Registry (GCR) path the exported - // files to be pushed to. This location is set if the exported format is - // DOCKDER. - OutputGcrUri string `json:"outputGcrUri,omitempty"` - - // OutputGcsUri: The Google Cloud Storage (GCS) directory where XPS will - // output the exported models and related files. Format: - // gs://bucket/directory - OutputGcsUri string `json:"outputGcsUri,omitempty"` - - TfJsFormat *XPSTfJsFormat `json:"tfJsFormat,omitempty"` - - TfLiteFormat *XPSTfLiteFormat `json:"tfLiteFormat,omitempty"` - - TfSavedModelFormat *XPSTfSavedModelFormat `json:"tfSavedModelFormat,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoreMlFormat") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CoreMlFormat") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSExportModelOutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSExportModelOutputConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFileSpec: Spec of input and output files, on external file systems -// (CNS, GCS, etc). -type XPSFileSpec struct { - // DirectoryPath: Deprecated. Use file_spec. - DirectoryPath string `json:"directoryPath,omitempty"` - - // Possible values: - // "FILE_FORMAT_UNKNOWN" - // "FILE_FORMAT_SSTABLE" - // "FILE_FORMAT_TRANSLATION_RKV" - Internal format for parallel text - // data used by Google Translate. go/rkvtools - // "FILE_FORMAT_RECORDIO" - // "FILE_FORMAT_RAW_CSV" - Only the lexicographically first file - // described by the file_spec contains the header line. - // "FILE_FORMAT_RAW_CAPACITOR" - FileFormat string `json:"fileFormat,omitempty"` - - // FileSpec: Single file path, or file pattern of format - // "/path/to/file@shard_count". E.g. /cns/cell-d/somewhere/file@2 is - // expanded to two files: /cns/cell-d/somewhere/file-00000-of-00002 and - // /cns/cell-d/somewhere/file-00001-of-00002. - FileSpec string `json:"fileSpec,omitempty"` - - // SingleFilePath: Deprecated. Use file_spec. - SingleFilePath string `json:"singleFilePath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DirectoryPath") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DirectoryPath") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFileSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSFileSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSFloat64Stats: The data statistics of a series of FLOAT64 values. -type XPSFloat64Stats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // HistogramBuckets: Histogram buckets of the data series. Sorted by the - // min value of the bucket, ascendingly, and the number of the buckets - // is dynamically generated. The buckets are non-overlapping and - // completely cover whole FLOAT64 range with min of first bucket being - // "-Infinity", and max of the last one being "Infinity". - HistogramBuckets []*XPSFloat64StatsHistogramBucket `json:"histogramBuckets,omitempty"` - - // Mean: The mean of the series. - Mean float64 `json:"mean,omitempty"` - - // Quantiles: Ordered from 0 to k k-quantile values of the data series - // of n values. The value at index i is, approximately, the i*n/k-th - // smallest value in the series; for i = 0 and i = k these are, - // respectively, the min and max values. - Quantiles []float64 `json:"quantiles,omitempty"` - - // StandardDeviation: The standard deviation of the series. - StandardDeviation float64 `json:"standardDeviation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64Stats) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64Stats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64Stats) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64Stats - var s1 struct { - Mean gensupport.JSONFloat64 `json:"mean"` - Quantiles []gensupport.JSONFloat64 `json:"quantiles"` - StandardDeviation gensupport.JSONFloat64 `json:"standardDeviation"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Mean = float64(s1.Mean) - s.Quantiles = make([]float64, len(s1.Quantiles)) - for i := range s1.Quantiles { - s.Quantiles[i] = float64(s1.Quantiles[i]) - } - s.StandardDeviation = float64(s1.StandardDeviation) - return nil -} - -// XPSFloat64StatsHistogramBucket: A bucket of a histogram. -type XPSFloat64StatsHistogramBucket struct { - // Count: The number of data values that are in the bucket, i.e. are - // between min and max values. - Count int64 `json:"count,omitempty,string"` - - // Max: The maximum value of the bucket, exclusive unless max = - // "Infinity", in which case it's inclusive. - Max float64 `json:"max,omitempty"` - - // Min: The minimum value of the bucket, inclusive. - Min float64 `json:"min,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSFloat64StatsHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod XPSFloat64StatsHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSFloat64StatsHistogramBucket) UnmarshalJSON(data []byte) error { - type NoMethod XPSFloat64StatsHistogramBucket - var s1 struct { - Max gensupport.JSONFloat64 `json:"max"` - Min gensupport.JSONFloat64 `json:"min"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Max = float64(s1.Max) - s.Min = float64(s1.Min) - return nil -} - -type XPSImageClassificationTrainResponse struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - // ExportModelSpec: Information of downloadable models that are - // pre-generated as part of training flow and will be persisted in - // AutoMl backend. Populated for AutoMl requests. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostInNodeTime: The actual cost to create this model. - For edge - // type model, the cost is expressed in node hour. - For cloud type - // model,the cost is expressed in compute hour. - Populated for models - // created before GA. To be deprecated after GA. - TrainCostInNodeTime string `json:"trainCostInNodeTime,omitempty"` - - // TrainCostNodeSeconds: The actual training cost, expressed in node - // seconds. Populated for models trained in node time. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSImageExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelArtifactSpec: Stores the locations and related metadata -// of the model artifacts. Populated for uCAIP requests only. -type XPSImageModelArtifactSpec struct { - // CheckpointArtifact: The Tensorflow checkpoint files. e.g. Used for - // resumable training. - CheckpointArtifact *XPSModelArtifactItem `json:"checkpointArtifact,omitempty"` - - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // LabelGcsUri: GCS uri of decoded labels file for model export - // 'dict.txt'. - LabelGcsUri string `json:"labelGcsUri,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // TfJsBinaryGcsPrefix: GCS uri prefix of Tensorflow JavaScript binary - // files 'groupX-shardXofX.bin' Deprecated. - TfJsBinaryGcsPrefix string `json:"tfJsBinaryGcsPrefix,omitempty"` - - // TfLiteMetadataGcsUri: GCS uri of Tensorflow Lite metadata - // 'tflite_metadata.json'. - TfLiteMetadataGcsUri string `json:"tfLiteMetadataGcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CheckpointArtifact") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckpointArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageModelServingSpec: Serving specification for image models. -type XPSImageModelServingSpec struct { - // ModelThroughputEstimation: Populate under uCAIP request scope. - ModelThroughputEstimation []*XPSImageModelServingSpecModelThroughputEstimation `json:"modelThroughputEstimation,omitempty"` - - // NodeQps: An estimated value of how much traffic a node can serve. - // Populated for AutoMl request only. - NodeQps float64 `json:"nodeQps,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ModelThroughputEstimation") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "ModelThroughputEstimation") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpec) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpec - var s1 struct { - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.NodeQps = float64(s1.NodeQps) - return nil -} - -type XPSImageModelServingSpecModelThroughputEstimation struct { - // Possible values: - // "UNSPECIFIED" - // "NVIDIA_TESLA_K80" - Nvidia Tesla K80 GPU. - // "NVIDIA_TESLA_P100" - Nvidia Tesla P100 GPU. - // "NVIDIA_TESLA_V100" - Nvidia Tesla V100 GPU. - // "NVIDIA_TESLA_P4" - Nvidia Tesla P4 GPU. - // "NVIDIA_TESLA_T4" - Nvidia Tesla T4 GPU. - // "NVIDIA_TESLA_A100" - Nvidia Tesla A100 GPU. - // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. - // "NVIDIA_L4" - Nvidia L4 GPU. - // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. - // "TPU_V2" - TPU v2 (JellyFish). - // "TPU_V3" - TPU v3 (DragonFish). - // "TPU_V4_POD" - TPU_v4 (PufferFish). - // "TPU_V5_LITEPOD" - TPU v5 Lite Pods. - ComputeEngineAcceleratorType string `json:"computeEngineAcceleratorType,omitempty"` - - // LatencyInMilliseconds: Estimated latency. - LatencyInMilliseconds float64 `json:"latencyInMilliseconds,omitempty"` - - // NodeQps: The approximate qps a deployed node can serve. - NodeQps float64 `json:"nodeQps,omitempty"` - - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - ServomaticPartitionType string `json:"servomaticPartitionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ComputeEngineAcceleratorType") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "ComputeEngineAcceleratorType") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageModelServingSpecModelThroughputEstimation) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageModelServingSpecModelThroughputEstimation - var s1 struct { - LatencyInMilliseconds gensupport.JSONFloat64 `json:"latencyInMilliseconds"` - NodeQps gensupport.JSONFloat64 `json:"nodeQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LatencyInMilliseconds = float64(s1.LatencyInMilliseconds) - s.NodeQps = float64(s1.NodeQps) - return nil -} - -// XPSImageObjectDetectionEvaluationMetrics: Model evaluation metrics -// for image object detection problems. Evaluates prediction quality of -// labeled bounding boxes. -type XPSImageObjectDetectionEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: The single metric for bounding boxes - // evaluation: the mean_average_precision averaged over all - // bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: The bounding boxes match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and each label confidence - // threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 pair. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingBoxCount: The total number of bounding boxes (i.e. - // summed over all images) the ground truth used to create this - // evaluation had. - EvaluatedBoundingBoxCount int64 `json:"evaluatedBoundingBoxCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageObjectDetectionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageObjectDetectionEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - return nil -} - -type XPSImageObjectDetectionModelSpec struct { - // ClassCount: Total number of classes. - ClassCount int64 `json:"classCount,omitempty,string"` - - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // MaxBoundingBoxCount: Max number of bounding box. - MaxBoundingBoxCount int64 `json:"maxBoundingBoxCount,omitempty,string"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ClassCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClassCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageObjectDetectionModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageObjectDetectionModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetrics: Model evaluation metrics for -// image segmentation problems. Next tag: 4. -type XPSImageSegmentationEvaluationMetrics struct { - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - ConfidenceMetricsEntries []*XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry: Metrics -// for a single confidence threshold. -type XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // ConfusionMatrix: Confusion matrix of the per confidence_threshold - // evaluation. Pixel counts are set here. Only set for model level - // evaluation, not for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // DiceScoreCoefficient: DSC or the F1 score: The harmonic mean of - // recall and precision. - DiceScoreCoefficient float64 `json:"diceScoreCoefficient,omitempty"` - - // IouScore: IOU score. - IouScore float64 `json:"iouScore,omitempty"` - - // Precision: Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSImageSegmentationEvaluationMetricsConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - DiceScoreCoefficient gensupport.JSONFloat64 `json:"diceScoreCoefficient"` - IouScore gensupport.JSONFloat64 `json:"iouScore"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.DiceScoreCoefficient = float64(s1.DiceScoreCoefficient) - s.IouScore = float64(s1.IouScore) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -type XPSImageSegmentationTrainResponse struct { - // ColorMaps: Color map of the model. - ColorMaps []*XPSColorMap `json:"colorMaps,omitempty"` - - // ExportModelSpec: NOTE: These fields are not used/needed in EAP but - // will be set later. - ExportModelSpec *XPSImageExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. Model artifact spec stores and model gcs pathes and - // related metadata - ModelArtifactSpec *XPSImageModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - ModelServingSpec *XPSImageModelServingSpec `json:"modelServingSpec,omitempty"` - - // StopReason: Stop reason for training job, e.g. - // 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED'. - // - // Possible values: - // "TRAIN_STOP_REASON_UNSPECIFIED" - // "TRAIN_STOP_REASON_BUDGET_REACHED" - // "TRAIN_STOP_REASON_MODEL_CONVERGED" - Model fully converged, can - // not be resumbed training. - // "TRAIN_STOP_REASON_MODEL_EARLY_STOPPED" - Model early converged, - // can be further trained till full convergency. - StopReason string `json:"stopReason,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColorMaps") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColorMaps") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSImageSegmentationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSImageSegmentationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSIntegratedGradientsAttribution: An attribution method that -// computes the Aumann-Shapley value taking advantage of the model's -// fully differentiable structure. Refer to this paper for more details: -// https://arxiv.org/abs/1703.01365 -type XPSIntegratedGradientsAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSIntegratedGradientsAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSIntegratedGradientsAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, - // set the legacy billing metric id here. This will be sent to Chemist - // as the "cloudbilling.googleapis.com/argentum_metric_id" label. - // Otherwise leave empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*XPSMetricEntryLabel `json:"systemLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArgentumMetricId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type XPSMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod XPSMetricEntryLabel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSModelArtifactItem: A single model artifact item. -type XPSModelArtifactItem struct { - // ArtifactFormat: The model artifact format. - // - // Possible values: - // "ARTIFACT_FORMAT_UNSPECIFIED" - Should not be used. - // "TF_CHECKPOINT" - The Tensorflow checkpoints. See - // https://www.tensorflow.org/guide/checkpoint. - // "TF_SAVED_MODEL" - The Tensorflow SavedModel binary. - // "TF_LITE" - Model artifact in generic TensorFlow Lite (.tflite) - // format. See https://www.tensorflow.org/lite. - // "EDGE_TPU_TF_LITE" - Used for [Edge - // TPU](https://cloud.google.com/edge-tpu/) devices. - // "TF_JS" - A [TensorFlow.js](https://www.tensorflow.org/js) model - // that can be used in the browser and in Node.js using JavaScript. - // "CORE_ML" - Used for iOS mobile devices in (.mlmodel) format. See - // https://developer.apple.com/documentation/coreml - ArtifactFormat string `json:"artifactFormat,omitempty"` - - // GcsUri: The Google Cloud Storage (GCS) uri that stores the model - // binary files. - GcsUri string `json:"gcsUri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArtifactFormat") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArtifactFormat") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSModelArtifactItem) MarshalJSON() ([]byte, error) { - type NoMethod XPSModelArtifactItem - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSPreprocessResponse: Next ID: 8 -type XPSPreprocessResponse struct { - // OutputExampleSet: Preprocessed examples, that are to be imported into - // AutoML storage. This should point to RecordIO file(s) of - // PreprocessedExample messages. The - // PreprocessedExample.mvp_training_data-s returned here are later - // verbatim passed to Train() call in TrainExample.mvp_training_data. - OutputExampleSet *XPSExampleSet `json:"outputExampleSet,omitempty"` - - SpeechPreprocessResp *XPSSpeechPreprocessResponse `json:"speechPreprocessResp,omitempty"` - - TablesPreprocessResponse *XPSTablesPreprocessResponse `json:"tablesPreprocessResponse,omitempty"` - - TranslationPreprocessResp *XPSTranslationPreprocessResponse `json:"translationPreprocessResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExampleSet") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "OutputExampleSet") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSRegressionEvaluationMetrics: Model evaluation metrics for -// regression problems. It can be used for Tables. -type XPSRegressionEvaluationMetrics struct { - // MeanAbsoluteError: Mean Absolute Error (MAE). - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error. Only set - // if all ground truth values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root Mean Squared Error (RMSE). - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionEvaluationMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -// XPSRegressionMetricsEntry: A pair of actual & observed values for the -// model being evaluated. -type XPSRegressionMetricsEntry struct { - // PredictedValue: The observed value for a row in the dataset. - PredictedValue float64 `json:"predictedValue,omitempty"` - - // TrueValue: The actual target value for a row in the dataset. - TrueValue float64 `json:"trueValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PredictedValue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PredictedValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSRegressionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSRegressionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSRegressionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSRegressionMetricsEntry - var s1 struct { - PredictedValue gensupport.JSONFloat64 `json:"predictedValue"` - TrueValue gensupport.JSONFloat64 `json:"trueValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedValue = float64(s1.PredictedValue) - s.TrueValue = float64(s1.TrueValue) - return nil -} - -type XPSReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, - // this is used for quota management and billing. Deprecated. AutoML BE - // doesn't use this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - - // MetricEntries: One entry per metric name. The values must be - // aggregated per metric name. - MetricEntries []*XPSMetricEntry `json:"metricEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EffectiveTrainingDuration") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "EffectiveTrainingDuration") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSReportingMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationMetadata struct { - // Inputs: Metadata of the input. - Inputs map[string]XPSResponseExplanationMetadataInputMetadata `json:"inputs,omitempty"` - - // Outputs: Metadata of the output. - Outputs map[string]XPSResponseExplanationMetadataOutputMetadata `json:"outputs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Inputs") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Inputs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataInputMetadata: Metadata of the input of -// a feature. -type XPSResponseExplanationMetadataInputMetadata struct { - // InputTensorName: Name of the input tensor for this model. Only needed - // in train response. - InputTensorName string `json:"inputTensorName,omitempty"` - - // Modality: Modality of the feature. Valid values are: numeric, image. - // Defaults to numeric. - // - // Possible values: - // "MODALITY_UNSPECIFIED" - // "NUMERIC" - // "IMAGE" - // "CATEGORICAL" - Modality string `json:"modality,omitempty"` - - // VisualizationConfig: Visualization configurations for image - // explanation. - VisualizationConfig *XPSVisualization `json:"visualizationConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InputTensorName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataInputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataInputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationMetadataOutputMetadata: Metadata of the -// prediction output to be explained. -type XPSResponseExplanationMetadataOutputMetadata struct { - // OutputTensorName: Name of the output tensor. Only needed in train - // response. - OutputTensorName string `json:"outputTensorName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputTensorName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "OutputTensorName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationMetadataOutputMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationMetadataOutputMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSResponseExplanationParameters struct { - // IntegratedGradientsAttribution: An attribution method that computes - // Aumann-Shapley values taking advantage of the model's fully - // differentiable structure. Refer to this paper for more details: - // https://arxiv.org/abs/1703.01365 - IntegratedGradientsAttribution *XPSIntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"` - - // XraiAttribution: An attribution method that redistributes Integrated - // Gradients attribution to segmented regions, taking advantage of the - // model's fully differentiable structure. Refer to this paper for more - // details: https://arxiv.org/abs/1906.02825 XRAI currently performs - // better on natural images, like a picture of a house or an animal. If - // the images are taken in artificial environments, like a lab or - // manufacturing line, or from diagnostic equipment, like x-rays or - // quality-control cameras, use Integrated Gradients instead. - XraiAttribution *XPSXraiAttribution `json:"xraiAttribution,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IntegratedGradientsAttribution") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "IntegratedGradientsAttribution") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSResponseExplanationSpec: Specification of Model explanation. -// Feature-based XAI in AutoML Vision ICN is deprecated, see b/288407203 -// for context. -type XPSResponseExplanationSpec struct { - // ExplanationType: Explanation type. For AutoML Image Classification - // models, possible values are: * `image-integrated-gradients` * - // `image-xrai` - ExplanationType string `json:"explanationType,omitempty"` - - // Metadata: Metadata describing the Model's input and output for - // explanation. - Metadata *XPSResponseExplanationMetadata `json:"metadata,omitempty"` - - // Parameters: Parameters that configure explaining of the Model's - // predictions. - Parameters *XPSResponseExplanationParameters `json:"parameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExplanationType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSResponseExplanationSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSResponseExplanationSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSRow struct { - // ColumnIds: The ids of the columns. Note: The below `values` field - // must match order of this field, if this field is set. - ColumnIds []int64 `json:"columnIds,omitempty"` - - // Values: The values of the row cells, given in the same order as the - // column_ids. If column_ids is not set, then in the same order as the - // input_feature_column_ids in TablesModelMetadata. - Values []interface{} `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnIds") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnIds") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSRow) MarshalJSON() ([]byte, error) { - type NoMethod XPSRow - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetrics struct { - // SubModelEvaluationMetrics: Evaluation metrics for all submodels - // contained in this model. - SubModelEvaluationMetrics []*XPSSpeechEvaluationMetricsSubModelEvaluationMetric `json:"subModelEvaluationMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SubModelEvaluationMetrics") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "SubModelEvaluationMetrics") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechEvaluationMetricsSubModelEvaluationMetric struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - NumDeletions int64 `json:"numDeletions,omitempty"` - - NumInsertions int64 `json:"numInsertions,omitempty"` - - NumSubstitutions int64 `json:"numSubstitutions,omitempty"` - - // NumUtterances: Number of utterances used in the wer computation. - NumUtterances int64 `json:"numUtterances,omitempty"` - - // NumWords: Number of words over which the word error rate was - // computed. - NumWords int64 `json:"numWords,omitempty"` - - // SentenceAccuracy: Below fields are used for debugging purposes - SentenceAccuracy float64 `json:"sentenceAccuracy,omitempty"` - - // Wer: Word error rate (standard error metric used for speech - // recognition). - Wer float64 `json:"wer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSSpeechEvaluationMetricsSubModelEvaluationMetric) UnmarshalJSON(data []byte) error { - type NoMethod XPSSpeechEvaluationMetricsSubModelEvaluationMetric - var s1 struct { - SentenceAccuracy gensupport.JSONFloat64 `json:"sentenceAccuracy"` - Wer gensupport.JSONFloat64 `json:"wer"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SentenceAccuracy = float64(s1.SentenceAccuracy) - s.Wer = float64(s1.Wer) - return nil -} - -type XPSSpeechModelSpec struct { - // DatasetId: Required for speech xps backend. Speech xps has to use - // dataset_id and model_id as the primary key in db so that speech API - // can query the db directly. - DatasetId int64 `json:"datasetId,omitempty,string"` - - Language string `json:"language,omitempty"` - - // SubModelSpecs: Model specs for all submodels contained in this model. - SubModelSpecs []*XPSSpeechModelSpecSubModelSpec `json:"subModelSpecs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatasetId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DatasetId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechModelSpecSubModelSpec struct { - // BiasingModelType: Type of the biasing model. - // - // Possible values: - // "BIASING_MODEL_TYPE_UNSPECIFIED" - // "COMMAND_AND_SEARCH" - Build biasing model on top of - // COMMAND_AND_SEARCH model - // "PHONE_CALL" - Build biasing model on top of PHONE_CALL model - // "VIDEO" - Build biasing model on top of VIDEO model - // "DEFAULT" - Build biasing model on top of DEFAULT model - BiasingModelType string `json:"biasingModelType,omitempty"` - - // ClientId: In S3, Recognition ClientContextId.client_id - ClientId string `json:"clientId,omitempty"` - - // ContextId: In S3, Recognition ClientContextId.context_id - ContextId string `json:"contextId,omitempty"` - - // IsEnhancedModel: If true then it means we have an enhanced version of - // the biasing models. - IsEnhancedModel bool `json:"isEnhancedModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BiasingModelType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BiasingModelType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechModelSpecSubModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechModelSpecSubModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessResponse struct { - // CnsTestDataPath: Location od shards of sstables (test data) of - // DataUtterance protos. - CnsTestDataPath string `json:"cnsTestDataPath,omitempty"` - - // CnsTrainDataPath: Location of shards of sstables (training data) of - // DataUtterance protos. - CnsTrainDataPath string `json:"cnsTrainDataPath,omitempty"` - - // PrebuiltModelEvaluationMetrics: The metrics for prebuilt speech - // models. They are included here because there is no prebuilt speech - // models stored in the AutoML. - PrebuiltModelEvaluationMetrics *XPSSpeechEvaluationMetrics `json:"prebuiltModelEvaluationMetrics,omitempty"` - - // SpeechPreprocessStats: Stats associated with the data. - SpeechPreprocessStats *XPSSpeechPreprocessStats `json:"speechPreprocessStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CnsTestDataPath") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CnsTestDataPath") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSSpeechPreprocessStats struct { - // DataErrors: Different types of data errors and the counts associated - // with them. - DataErrors []*XPSDataErrors `json:"dataErrors,omitempty"` - - // NumHumanLabeledExamples: The number of rows marked HUMAN_LABELLED - NumHumanLabeledExamples int64 `json:"numHumanLabeledExamples,omitempty"` - - // NumLogsExamples: The number of samples found in the previously - // recorded logs data. - NumLogsExamples int64 `json:"numLogsExamples,omitempty"` - - // NumMachineTranscribedExamples: The number of rows marked as - // MACHINE_TRANSCRIBED - NumMachineTranscribedExamples int64 `json:"numMachineTranscribedExamples,omitempty"` - - // TestExamplesCount: The number of examples labelled as TEST by Speech - // xps server. - TestExamplesCount int64 `json:"testExamplesCount,omitempty"` - - // TestSentencesCount: The number of sentences in the test data set. - TestSentencesCount int64 `json:"testSentencesCount,omitempty"` - - // TestWordsCount: The number of words in the test data set. - TestWordsCount int64 `json:"testWordsCount,omitempty"` - - // TrainExamplesCount: The number of examples labeled as TRAIN by Speech - // xps server. - TrainExamplesCount int64 `json:"trainExamplesCount,omitempty"` - - // TrainSentencesCount: The number of sentences in the training data - // set. - TrainSentencesCount int64 `json:"trainSentencesCount,omitempty"` - - // TrainWordsCount: The number of words in the training data set. - TrainWordsCount int64 `json:"trainWordsCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataErrors") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DataErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSSpeechPreprocessStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSSpeechPreprocessStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStats: The data statistics of a series of STRING values. -type XPSStringStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // TopUnigramStats: The statistics of the top 20 unigrams, ordered by - // StringStats.UnigramStats.count. - TopUnigramStats []*XPSStringStatsUnigramStats `json:"topUnigramStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStringStatsUnigramStats: The statistics of a unigram. -type XPSStringStatsUnigramStats struct { - // Count: The number of occurrences of this unigram in the series. - Count int64 `json:"count,omitempty,string"` - - // Value: The unigram. - Value string `json:"value,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStringStatsUnigramStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStringStatsUnigramStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructStats: The data statistics of a series of STRUCT values. -type XPSStructStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // FieldStats: Map from a field name of the struct to data stats - // aggregated over series of all data in that field across all the - // structs. - FieldStats map[string]XPSDataStats `json:"fieldStats,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSStructType: `StructType` defines the DataType-s of a STRUCT type. -type XPSStructType struct { - // Fields: Unordered map of struct field names to their data types. - Fields map[string]XPSDataType `json:"fields,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fields") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fields") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSStructType) MarshalJSON() ([]byte, error) { - type NoMethod XPSStructType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTableSpec struct { - // ColumnSpecs: Mapping from column id to column spec. - ColumnSpecs map[string]XPSColumnSpec `json:"columnSpecs,omitempty"` - - // ImportedDataSizeInBytes: The total size of imported data of the - // table. - ImportedDataSizeInBytes int64 `json:"importedDataSizeInBytes,omitempty,string"` - - // RowCount: The number of rows in the table. - RowCount int64 `json:"rowCount,omitempty,string"` - - // TimeColumnId: The id of the time column. - TimeColumnId int64 `json:"timeColumnId,omitempty"` - - // ValidRowCount: The number of valid rows. - ValidRowCount int64 `json:"validRowCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ColumnSpecs") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnSpecs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTableSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSTableSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetrics: Metrics for Tables classification -// problems. -type XPSTablesClassificationMetrics struct { - // CurveMetrics: Metrics building a curve. - CurveMetrics []*XPSTablesClassificationMetricsCurveMetrics `json:"curveMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurveMetrics") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CurveMetrics") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesClassificationMetricsCurveMetrics: Metrics curve data point -// for a single value. -type XPSTablesClassificationMetricsCurveMetrics struct { - // AucPr: The area under the precision-recall curve. - AucPr float64 `json:"aucPr,omitempty"` - - // AucRoc: The area under receiver operating characteristic curve. - AucRoc float64 `json:"aucRoc,omitempty"` - - // ConfidenceMetricsEntries: Metrics that have confidence thresholds. - // Precision-recall curve and ROC curve can be derived from them. - ConfidenceMetricsEntries []*XPSTablesConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // LogLoss: The Log loss metric. - LogLoss float64 `json:"logLoss,omitempty"` - - // PositionThreshold: The position threshold value used to compute the - // metrics. - PositionThreshold int64 `json:"positionThreshold,omitempty"` - - // Value: The CATEGORY row value (for ARRAY unnested) the curve metrics - // are for. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AucPr") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AucPr") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesClassificationMetricsCurveMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesClassificationMetricsCurveMetrics - var s1 struct { - AucPr gensupport.JSONFloat64 `json:"aucPr"` - AucRoc gensupport.JSONFloat64 `json:"aucRoc"` - LogLoss gensupport.JSONFloat64 `json:"logLoss"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AucPr = float64(s1.AucPr) - s.AucRoc = float64(s1.AucRoc) - s.LogLoss = float64(s1.LogLoss) - return nil -} - -// XPSTablesConfidenceMetricsEntry: Metrics for a single confidence -// threshold. -type XPSTablesConfidenceMetricsEntry struct { - // ConfidenceThreshold: The confidence threshold value used to compute - // the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: The harmonic mean of recall and precision. (2 * precision * - // recall) / (precision + recall) - F1Score float64 `json:"f1Score,omitempty"` - - // FalseNegativeCount: False negative count. - FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` - - // FalsePositiveCount: False positive count. - FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` - - // FalsePositiveRate: FPR = #false positives / (#false positives + #true - // negatives) - FalsePositiveRate float64 `json:"falsePositiveRate,omitempty"` - - // Precision: Precision = #true positives / (#true positives + #false - // positives). - Precision float64 `json:"precision,omitempty"` - - // Recall: Recall = #true positives / (#true positives + #false - // negatives). - Recall float64 `json:"recall,omitempty"` - - // TrueNegativeCount: True negative count. - TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` - - // TruePositiveCount: True positive count. - TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` - - // TruePositiveRate: TPR = #true positives / (#true positives + #false - // negatvies) - TruePositiveRate float64 `json:"truePositiveRate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - FalsePositiveRate gensupport.JSONFloat64 `json:"falsePositiveRate"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - TruePositiveRate gensupport.JSONFloat64 `json:"truePositiveRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.FalsePositiveRate = float64(s1.FalsePositiveRate) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - s.TruePositiveRate = float64(s1.TruePositiveRate) - return nil -} - -// XPSTablesDatasetMetadata: Metadata for a dataset used for AutoML -// Tables. Next ID: 6 -type XPSTablesDatasetMetadata struct { - // MlUseColumnId: Id the column to split the table. - MlUseColumnId int64 `json:"mlUseColumnId,omitempty"` - - // PrimaryTableSpec: Primary table. - PrimaryTableSpec *XPSTableSpec `json:"primaryTableSpec,omitempty"` - - // TargetColumnCorrelations: (the column id : its CorrelationStats with - // target column). - TargetColumnCorrelations map[string]XPSCorrelationStats `json:"targetColumnCorrelations,omitempty"` - - // TargetColumnId: Id of the primary table column that should be used as - // the training label. - TargetColumnId int64 `json:"targetColumnId,omitempty"` - - // WeightColumnId: Id of the primary table column that should be used as - // the weight column. - WeightColumnId int64 `json:"weightColumnId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MlUseColumnId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MlUseColumnId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesDatasetMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesDatasetMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesEvaluationMetrics struct { - // ClassificationMetrics: Classification metrics. - ClassificationMetrics *XPSTablesClassificationMetrics `json:"classificationMetrics,omitempty"` - - // RegressionMetrics: Regression metrics. - RegressionMetrics *XPSTablesRegressionMetrics `json:"regressionMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClassificationMetrics") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClassificationMetrics") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelColumnInfo: An information specific to given column and -// Tables Model, in context of the Model and the predictions created by -// it. -type XPSTablesModelColumnInfo struct { - // ColumnId: The ID of the column. - ColumnId int64 `json:"columnId,omitempty"` - - // FeatureImportance: When given as part of a Model: Measurement of how - // much model predictions correctness on the TEST data depend on values - // in this column. A value between 0 and 1, higher means higher - // influence. These values are normalized - for all input feature - // columns of a given model they add to 1. When given back by Predict or - // Batch Predict: Measurement of how impactful for the prediction - // returned for the given row the value in this column was. - // Specifically, the feature importance specifies the marginal - // contribution that the feature made to the prediction score compared - // to the baseline score. These values are computed using the Sampled - // Shapley method. - FeatureImportance float64 `json:"featureImportance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ColumnId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ColumnId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelColumnInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelColumnInfo) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelColumnInfo - var s1 struct { - FeatureImportance gensupport.JSONFloat64 `json:"featureImportance"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FeatureImportance = float64(s1.FeatureImportance) - return nil -} - -// XPSTablesModelStructure: A description of Tables model structure. -type XPSTablesModelStructure struct { - // ModelParameters: A list of models. - ModelParameters []*XPSTablesModelStructureModelParameters `json:"modelParameters,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelParameters") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelParameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructure) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesModelStructureModelParameters: Model hyper-parameters for a -// model. -type XPSTablesModelStructureModelParameters struct { - Hyperparameters []*XPSTablesModelStructureModelParametersParameter `json:"hyperparameters,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Hyperparameters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParameters) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParameters - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesModelStructureModelParametersParameter struct { - // FloatValue: Float type parameter value. - FloatValue float64 `json:"floatValue,omitempty"` - - // IntValue: Integer type parameter value. - IntValue int64 `json:"intValue,omitempty,string"` - - // Name: Parameter name. - Name string `json:"name,omitempty"` - - // StringValue: String type parameter value. - StringValue string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FloatValue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FloatValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesModelStructureModelParametersParameter) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesModelStructureModelParametersParameter - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesModelStructureModelParametersParameter) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesModelStructureModelParametersParameter - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -type XPSTablesPreprocessResponse struct { - // TablesDatasetMetadata: The table/column id, column_name and the - // DataTypes of the columns will be populated. - TablesDatasetMetadata *XPSTablesDatasetMetadata `json:"tablesDatasetMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TablesDatasetMetadata") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TablesDatasetMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTablesRegressionMetrics: Metrics for Tables regression problems. -type XPSTablesRegressionMetrics struct { - // MeanAbsoluteError: Mean absolute error. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanAbsolutePercentageError: Mean absolute percentage error, only set - // if all of the target column's values are positive. - MeanAbsolutePercentageError float64 `json:"meanAbsolutePercentageError,omitempty"` - - // RSquared: R squared. - RSquared float64 `json:"rSquared,omitempty"` - - // RegressionMetricsEntries: A list of actual versus predicted points - // for the model being evaluated. - RegressionMetricsEntries []*XPSRegressionMetricsEntry `json:"regressionMetricsEntries,omitempty"` - - // RootMeanSquaredError: Root mean squared error. - RootMeanSquaredError float64 `json:"rootMeanSquaredError,omitempty"` - - // RootMeanSquaredLogError: Root mean squared log error. - RootMeanSquaredLogError float64 `json:"rootMeanSquaredLogError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MeanAbsoluteError") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MeanAbsoluteError") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesRegressionMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesRegressionMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTablesRegressionMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTablesRegressionMetrics - var s1 struct { - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanAbsolutePercentageError gensupport.JSONFloat64 `json:"meanAbsolutePercentageError"` - RSquared gensupport.JSONFloat64 `json:"rSquared"` - RootMeanSquaredError gensupport.JSONFloat64 `json:"rootMeanSquaredError"` - RootMeanSquaredLogError gensupport.JSONFloat64 `json:"rootMeanSquaredLogError"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanAbsolutePercentageError = float64(s1.MeanAbsolutePercentageError) - s.RSquared = float64(s1.RSquared) - s.RootMeanSquaredError = float64(s1.RootMeanSquaredError) - s.RootMeanSquaredLogError = float64(s1.RootMeanSquaredLogError) - return nil -} - -type XPSTablesTrainResponse struct { - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // PredictionSampleRows: Sample rows from the dataset this model was - // trained. - PredictionSampleRows []*XPSRow `json:"predictionSampleRows,omitempty"` - - // TablesModelColumnInfo: Output only. Auxiliary information for each of - // the input_feature_column_specs, with respect to this particular - // model. - TablesModelColumnInfo []*XPSTablesModelColumnInfo `json:"tablesModelColumnInfo,omitempty"` - - // TrainCostMilliNodeHours: The actual training cost of the model, - // expressed in milli node hours, i.e. 1,000 value in this field means 1 - // node hour. Guaranteed to not exceed the train budget. - TrainCostMilliNodeHours int64 `json:"trainCostMilliNodeHours,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTablesTrainingOperationMetadata struct { - // CreateModelStage: Current stage of creating model. - // - // Possible values: - // "CREATE_MODEL_STAGE_UNSPECIFIED" - Unspecified stage. - // "DATA_PREPROCESSING" - Prepare the model training pipeline and run - // data processing. - // "TRAINING" - Training model. - // "EVALUATING" - Run evaluation. - // "MODEL_POST_PROCESSING" - Finalizing model training pipeline. - CreateModelStage string `json:"createModelStage,omitempty"` - - // OptimizationObjective: The optimization objective for model. - OptimizationObjective string `json:"optimizationObjective,omitempty"` - - // TopTrials: This field is for training. When the operation is - // terminated successfully, AutoML Backend post this field to operation - // metadata in spanner. If the metadata has no trials returned, the - // training operation is supposed to be a failure. - TopTrials []*XPSTuningTrial `json:"topTrials,omitempty"` - - // TrainBudgetMilliNodeHours: Creating model budget. - TrainBudgetMilliNodeHours int64 `json:"trainBudgetMilliNodeHours,omitempty,string"` - - // TrainingObjectivePoints: This field records the training objective - // value with respect to time, giving insight into how the model - // architecture search is performing as training time elapses. - TrainingObjectivePoints []*XPSTrainingObjectivePoint `json:"trainingObjectivePoints,omitempty"` - - // TrainingStartTime: Timestamp when training process starts. - TrainingStartTime string `json:"trainingStartTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateModelStage") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateModelStage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTablesTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSTablesTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextComponentModel: Component model. Next ID: 10 -type XPSTextComponentModel struct { - // BatchPredictionModelGcsUri: The Cloud Storage resource path to hold - // batch prediction model. - BatchPredictionModelGcsUri string `json:"batchPredictionModelGcsUri,omitempty"` - - // OnlinePredictionModelGcsUri: The Cloud Storage resource path to hold - // online prediction model. - OnlinePredictionModelGcsUri string `json:"onlinePredictionModelGcsUri,omitempty"` - - // Partition: The partition where the model is deployed. Populated by - // uCAIP BE as part of online PredictRequest. - // - // Possible values: - // "PARTITION_TYPE_UNSPECIFIED" - // "PARTITION_ZERO" - The default partition. - // "PARTITION_REDUCED_HOMING" - It has significantly lower replication - // than partition-0 and is located in the US only. It also has a larger - // model size limit and higher default RAM quota than partition-0. - // Customers with batch traffic, US-based traffic, or very large models - // should use this partition. Capacity in this partition is - // significantly cheaper than partition-0. - // "PARTITION_JELLYFISH" - To be used by customers with - // Jellyfish-accelerated ops. See go/servomatic-jellyfish for details. - // "PARTITION_CPU" - The partition used by regionalized servomatic - // cloud regions. - // "PARTITION_CUSTOM_STORAGE_CPU" - The partition used for loading - // models from custom storage. - Partition string `json:"partition,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // online predict, batch predict) via public Cloud Ai Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ServoModelName: The name of servo model. Populated by uCAIP BE as - // part of online PredictRequest. - ServoModelName string `json:"servoModelName,omitempty"` - - // SubmodelName: The name of the trained NL submodel. - SubmodelName string `json:"submodelName,omitempty"` - - // SubmodelType: The type of trained NL submodel - // - // Possible values: - // "TEXT_MODEL_TYPE_UNSPECIFIED" - // "TEXT_MODEL_TYPE_DEFAULT" - // "TEXT_MODEL_TYPE_META_ARCHITECT" - // "TEXT_MODEL_TYPE_ATC" - // "TEXT_MODEL_TYPE_CLARA2" - // "TEXT_MODEL_TYPE_CHATBASE" - // "TEXT_MODEL_TYPE_SAFT_SPAN_LABELING" - // "TEXT_MODEL_TYPE_TEXT_EXTRACTION" - Model type for entity - // extraction. - // "TEXT_MODEL_TYPE_RELATIONSHIP_EXTRACTION" - Model type for - // relationship extraction. - // "TEXT_MODEL_TYPE_COMPOSITE" - A composite model represents a set of - // component models that have to be used together for prediction. A - // composite model appears to be a single model to the model user. It - // may contain only one component model. Please refer to - // go/cnl-composite-models for more information. - // "TEXT_MODEL_TYPE_ALL_MODELS" - Model type used to train default, - // MA, and ATC models in a single batch worker pipeline. - // "TEXT_MODEL_TYPE_BERT" - BERT pipeline needs a specific model type, - // since it uses a different TFX configuration compared with DEFAULT - // (despite sharing most of the code). - // "TEXT_MODEL_TYPE_ENC_PALM" - Model type for EncPaLM. - SubmodelType string `json:"submodelType,omitempty"` - - // TfRuntimeVersion: ## The fields below are only populated under uCAIP - // request scope. - // https://cloud.google.com/ml-engine/docs/runtime-version-list - TfRuntimeVersion string `json:"tfRuntimeVersion,omitempty"` - - // VersionNumber: The servomatic model version number. Populated by - // uCAIP BE as part of online PredictRequest. - VersionNumber int64 `json:"versionNumber,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "BatchPredictionModelGcsUri") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "BatchPredictionModelGcsUri") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextComponentModel) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextComponentModel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTextExtractionEvaluationMetrics struct { - // BestF1ConfidenceMetrics: Values are at the highest F1 score on the - // precision-recall curve. Only confidence_threshold, recall, precision, - // and f1_score will be set. - BestF1ConfidenceMetrics *XPSConfidenceMetricsEntry `json:"bestF1ConfidenceMetrics,omitempty"` - - // ConfidenceMetricsEntries: If the enclosing EvaluationMetrics.label is - // empty, confidence_metrics_entries is an evaluation of the entire - // model across all labels. If the enclosing EvaluationMetrics.label is - // set, confidence_metrics_entries applies to that label. - ConfidenceMetricsEntries []*XPSConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // ConfusionMatrix: Confusion matrix of the model, at the default - // confidence threshold (0.0). Only set for whole-model evaluation, not - // for evaluation per label. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // PerLabelConfidenceMetrics: Only recall, precision, and f1_score will - // be set. - PerLabelConfidenceMetrics map[string]XPSConfidenceMetricsEntry `json:"perLabelConfidenceMetrics,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BestF1ConfidenceMetrics") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BestF1ConfidenceMetrics") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextExtractionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextExtractionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTextSentimentEvaluationMetrics: Model evaluation metrics for text -// sentiment problems. -type XPSTextSentimentEvaluationMetrics struct { - // ConfusionMatrix: Output only. Confusion matrix of the evaluation. - // Only set for the overall model evaluation, not for evaluation of a - // single annotation spec. - ConfusionMatrix *XPSConfusionMatrix `json:"confusionMatrix,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // LinearKappa: Output only. Linear weighted kappa. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - LinearKappa float64 `json:"linearKappa,omitempty"` - - // MeanAbsoluteError: Output only. Mean absolute error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanAbsoluteError float64 `json:"meanAbsoluteError,omitempty"` - - // MeanSquaredError: Output only. Mean squared error. Only set for the - // overall model evaluation, not for evaluation of a single annotation - // spec. - MeanSquaredError float64 `json:"meanSquaredError,omitempty"` - - // Precision: Output only. Precision. - Precision float64 `json:"precision,omitempty"` - - // QuadraticKappa: Output only. Quadratic weighted kappa. Only set for - // the overall model evaluation, not for evaluation of a single - // annotation spec. - QuadraticKappa float64 `json:"quadraticKappa,omitempty"` - - // Recall: Output only. Recall. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfusionMatrix") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfusionMatrix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextSentimentEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextSentimentEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTextSentimentEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTextSentimentEvaluationMetrics - var s1 struct { - F1Score gensupport.JSONFloat64 `json:"f1Score"` - LinearKappa gensupport.JSONFloat64 `json:"linearKappa"` - MeanAbsoluteError gensupport.JSONFloat64 `json:"meanAbsoluteError"` - MeanSquaredError gensupport.JSONFloat64 `json:"meanSquaredError"` - Precision gensupport.JSONFloat64 `json:"precision"` - QuadraticKappa gensupport.JSONFloat64 `json:"quadraticKappa"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.F1Score = float64(s1.F1Score) - s.LinearKappa = float64(s1.LinearKappa) - s.MeanAbsoluteError = float64(s1.MeanAbsoluteError) - s.MeanSquaredError = float64(s1.MeanSquaredError) - s.Precision = float64(s1.Precision) - s.QuadraticKappa = float64(s1.QuadraticKappa) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSTextToSpeechTrainResponse: TextToSpeech train response -type XPSTextToSpeechTrainResponse struct { -} - -type XPSTextTrainResponse struct { - // ComponentModel: Component submodels. - ComponentModel []*XPSTextComponentModel `json:"componentModel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ComponentModel") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ComponentModel") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTextTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTextTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTfJsFormat: A TensorFlow.js (https://www.tensorflow.org/js) model -// that can be used in the browser and in Node.js using JavaScript. -type XPSTfJsFormat struct { -} - -// XPSTfLiteFormat: LINT.IfChange A model format used for mobile and IoT -// devices. See https://www.tensorflow.org/lite. -type XPSTfLiteFormat struct { -} - -// XPSTfSavedModelFormat: A tensorflow model format in SavedModel -// format. -type XPSTfSavedModelFormat struct { -} - -// XPSTimestampStats: The data statistics of a series of TIMESTAMP -// values. -type XPSTimestampStats struct { - CommonStats *XPSCommonStats `json:"commonStats,omitempty"` - - // GranularStats: The string key is the pre-defined granularity. - // Currently supported: hour_of_day, day_of_week, month_of_year. - // Granularities finer that the granularity of timestamp data are not - // populated (e.g. if timestamps are at day granularity, then - // hour_of_day is not populated). - GranularStats map[string]XPSTimestampStatsGranularStats `json:"granularStats,omitempty"` - - MedianTimestampNanos int64 `json:"medianTimestampNanos,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "CommonStats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTimestampStatsGranularStats: Stats split by a defined in context -// granularity. -type XPSTimestampStatsGranularStats struct { - // Buckets: A map from granularity key to example count for that key. - // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means - // May). - Buckets map[string]string `json:"buckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Buckets") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Buckets") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTimestampStatsGranularStats) MarshalJSON() ([]byte, error) { - type NoMethod XPSTimestampStatsGranularStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTrackMetricsEntry: Track matching model metrics for a single track -// match threshold and multiple label match confidence thresholds. Next -// tag: 6. -type XPSTrackMetricsEntry struct { - // ConfidenceMetricsEntries: Output only. Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - // Precision-recall curve is derived from them. - ConfidenceMetricsEntries []*XPSTrackMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // IouThreshold: Output only. The intersection-over-union threshold - // value between bounding boxes across frames used to compute this - // metric entry. - IouThreshold float64 `json:"iouThreshold,omitempty"` - - // MeanBoundingBoxIou: Output only. The mean bounding box iou over all - // confidence thresholds. - MeanBoundingBoxIou float64 `json:"meanBoundingBoxIou,omitempty"` - - // MeanMismatchRate: Output only. The mean mismatch rate over all - // confidence thresholds. - MeanMismatchRate float64 `json:"meanMismatchRate,omitempty"` - - // MeanTrackingAveragePrecision: Output only. The mean average precision - // over all confidence thresholds. - MeanTrackingAveragePrecision float64 `json:"meanTrackingAveragePrecision,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntry - var s1 struct { - IouThreshold gensupport.JSONFloat64 `json:"iouThreshold"` - MeanBoundingBoxIou gensupport.JSONFloat64 `json:"meanBoundingBoxIou"` - MeanMismatchRate gensupport.JSONFloat64 `json:"meanMismatchRate"` - MeanTrackingAveragePrecision gensupport.JSONFloat64 `json:"meanTrackingAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.IouThreshold = float64(s1.IouThreshold) - s.MeanBoundingBoxIou = float64(s1.MeanBoundingBoxIou) - s.MeanMismatchRate = float64(s1.MeanMismatchRate) - s.MeanTrackingAveragePrecision = float64(s1.MeanTrackingAveragePrecision) - return nil -} - -// XPSTrackMetricsEntryConfidenceMetricsEntry: Metrics for a single -// confidence threshold. Next tag: 6. -type XPSTrackMetricsEntryConfidenceMetricsEntry struct { - // BoundingBoxIou: Output only. Bounding box intersection-over-union - // precision. Measures how well the bounding boxes overlap between each - // other (e.g. complete overlap or just barely above iou_threshold). - BoundingBoxIou float64 `json:"boundingBoxIou,omitempty"` - - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // MismatchRate: Output only. Mismatch rate, which measures the tracking - // consistency, i.e. correctness of instance ID continuity. - MismatchRate float64 `json:"mismatchRate,omitempty"` - - // TrackingPrecision: Output only. Tracking precision. - TrackingPrecision float64 `json:"trackingPrecision,omitempty"` - - // TrackingRecall: Output only. Tracking recall. - TrackingRecall float64 `json:"trackingRecall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoundingBoxIou") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BoundingBoxIou") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrackMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrackMetricsEntryConfidenceMetricsEntry - var s1 struct { - BoundingBoxIou gensupport.JSONFloat64 `json:"boundingBoxIou"` - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - MismatchRate gensupport.JSONFloat64 `json:"mismatchRate"` - TrackingPrecision gensupport.JSONFloat64 `json:"trackingPrecision"` - TrackingRecall gensupport.JSONFloat64 `json:"trackingRecall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxIou = float64(s1.BoundingBoxIou) - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.MismatchRate = float64(s1.MismatchRate) - s.TrackingPrecision = float64(s1.TrackingPrecision) - s.TrackingRecall = float64(s1.TrackingRecall) - return nil -} - -// XPSTrainResponse: Next ID: 18 -type XPSTrainResponse struct { - // DeployedModelSizeBytes: Estimated model size in bytes once deployed. - DeployedModelSizeBytes int64 `json:"deployedModelSizeBytes,omitempty,string"` - - // ErrorAnalysisConfigs: Optional vision model error analysis - // configuration. The field is set when model error analysis is enabled - // in the training request. The results of error analysis will be binded - // together with evaluation results (in the format of AnnotatedExample). - ErrorAnalysisConfigs []*XPSVisionErrorAnalysisConfig `json:"errorAnalysisConfigs,omitempty"` - - // EvaluatedExampleSet: Examples used to evaluate the model (usually the - // test set), with the predicted annotations. The file_spec should point - // to recordio file(s) of AnnotatedExample. For each returned example, - // the example_id_token and annotations predicted by the model must be - // set. The example payload can and is recommended to be omitted. - EvaluatedExampleSet *XPSExampleSet `json:"evaluatedExampleSet,omitempty"` - - // EvaluationMetricsSet: The trained model evaluation metrics. This can - // be optionally returned. - EvaluationMetricsSet *XPSEvaluationMetricsSet `json:"evaluationMetricsSet,omitempty"` - - // ExplanationConfigs: VisionExplanationConfig for XAI on test set. - // Optional for when XAI is enable in training request. - ExplanationConfigs []*XPSResponseExplanationSpec `json:"explanationConfigs,omitempty"` - - ImageClassificationTrainResp *XPSImageClassificationTrainResponse `json:"imageClassificationTrainResp,omitempty"` - - ImageObjectDetectionTrainResp *XPSImageObjectDetectionModelSpec `json:"imageObjectDetectionTrainResp,omitempty"` - - ImageSegmentationTrainResp *XPSImageSegmentationTrainResponse `json:"imageSegmentationTrainResp,omitempty"` - - // ModelToken: Token that represents the trained model. This is - // considered immutable and is persisted in AutoML. xPS can put their - // own proto in the byte string, to e.g. point to the model checkpoints. - // The token is passed to other xPS APIs to refer to the model. - ModelToken string `json:"modelToken,omitempty"` - - SpeechTrainResp *XPSSpeechModelSpec `json:"speechTrainResp,omitempty"` - - TablesTrainResp *XPSTablesTrainResponse `json:"tablesTrainResp,omitempty"` - - TextToSpeechTrainResp *XPSTextToSpeechTrainResponse `json:"textToSpeechTrainResp,omitempty"` - - // TextTrainResp: Will only be needed for uCAIP from Beta. - TextTrainResp *XPSTextTrainResponse `json:"textTrainResp,omitempty"` - - TranslationTrainResp *XPSTranslationTrainResponse `json:"translationTrainResp,omitempty"` - - VideoActionRecognitionTrainResp *XPSVideoActionRecognitionTrainResponse `json:"videoActionRecognitionTrainResp,omitempty"` - - VideoClassificationTrainResp *XPSVideoClassificationTrainResponse `json:"videoClassificationTrainResp,omitempty"` - - VideoObjectTrackingTrainResp *XPSVideoObjectTrackingTrainResponse `json:"videoObjectTrackingTrainResp,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "DeployedModelSizeBytes") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeployedModelSizeBytes") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSTrainingObjectivePoint struct { - // CreateTime: The time at which this point was recorded. - CreateTime string `json:"createTime,omitempty"` - - // Value: The objective value when this point was recorded. - Value float64 `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTrainingObjectivePoint) MarshalJSON() ([]byte, error) { - type NoMethod XPSTrainingObjectivePoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTrainingObjectivePoint) UnmarshalJSON(data []byte) error { - type NoMethod XPSTrainingObjectivePoint - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// XPSTranslationEvaluationMetrics: Evaluation metrics for the dataset. -type XPSTranslationEvaluationMetrics struct { - // BaseBleuScore: BLEU score for base model. - BaseBleuScore float64 `json:"baseBleuScore,omitempty"` - - // BleuScore: BLEU score. - BleuScore float64 `json:"bleuScore,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BaseBleuScore") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BaseBleuScore") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSTranslationEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSTranslationEvaluationMetrics - var s1 struct { - BaseBleuScore gensupport.JSONFloat64 `json:"baseBleuScore"` - BleuScore gensupport.JSONFloat64 `json:"bleuScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BaseBleuScore = float64(s1.BaseBleuScore) - s.BleuScore = float64(s1.BleuScore) - return nil -} - -// XPSTranslationPreprocessResponse: Translation preprocess response. -type XPSTranslationPreprocessResponse struct { - // ParsedExampleCount: Total example count parsed. - ParsedExampleCount int64 `json:"parsedExampleCount,omitempty,string"` - - // ValidExampleCount: Total valid example count. - ValidExampleCount int64 `json:"validExampleCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ParsedExampleCount") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ParsedExampleCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationPreprocessResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationPreprocessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTranslationTrainResponse: Train response for translation. -type XPSTranslationTrainResponse struct { - // ModelType: Type of the model. - // - // Possible values: - // "MODEL_TYPE_UNSPECIFIED" - Default - // "LEGACY" - Legacy model. Will be deprecated. - // "CURRENT" - Current model. - ModelType string `json:"modelType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSTranslationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSTranslationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSTuningTrial: Metrics for a tuning job generated, will get -// forwarded to Stackdriver as model tuning logs. Setting this as a -// standalone message out of CreateModelMetadata to avoid confusion as -// we expose this message only to users. -type XPSTuningTrial struct { - // ModelStructure: Model parameters for the trial. - ModelStructure *XPSTablesModelStructure `json:"modelStructure,omitempty"` - - // TrainingObjectivePoint: The optimization objective evaluation of the - // eval split data. - TrainingObjectivePoint *XPSTrainingObjectivePoint `json:"trainingObjectivePoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ModelStructure") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelStructure") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSTuningTrial) MarshalJSON() ([]byte, error) { - type NoMethod XPSTuningTrial - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoActionMetricsEntry: The Evaluation metrics entry given a -// specific precision_window_length. -type XPSVideoActionMetricsEntry struct { - // ConfidenceMetricsEntries: Metrics for each label-match - // confidence_threshold from 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - ConfidenceMetricsEntries []*XPSVideoActionMetricsEntryConfidenceMetricsEntry `json:"confidenceMetricsEntries,omitempty"` - - // MeanAveragePrecision: The mean average precision. - MeanAveragePrecision float64 `json:"meanAveragePrecision,omitempty"` - - // PrecisionWindowLength: This VideoActionMetricsEntry is calculated - // based on this prediction window length. If the predicted action's - // timestamp is inside the time window whose center is the ground truth - // action's timestamp with this specific length, the prediction result - // is treated as a true positive. - PrecisionWindowLength string `json:"precisionWindowLength,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConfidenceMetricsEntries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceMetricsEntries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntry - var s1 struct { - MeanAveragePrecision gensupport.JSONFloat64 `json:"meanAveragePrecision"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MeanAveragePrecision = float64(s1.MeanAveragePrecision) - return nil -} - -// XPSVideoActionMetricsEntryConfidenceMetricsEntry: Metrics for a -// single confidence threshold. -type XPSVideoActionMetricsEntryConfidenceMetricsEntry struct { - // ConfidenceThreshold: Output only. The confidence threshold value used - // to compute the metrics. - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - - // F1Score: Output only. The harmonic mean of recall and precision. - F1Score float64 `json:"f1Score,omitempty"` - - // Precision: Output only. Precision for the given confidence threshold. - Precision float64 `json:"precision,omitempty"` - - // Recall: Output only. Recall for the given confidence threshold. - Recall float64 `json:"recall,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoActionMetricsEntryConfidenceMetricsEntry) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoActionMetricsEntryConfidenceMetricsEntry - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - F1Score gensupport.JSONFloat64 `json:"f1Score"` - Precision gensupport.JSONFloat64 `json:"precision"` - Recall gensupport.JSONFloat64 `json:"recall"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.F1Score = float64(s1.F1Score) - s.Precision = float64(s1.Precision) - s.Recall = float64(s1.Recall) - return nil -} - -// XPSVideoActionRecognitionEvaluationMetrics: Model evaluation metrics -// for video action recognition. -type XPSVideoActionRecognitionEvaluationMetrics struct { - // EvaluatedActionCount: Output only. The number of ground truth actions - // used to create this evaluation. - EvaluatedActionCount int64 `json:"evaluatedActionCount,omitempty"` - - // VideoActionMetricsEntries: Output only. The metric entries for - // precision window lengths: 1s,2s,3s,4s, 5s. - VideoActionMetricsEntries []*XPSVideoActionMetricsEntry `json:"videoActionMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EvaluatedActionCount") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EvaluatedActionCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoActionRecognitionTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoActionRecognitionTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoActionRecognitionTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoBatchPredictOperationMetadata struct { - // OutputExamples: All the partial batch prediction results that are - // completed at the moment. Output examples are sorted by completion - // time. The order will not be changed. Each output example should be - // the path of a single RecordIO file of AnnotatedExamples. - OutputExamples []string `json:"outputExamples,omitempty"` - - // ForceSendFields is a list of field names (e.g. "OutputExamples") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "OutputExamples") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoBatchPredictOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoBatchPredictOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoClassificationTrainResponse struct { - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ModelArtifactSpec") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ModelArtifactSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoClassificationTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoClassificationTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoExportModelSpec: Information of downloadable models that are -// pre-generated as part of training flow and will be persisted in -// AutoMl backend. Upon receiving ExportModel request from user, AutoMl -// backend can serve the pre-generated models to user if exists (by -// copying the files from internal path to user provided location), -// otherwise, AutoMl backend will call xPS ExportModel API to generate -// the model on the fly with the requesting format. -type XPSVideoExportModelSpec struct { - // ExportModelOutputConfig: Contains the model format and internal - // location of the model files to be exported/downloaded. Use the GCS - // bucket name which is provided via TrainRequest.gcs_bucket_name to - // store the model files. - ExportModelOutputConfig []*XPSExportModelOutputConfig `json:"exportModelOutputConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExportModelOutputConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExportModelOutputConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoExportModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoExportModelSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoModelArtifactSpec struct { - // ExportArtifact: The model binary files in different formats for model - // export. - ExportArtifact []*XPSModelArtifactItem `json:"exportArtifact,omitempty"` - - // ServingArtifact: The default model binary file used for serving (e.g. - // batch predict) via public Cloud AI Platform API. - ServingArtifact *XPSModelArtifactItem `json:"servingArtifact,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExportArtifact") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExportArtifact") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoModelArtifactSpec) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoModelArtifactSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVideoObjectTrackingEvaluationMetrics: Model evaluation metrics for -// ObjectTracking problems. Next tag: 10. -type XPSVideoObjectTrackingEvaluationMetrics struct { - // BoundingBoxMeanAveragePrecision: Output only. The single metric for - // bounding boxes evaluation: the mean_average_precision averaged over - // all bounding_box_metrics_entries. - BoundingBoxMeanAveragePrecision float64 `json:"boundingBoxMeanAveragePrecision,omitempty"` - - // BoundingBoxMetricsEntries: Output only. The bounding boxes match - // metrics for each Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - BoundingBoxMetricsEntries []*XPSBoundingBoxMetricsEntry `json:"boundingBoxMetricsEntries,omitempty"` - - // EvaluatedBoundingboxCount: The number of bounding boxes used for - // model evaluation. - EvaluatedBoundingboxCount int64 `json:"evaluatedBoundingboxCount,omitempty"` - - // EvaluatedFrameCount: The number of video frames used for model - // evaluation. - EvaluatedFrameCount int64 `json:"evaluatedFrameCount,omitempty"` - - // EvaluatedTrackCount: The number of tracks used for model evaluation. - EvaluatedTrackCount int64 `json:"evaluatedTrackCount,omitempty"` - - // TrackMeanAveragePrecision: Output only. The single metric for tracks - // accuracy evaluation: the mean_average_precision averaged over all - // track_metrics_entries. - TrackMeanAveragePrecision float64 `json:"trackMeanAveragePrecision,omitempty"` - - // TrackMeanBoundingBoxIou: Output only. The single metric for tracks - // bounding box iou evaluation: the mean_bounding_box_iou averaged over - // all track_metrics_entries. - TrackMeanBoundingBoxIou float64 `json:"trackMeanBoundingBoxIou,omitempty"` - - // TrackMeanMismatchRate: Output only. The single metric for tracking - // consistency evaluation: the mean_mismatch_rate averaged over all - // track_metrics_entries. - TrackMeanMismatchRate float64 `json:"trackMeanMismatchRate,omitempty"` - - // TrackMetricsEntries: Output only. The tracks match metrics for each - // Intersection-over-union threshold - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. - TrackMetricsEntries []*XPSTrackMetricsEntry `json:"trackMetricsEntries,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "BoundingBoxMeanAveragePrecision") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVideoObjectTrackingEvaluationMetrics) UnmarshalJSON(data []byte) error { - type NoMethod XPSVideoObjectTrackingEvaluationMetrics - var s1 struct { - BoundingBoxMeanAveragePrecision gensupport.JSONFloat64 `json:"boundingBoxMeanAveragePrecision"` - TrackMeanAveragePrecision gensupport.JSONFloat64 `json:"trackMeanAveragePrecision"` - TrackMeanBoundingBoxIou gensupport.JSONFloat64 `json:"trackMeanBoundingBoxIou"` - TrackMeanMismatchRate gensupport.JSONFloat64 `json:"trackMeanMismatchRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BoundingBoxMeanAveragePrecision = float64(s1.BoundingBoxMeanAveragePrecision) - s.TrackMeanAveragePrecision = float64(s1.TrackMeanAveragePrecision) - s.TrackMeanBoundingBoxIou = float64(s1.TrackMeanBoundingBoxIou) - s.TrackMeanMismatchRate = float64(s1.TrackMeanMismatchRate) - return nil -} - -type XPSVideoObjectTrackingTrainResponse struct { - // ExportModelSpec: Populated for AutoML request only. - ExportModelSpec *XPSVideoExportModelSpec `json:"exportModelSpec,omitempty"` - - // ModelArtifactSpec: ## The fields below are only populated under uCAIP - // request scope. - ModelArtifactSpec *XPSVideoModelArtifactSpec `json:"modelArtifactSpec,omitempty"` - - // TrainCostNodeSeconds: The actual train cost of creating this model, - // expressed in node seconds, i.e. 3,600 value in this field means 1 - // node hour. - TrainCostNodeSeconds int64 `json:"trainCostNodeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ExportModelSpec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExportModelSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoObjectTrackingTrainResponse) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoObjectTrackingTrainResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVideoTrainingOperationMetadata struct { - // TrainCostMilliNodeHour: This is an estimation of the node hours - // necessary for training a model, expressed in milli node hours (i.e. - // 1,000 value in this field means 1 node hour). A node hour represents - // the time a virtual machine spends running your training job. The cost - // of one node running for one hour is a node hour. - TrainCostMilliNodeHour int64 `json:"trainCostMilliNodeHour,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TrainCostMilliNodeHour") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TrainCostMilliNodeHour") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVideoTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVideoTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisionErrorAnalysisConfig: The vision model error analysis -// configuration. Next tag: 3 -type XPSVisionErrorAnalysisConfig struct { - // ExampleCount: The number of query examples in error analysis. - ExampleCount int64 `json:"exampleCount,omitempty"` - - // QueryType: The query type used in retrieval. The enum values are - // frozen in the foreseeable future. - // - // Possible values: - // "QUERY_TYPE_UNSPECIFIED" - Unspecified query type for model error - // analysis. - // "QUERY_TYPE_ALL_SIMILAR" - Query similar samples across all classes - // in the dataset. - // "QUERY_TYPE_SAME_CLASS_SIMILAR" - Query similar samples from the - // same class of the input sample. - // "QUERY_TYPE_SAME_CLASS_DISSIMILAR" - Query dissimilar samples from - // the same class of the input sample. - QueryType string `json:"queryType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionErrorAnalysisConfig) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionErrorAnalysisConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XPSVisionTrainingOperationMetadata struct { - // ExplanationUsage: Aggregated infra usage within certain time period, - // for billing report purpose if XAI is enable in training request. - ExplanationUsage *InfraUsage `json:"explanationUsage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplanationUsage") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExplanationUsage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisionTrainingOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisionTrainingOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSVisualization: Visualization configurations for image explanation. -type XPSVisualization struct { - // ClipPercentLowerbound: Excludes attributions below the specified - // percentile, from the highlighted areas. Defaults to 62. - ClipPercentLowerbound float64 `json:"clipPercentLowerbound,omitempty"` - - // ClipPercentUpperbound: Excludes attributions above the specified - // percentile from the highlighted areas. Using the - // clip_percent_upperbound and clip_percent_lowerbound together can be - // useful for filtering out noise and making it easier to see areas of - // strong attribution. Defaults to 99.9. - ClipPercentUpperbound float64 `json:"clipPercentUpperbound,omitempty"` - - // ColorMap: The color scheme used for the highlighted areas. Defaults - // to PINK_GREEN for Integrated Gradients attribution, which shows - // positive attributions in green and negative in pink. Defaults to - // VIRIDIS for XRAI attribution, which highlights the most influential - // regions in yellow and the least influential in blue. - // - // Possible values: - // "COLOR_MAP_UNSPECIFIED" - Should not be used. - // "PINK_GREEN" - Positive: green. Negative: pink. - // "VIRIDIS" - Viridis color map: A perceptually uniform color mapping - // which is easier to see by those with colorblindness and progresses - // from yellow to green to blue. Positive: yellow. Negative: blue. - // "RED" - Positive: red. Negative: red. - // "GREEN" - Positive: green. Negative: green. - // "RED_GREEN" - Positive: green. Negative: red. - // "PINK_WHITE_GREEN" - PiYG palette. - ColorMap string `json:"colorMap,omitempty"` - - // OverlayType: How the original image is displayed in the - // visualization. Adjusting the overlay can help increase visual clarity - // if the original image makes it difficult to view the visualization. - // Defaults to NONE. - // - // Possible values: - // "OVERLAY_TYPE_UNSPECIFIED" - Default value. This is the same as - // NONE. - // "NONE" - No overlay. - // "ORIGINAL" - The attributions are shown on top of the original - // image. - // "GRAYSCALE" - The attributions are shown on top of grayscaled - // version of the original image. - // "MASK_BLACK" - The attributions are used as a mask to reveal - // predictive parts of the image and hide the un-predictive parts. - OverlayType string `json:"overlayType,omitempty"` - - // Polarity: Whether to only highlight pixels with positive - // contributions, negative or both. Defaults to POSITIVE. - // - // Possible values: - // "POLARITY_UNSPECIFIED" - Default value. This is the same as - // POSITIVE. - // "POSITIVE" - Highlights the pixels/outlines that were most - // influential to the model's prediction. - // "NEGATIVE" - Setting polarity to negative highlights areas that - // does not lead to the models's current prediction. - // "BOTH" - Shows both positive and negative attributions. - Polarity string `json:"polarity,omitempty"` - - // Type: Type of the image visualization. Only applicable to Integrated - // Gradients attribution. OUTLINES shows regions of attribution, while - // PIXELS shows per-pixel attribution. Defaults to OUTLINES. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Should not be used. - // "PIXELS" - Shows which pixel contributed to the image prediction. - // "OUTLINES" - Shows which region contributed to the image prediction - // by outlining the region. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ClipPercentLowerbound") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClipPercentLowerbound") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *XPSVisualization) MarshalJSON() ([]byte, error) { - type NoMethod XPSVisualization - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *XPSVisualization) UnmarshalJSON(data []byte) error { - type NoMethod XPSVisualization - var s1 struct { - ClipPercentLowerbound gensupport.JSONFloat64 `json:"clipPercentLowerbound"` - ClipPercentUpperbound gensupport.JSONFloat64 `json:"clipPercentUpperbound"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ClipPercentLowerbound = float64(s1.ClipPercentLowerbound) - s.ClipPercentUpperbound = float64(s1.ClipPercentUpperbound) - return nil -} - -type XPSXpsOperationMetadata struct { - // ExampleCount: Optional. XPS server can opt to provide example count - // of the long running operation (e.g. training, data importing, batch - // prediction). - ExampleCount int64 `json:"exampleCount,omitempty,string"` - - // ReportingMetrics: Metrics for the operation. By the time the - // operation is terminated (whether succeeded or failed) as returned - // from XPS, AutoML BE assumes the metrics are finalized. AutoML BE - // transparently posts the metrics to Chemist if it's not empty, - // regardless of the response content or error type. If user is supposed - // to be charged in case of cancellation/error, this field should be - // set. In the case where the type of LRO doesn't require any billing, - // this field should be left unset. - ReportingMetrics *XPSReportingMetrics `json:"reportingMetrics,omitempty"` - - TablesTrainingOperationMetadata *XPSTablesTrainingOperationMetadata `json:"tablesTrainingOperationMetadata,omitempty"` - - VideoBatchPredictOperationMetadata *XPSVideoBatchPredictOperationMetadata `json:"videoBatchPredictOperationMetadata,omitempty"` - - VideoTrainingOperationMetadata *XPSVideoTrainingOperationMetadata `json:"videoTrainingOperationMetadata,omitempty"` - - VisionTrainingOperationMetadata *XPSVisionTrainingOperationMetadata `json:"visionTrainingOperationMetadata,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExampleCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExampleCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXpsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod XPSXpsOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XPSXraiAttribution: An explanation method that redistributes -// Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to -// this paper for more details: https://arxiv.org/abs/1906.02825 Only -// supports image Models (modality is IMAGE). -type XPSXraiAttribution struct { - // StepCount: The number of steps for approximating the path integral. A - // good value to start is 50 and gradually increase until the sum to - // diff property is met within the desired error range. Valid range of - // its value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StepCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "StepCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XPSXraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod XPSXraiAttribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // method id "language.documents.analyzeEntities": type DocumentsAnalyzeEntitiesCall struct { diff --git a/localservices/v1/localservices-api.json b/localservices/v1/localservices-api.json index 8c6496a2a47..9ddf4f9eb48 100644 --- a/localservices/v1/localservices-api.json +++ b/localservices/v1/localservices-api.json @@ -250,7 +250,7 @@ } } }, - "revision": "20220612", + "revision": "20240218", "rootUrl": "https://localservices.googleapis.com/", "schemas": { "GoogleAdsHomeservicesLocalservicesV1AccountReport": { @@ -428,6 +428,11 @@ "description": "Location of the associated account's home city.", "type": "string" }, + "googleAdsLeadId": { + "description": "Unique identifier of a Detailed Lead Report.", + "format": "int64", + "type": "string" + }, "leadCategory": { "description": "Lead category (e.g. hvac, plumber)", "type": "string" @@ -438,7 +443,7 @@ "type": "string" }, "leadId": { - "description": "Unique identifier of a Detailed Lead Report.", + "description": "Deprecated in favor of google_ads_lead_id. Unique identifier of a Detailed Lead Report.", "format": "int64", "type": "string" }, diff --git a/localservices/v1/localservices-gen.go b/localservices/v1/localservices-gen.go index d56b7005e4d..1ce9fffe87a 100644 --- a/localservices/v1/localservices-gen.go +++ b/localservices/v1/localservices-gen.go @@ -401,13 +401,17 @@ type GoogleAdsHomeservicesLocalservicesV1DetailedLeadReport struct { // Geo: Location of the associated account's home city. Geo string `json:"geo,omitempty"` + // GoogleAdsLeadId: Unique identifier of a Detailed Lead Report. + GoogleAdsLeadId int64 `json:"googleAdsLeadId,omitempty,string"` + // LeadCategory: Lead category (e.g. hvac, plumber) LeadCategory string `json:"leadCategory,omitempty"` // LeadCreationTimestamp: Timestamp of when the lead was created. LeadCreationTimestamp string `json:"leadCreationTimestamp,omitempty"` - // LeadId: Unique identifier of a Detailed Lead Report. + // LeadId: Deprecated in favor of google_ads_lead_id. Unique identifier + // of a Detailed Lead Report. LeadId int64 `json:"leadId,omitempty,string"` // LeadPrice: Price of the lead (available only after it has been diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 3fbae6b076f..5dc5b737f2d 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -7668,7 +7668,7 @@ } } }, - "revision": "20240112", + "revision": "20240207", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryDataset": { @@ -9694,6 +9694,20 @@ "description": "Describes the settings associated with a project, folder, organization, or billing account.", "id": "Settings", "properties": { + "analyticsMode": { + "description": "Optional. The default analytics mode of an org or folder which is inherited by all newly created child project buckets.", + "enum": [ + "ANALYTICS_MODE_UNSPECIFIED", + "ANALYTICS_ENABLED", + "ANALYTICS_DISABLED" + ], + "enumDescriptions": [ + "No default analytics mode defined at this resource level, it will inherit from the closest ancester which has a defined analytics mode. If there is no specified analytics mode across the resource hierarchy, analytics will be disabled by default.", + "By default, analytics will be enabled for all new project-level buckets unless explicitly specified otherwise at bucket creation time.", + "By default, analytics will be disabled for new project-level buckets unless explicitly specified otherwise at bucket creation time." + ], + "type": "string" + }, "defaultSinkConfig": { "$ref": "DefaultSinkConfig", "description": "Optional. Overrides the built-in configuration for _Default sink." diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index cbecaf0ee50..ae874279e35 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -4418,6 +4418,22 @@ func (s *SavedQuery) MarshalJSON() ([]byte, error) { // Settings: Describes the settings associated with a project, folder, // organization, or billing account. type Settings struct { + // AnalyticsMode: Optional. The default analytics mode of an org or + // folder which is inherited by all newly created child project buckets. + // + // Possible values: + // "ANALYTICS_MODE_UNSPECIFIED" - No default analytics mode defined at + // this resource level, it will inherit from the closest ancester which + // has a defined analytics mode. If there is no specified analytics mode + // across the resource hierarchy, analytics will be disabled by default. + // "ANALYTICS_ENABLED" - By default, analytics will be enabled for all + // new project-level buckets unless explicitly specified otherwise at + // bucket creation time. + // "ANALYTICS_DISABLED" - By default, analytics will be disabled for + // new project-level buckets unless explicitly specified otherwise at + // bucket creation time. + AnalyticsMode string `json:"analyticsMode,omitempty"` + // DefaultSinkConfig: Optional. Overrides the built-in configuration for // _Default sink. DefaultSinkConfig *DefaultSinkConfig `json:"defaultSinkConfig,omitempty"` @@ -4477,21 +4493,20 @@ type Settings struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DefaultSinkConfig") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalyticsMode") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultSinkConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AnalyticsMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 024e5417621..5f45fb6e8d6 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240131", + "revision": "20240207", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1051,6 +1051,8 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", "DROPPED_INSIDE_PSC_SERVICE_PRODUCER", "LOAD_BALANCER_HAS_NO_PROXY_SUBNET", @@ -1108,6 +1110,8 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", + "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", "Packet was dropped inside Private Service Connect service producer.", "Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 73ab13efca5..6f126a936e1 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1073,6 +1073,12 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the + // hybrid NEG proxy matches a non-dynamic route, but such a + // configuration is not supported. + // "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED" - The packet sent from + // the hybrid NEG proxy matches a dynamic route with a next hop in a + // different region, but such a configuration is not supported. // "CLOUD_RUN_REVISION_NOT_READY" - Packet sent from a Cloud Run // revision that is not ready. // "DROPPED_INSIDE_PSC_SERVICE_PRODUCER" - Packet was dropped inside diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 9172f2204af..5c5fd5e551d 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240131", + "revision": "20240207", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1056,6 +1056,8 @@ "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", "CLOUD_RUN_REVISION_NOT_READY", "DROPPED_INSIDE_PSC_SERVICE_PRODUCER", "LOAD_BALANCER_HAS_NO_PROXY_SUBNET", @@ -1113,6 +1115,8 @@ "The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", "The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", + "The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", + "The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", "Packet sent from a Cloud Run revision that is not ready.", "Packet was dropped inside Private Service Connect service producer.", "Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index fbfc0c9f2c5..cbfec585b5e 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -1076,6 +1076,12 @@ type DropInfo struct { // "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS" - The packet is // sent to the Private Service Connect backend (network endpoint group), // but the producer PSC forwarding rule has multiple ports specified. + // "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED" - The packet sent from the + // hybrid NEG proxy matches a non-dynamic route, but such a + // configuration is not supported. + // "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED" - The packet sent from + // the hybrid NEG proxy matches a dynamic route with a next hop in a + // different region, but such a configuration is not supported. // "CLOUD_RUN_REVISION_NOT_READY" - Packet sent from a Cloud Run // revision that is not ready. // "DROPPED_INSIDE_PSC_SERVICE_PRODUCER" - Packet was dropped inside diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index b9a1d8af529..645e37c22d4 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -3162,7 +3162,7 @@ } } }, - "revision": "20240130", + "revision": "20240208", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3468,7 +3468,7 @@ "type": "array" }, "billingProjectId": { - "description": "Optional. Project to bill on endpoint uptime usage.", + "description": "Required. Project to bill on endpoint uptime usage.", "type": "string" }, "createTime": { diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 09b400f3289..3d7397e75db 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -839,7 +839,7 @@ type FirewallEndpoint struct { // this list after traffic routing is fully configured. Associations []*FirewallEndpointAssociationReference `json:"associations,omitempty"` - // BillingProjectId: Optional. Project to bill on endpoint uptime usage. + // BillingProjectId: Required. Project to bill on endpoint uptime usage. BillingProjectId string `json:"billingProjectId,omitempty"` // CreateTime: Output only. Create time stamp diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index e34e66947c5..658b7fa2dd9 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -1252,6 +1252,370 @@ } } }, + "lbRouteExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbRouteExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbRouteExtensionId": { + "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/lbRouteExtensions", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbRouteExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "LbRouteExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbRouteExtension` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/lbRouteExtensions", + "response": { + "$ref": "ListLbRouteExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbRouteExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "lbTrafficExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbTrafficExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbTrafficExtensionId": { + "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/lbTrafficExtensions", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbTrafficExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "LbTrafficExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbTrafficExtension` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/lbTrafficExtensions", + "response": { + "$ref": "ListLbTrafficExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbTrafficExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "meshes": { "methods": { "create": { @@ -1758,14 +2122,258 @@ "parent": { "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceBindings", + "response": { + "$ref": "ListServiceBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceLbPolicies": { + "methods": { + "create": { + "description": "Creates a new ServiceLbPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", + "httpMethod": "POST", + "id": "networkservices.projects.locations.serviceLbPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "serviceLbPolicyId": { + "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceLbPolicies", + "request": { + "$ref": "ServiceLbPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.serviceLbPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceLbPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServiceLbPolicies in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", + "httpMethod": "GET", + "id": "networkservices.projects.locations.serviceLbPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of ServiceLbPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceLbPolicies", + "response": { + "$ref": "ListServiceLbPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServiceLbPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.serviceLbPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, - "path": "v1/{+parent}/serviceBindings", + "path": "v1/{+name}", + "request": { + "$ref": "ServiceLbPolicy" + }, "response": { - "$ref": "ListServiceBindingsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1773,9 +2381,9 @@ }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + "id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", "parameterOrder": [ "resource" ], @@ -1783,7 +2391,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" } @@ -1801,9 +2409,9 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + "id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", "parameterOrder": [ "resource" ], @@ -1811,7 +2419,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", "required": true, "type": "string" } @@ -2148,7 +2756,7 @@ } } }, - "revision": "20240125", + "revision": "20240207", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2378,8 +2986,97 @@ }, "type": "object" }, + "ExtensionChain": { + "description": "A single extension chain wrapper that contains the match conditions and extensions to execute.", + "id": "ExtensionChain", + "properties": { + "extensions": { + "description": "Required. A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for `LbTrafficExtension` resource. `LbRouteExtension` chains are limited to 1 extension per extension chain.", + "items": { + "$ref": "ExtensionChainExtension" + }, + "type": "array" + }, + "matchCondition": { + "$ref": "ExtensionChainMatchCondition", + "description": "Required. Conditions under which this chain is invoked for a request." + }, + "name": { + "description": "Required. The name for this extension chain. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainExtension": { + "description": "A single extension in the chain to execute for the matching request.", + "id": "ExtensionChainExtension", + "properties": { + "authority": { + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "type": "string" + }, + "failOpen": { + "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE`: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset. Default is `FALSE`.", + "type": "boolean" + }, + "forwardHeaders": { + "description": "Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + }, + "service": { + "description": "Required. The reference to the service that runs the extension. Currently only Callout extensions are supported here. To configure a Callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", + "type": "string" + }, + "supportedEvents": { + "description": "Optional. A set of events during request or response processing for which this extension is called. This field is required for the `LbTrafficExtension` resource. It's not relevant for the `LbRouteExtension` resource.", + "items": { + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "REQUEST_HEADERS", + "REQUEST_BODY", + "RESPONSE_HEADERS", + "RESPONSE_BODY" + ], + "enumDescriptions": [ + "Unspecified value. Do not use.", + "If included in `supported_events`, the extension is called when the HTTP request headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP request body arrives.", + "If included in `supported_events`, the extension is called when the HTTP response headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP response body arrives." + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainMatchCondition": { + "description": "Conditions under which this chain is invoked for a request.", + "id": "ExtensionChainMatchCondition", + "properties": { + "celExpression": { + "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", + "type": "string" + } + }, + "type": "object" + }, "Gateway": { - "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 30", + "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", "id": "Gateway", "properties": { "addresses": { @@ -3358,6 +4055,130 @@ }, "type": "object" }, + "LbRouteExtension": { + "description": "`LbRouteExtension` is a resource that lets you control where traffic is routed to for a given request.", + "id": "LbRouteExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LbRouteExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "LbTrafficExtension": { + "description": "`LbTrafficExtension` is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.", + "id": "LbTrafficExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LBTrafficExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListEndpointPoliciesResponse": { "description": "Response returned by the ListEndpointPolicies method.", "id": "ListEndpointPoliciesResponse", @@ -3437,6 +4258,56 @@ }, "type": "object" }, + "ListLbRouteExtensionsResponse": { + "description": "Message for response to listing `LbRouteExtension` resources.", + "id": "ListLbRouteExtensionsResponse", + "properties": { + "lbRouteExtensions": { + "description": "The list of `LbRouteExtension` resources.", + "items": { + "$ref": "LbRouteExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLbTrafficExtensionsResponse": { + "description": "Message for response to listing `LbTrafficExtension` resources.", + "id": "ListLbTrafficExtensionsResponse", + "properties": { + "lbTrafficExtensions": { + "description": "The list of `LbTrafficExtension` resources.", + "items": { + "$ref": "LbTrafficExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -3509,6 +4380,24 @@ }, "type": "object" }, + "ListServiceLbPoliciesResponse": { + "description": "Response returned by the ListServiceLbPolicies method.", + "id": "ListServiceLbPoliciesResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "serviceLbPolicies": { + "description": "List of ServiceLbPolicy resources.", + "items": { + "$ref": "ServiceLbPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, "ListTcpRoutesResponse": { "description": "Response returned by the ListTcpRoutes method.", "id": "ListTcpRoutesResponse", @@ -3790,6 +4679,89 @@ }, "type": "object" }, + "ServiceLbPolicy": { + "description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", + "id": "ServiceLbPolicy", + "properties": { + "autoCapacityDrain": { + "$ref": "ServiceLbPolicyAutoCapacityDrain", + "description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." + }, + "createTime": { + "description": "Output only. The timestamp when this resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A free-text description of the resource. Max length 1024 characters.", + "type": "string" + }, + "failoverConfig": { + "$ref": "ServiceLbPolicyFailoverConfig", + "description": "Optional. Configuration related to health based failover." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", + "type": "object" + }, + "loadBalancingAlgorithm": { + "description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", + "enum": [ + "LOAD_BALANCING_ALGORITHM_UNSPECIFIED", + "SPRAY_TO_WORLD", + "SPRAY_TO_REGION", + "WATERFALL_BY_REGION", + "WATERFALL_BY_ZONE" + ], + "enumDescriptions": [ + "The type of the loadbalancing algorithm is unspecified.", + "Balance traffic across all backends across the world proportionally based on capacity.", + "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", + "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", + "Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." + ], + "type": "string" + }, + "name": { + "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when this resource was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceLbPolicyAutoCapacityDrain": { + "description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", + "id": "ServiceLbPolicyAutoCapacityDrain", + "properties": { + "enable": { + "description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", + "type": "boolean" + } + }, + "type": "object" + }, + "ServiceLbPolicyFailoverConfig": { + "description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", + "id": "ServiceLbPolicyFailoverConfig", + "properties": { + "failoverHealthThreshold": { + "description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index a239524fbef..d8c3a407acb 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -176,9 +176,12 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Gateways = NewProjectsLocationsGatewaysService(s) rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) + rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s) + rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s) rs.Meshes = NewProjectsLocationsMeshesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) + rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s) rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s) rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s) return rs @@ -201,12 +204,18 @@ type ProjectsLocationsService struct { HttpRoutes *ProjectsLocationsHttpRoutesService + LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService + + LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService + Meshes *ProjectsLocationsMeshesService Operations *ProjectsLocationsOperationsService ServiceBindings *ProjectsLocationsServiceBindingsService + ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService + TcpRoutes *ProjectsLocationsTcpRoutesService TlsRoutes *ProjectsLocationsTlsRoutesService @@ -275,6 +284,24 @@ type ProjectsLocationsHttpRoutesService struct { s *Service } +func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService { + rs := &ProjectsLocationsLbRouteExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbRouteExtensionsService struct { + s *Service +} + +func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService { + rs := &ProjectsLocationsLbTrafficExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbTrafficExtensionsService struct { + s *Service +} + func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService { rs := &ProjectsLocationsMeshesService{s: s} return rs @@ -302,6 +329,15 @@ type ProjectsLocationsServiceBindingsService struct { s *Service } +func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService { + rs := &ProjectsLocationsServiceLbPoliciesService{s: s} + return rs +} + +type ProjectsLocationsServiceLbPoliciesService struct { + s *Service +} + func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService { rs := &ProjectsLocationsTcpRoutesService{s: s} return rs @@ -825,11 +861,175 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExtensionChain: A single extension chain wrapper that contains the +// match conditions and extensions to execute. +type ExtensionChain struct { + // Extensions: Required. A set of extensions to execute for the matching + // request. At least one extension is required. Up to 3 extensions can + // be defined for each extension chain for `LbTrafficExtension` + // resource. `LbRouteExtension` chains are limited to 1 extension per + // extension chain. + Extensions []*ExtensionChainExtension `json:"extensions,omitempty"` + + // MatchCondition: Required. Conditions under which this chain is + // invoked for a request. + MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"` + + // Name: Required. The name for this extension chain. The name is logged + // as part of the HTTP request logs. The name must conform with + // RFC-1034, is restricted to lower-cased letters, numbers and hyphens, + // and can have a maximum length of 63 characters. Additionally, the + // first character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Extensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Extensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChain) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainExtension: A single extension in the chain to execute +// for the matching request. +type ExtensionChainExtension struct { + // Authority: Optional. The `:authority` header in the gRPC request sent + // from Envoy to the extension service. + Authority string `json:"authority,omitempty"` + + // FailOpen: Optional. Determines how the proxy behaves if the call to + // the extension fails or times out. When set to `TRUE`, request or + // response processing continues without error. Any subsequent + // extensions in the extension chain are also executed. When set to + // `FALSE`: * If response headers have not been delivered to the + // downstream client, a generic 500 error is returned to the client. The + // error response can be tailored by configuring a custom error response + // in the load balancer. * If response headers have been delivered, then + // the HTTP stream to the downstream client is reset. Default is + // `FALSE`. + FailOpen bool `json:"failOpen,omitempty"` + + // ForwardHeaders: Optional. List of the HTTP headers to forward to the + // extension (from the client or backend). If omitted, all headers are + // sent. Each element is a string indicating the header name. + ForwardHeaders []string `json:"forwardHeaders,omitempty"` + + // Name: Required. The name for this extension. The name is logged as + // part of the HTTP request logs. The name must conform with RFC-1034, + // is restricted to lower-cased letters, numbers and hyphens, and can + // have a maximum length of 63 characters. Additionally, the first + // character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // Service: Required. The reference to the service that runs the + // extension. Currently only Callout extensions are supported here. To + // configure a Callout extension, `service` must be a fully-qualified + // reference to a backend service + // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + // in the format: + // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{reg + // ion}/backendServices/{backendService}` or + // `https://www.googleapis.com/compute/v1/projects/{project}/global/backe + // ndServices/{backendService}`. + Service string `json:"service,omitempty"` + + // SupportedEvents: Optional. A set of events during request or response + // processing for which this extension is called. This field is required + // for the `LbTrafficExtension` resource. It's not relevant for the + // `LbRouteExtension` resource. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Unspecified value. Do not use. + // "REQUEST_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP request headers arrive. + // "REQUEST_BODY" - If included in `supported_events`, the extension + // is called when the HTTP request body arrives. + // "RESPONSE_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP response headers arrive. + // "RESPONSE_BODY" - If included in `supported_events`, the extension + // is called when the HTTP response body arrives. + SupportedEvents []string `json:"supportedEvents,omitempty"` + + // Timeout: Required. Specifies the timeout for each individual message + // on the stream. The timeout must be between 10-1000 milliseconds. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Authority") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Authority") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChainExtension) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainMatchCondition: Conditions under which this chain is +// invoked for a request. +type ExtensionChainMatchCondition struct { + // CelExpression: Required. A Common Expression Language (CEL) + // expression that is used to match requests for which the extension + // chain is executed. For more information, see CEL matcher language + // reference + // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + CelExpression string `json:"celExpression,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CelExpression") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CelExpression") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainMatchCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Gateway: Gateway represents the configuration for a proxy, typically // a load balancer. It captures the ip:port over which the services are // exposed by the proxy, along with any policy configurations. Routes // have reference to to Gateways to dictate how requests should be -// routed by this Gateway. Next id: 30 +// routed by this Gateway. Next id: 32 type Gateway struct { // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the // Gateway will receive the traffic. When no address is provided, an IP @@ -2468,6 +2668,166 @@ func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LbRouteExtension: `LbRouteExtension` is a resource that lets you +// control where traffic is routed to for a given request. +type LbRouteExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attached to. At least one + // forwarding rule is required. There can be only one `LbRouteExtension` + // resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbRouteExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For + // more information, refer to Choosing a load balancer + // (https://cloud.google.com/load-balancing/docs/backend-service). + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Identifier. Name of the `LbRouteExtension` resource + // in the following format: + // `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_e + // xtension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LbRouteExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbRouteExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LbTrafficExtension: `LbTrafficExtension` is a resource that lets the +// extension service modify the headers and payloads of both requests +// and responses without impacting the choice of backend services or any +// other security policies associated with the backend service. +type LbTrafficExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attached to. At least one + // forwarding rule is required. There can be only one + // `LBTrafficExtension` resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbTrafficExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For + // more information, refer to Choosing a load balancer + // (https://cloud.google.com/load-balancing/docs/backend-service). + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Identifier. Name of the `LbTrafficExtension` resource + // in the following format: + // `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traff + // ic_extension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LbTrafficExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbTrafficExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListEndpointPoliciesResponse: Response returned by the // ListEndpointPolicies method. type ListEndpointPoliciesResponse struct { @@ -2627,6 +2987,88 @@ func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListLbRouteExtensionsResponse: Message for response to listing +// `LbRouteExtension` resources. +type ListLbRouteExtensionsResponse struct { + // LbRouteExtensions: The list of `LbRouteExtension` resources. + LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"` + + // NextPageToken: A token identifying a page of results that the server + // returns. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LbRouteExtensions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LbRouteExtensions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbRouteExtensionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLbTrafficExtensionsResponse: Message for response to listing +// `LbTrafficExtension` resources. +type ListLbTrafficExtensionsResponse struct { + // LbTrafficExtensions: The list of `LbTrafficExtension` resources. + LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"` + + // NextPageToken: A token identifying a page of results that the server + // returns. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LbTrafficExtensions") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LbTrafficExtensions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbTrafficExtensionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -2778,16 +3220,17 @@ func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. -type ListTcpRoutesResponse struct { +// ListServiceLbPoliciesResponse: Response returned by the +// ListServiceLbPolicies method. +type ListServiceLbPoliciesResponse struct { // NextPageToken: If there might be more results than those appearing in // this response, then `next_page_token` is included. To get the next // set of results, call this method again using the value of // `next_page_token` as `page_token`. NextPageToken string `json:"nextPageToken,omitempty"` - // TcpRoutes: List of TcpRoute resources. - TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` + // ServiceLbPolicies: List of ServiceLbPolicy resources. + ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -2810,22 +3253,22 @@ type ListTcpRoutesResponse struct { NullFields []string `json:"-"` } -func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTcpRoutesResponse +func (s *ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceLbPoliciesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. -type ListTlsRoutesResponse struct { +// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. +type ListTcpRoutesResponse struct { // NextPageToken: If there might be more results than those appearing in // this response, then `next_page_token` is included. To get the next // set of results, call this method again using the value of // `next_page_token` as `page_token`. NextPageToken string `json:"nextPageToken,omitempty"` - // TlsRoutes: List of TlsRoute resources. - TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` + // TcpRoutes: List of TcpRoute resources. + TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -2848,23 +3291,61 @@ type ListTlsRoutesResponse struct { NullFields []string `json:"-"` } -func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTlsRoutesResponse +func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTcpRoutesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents a Google Cloud location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: +// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. +type ListTlsRoutesResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TlsRoutes: List of TlsRoute resources. + TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTlsRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: // "us-east1". LocationId string `json:"locationId,omitempty"` @@ -3263,6 +3744,159 @@ func (s *ServiceBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceLbPolicy: ServiceLbPolicy holds global load balancing and +// traffic distribution configuration that can be applied to a +// BackendService. +type ServiceLbPolicy struct { + // AutoCapacityDrain: Optional. Configuration to automatically move + // traffic away for unhealthy IG/NEG for the associated Backend Service. + AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"` + + // CreateTime: Output only. The timestamp when this resource was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A free-text description of the resource. Max + // length 1024 characters. + Description string `json:"description,omitempty"` + + // FailoverConfig: Optional. Configuration related to health based + // failover. + FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"` + + // Labels: Optional. Set of label tags associated with the + // ServiceLbPolicy resource. + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingAlgorithm: Optional. The type of load balancing + // algorithm to be used. The default behavior is WATERFALL_BY_REGION. + // + // Possible values: + // "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the + // loadbalancing algorithm is unspecified. + // "SPRAY_TO_WORLD" - Balance traffic across all backends across the + // world proportionally based on capacity. + // "SPRAY_TO_REGION" - Direct traffic to the nearest region with + // endpoints and capacity before spilling over to other regions and + // spread the traffic from each client to all the MIGs/NEGs in a region. + // "WATERFALL_BY_REGION" - Direct traffic to the nearest region with + // endpoints and capacity before spilling over to other regions. All + // MIGs/NEGs within a region are evenly loaded but each client might not + // spread the traffic to all the MIGs/NEGs in the region. + // "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone + // closest to the client, before spilling over to other zones. + LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"` + + // Name: Required. Name of the ServiceLbPolicy resource. It matches + // pattern + // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb + // _policy_name}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when this resource was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AutoCapacityDrain") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AutoCapacityDrain") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy +// IG/NEG should be considered for global load balancing and traffic +// routing. +type ServiceLbPolicyAutoCapacityDrain struct { + // Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set + // as drained. - An IG/NEG is considered unhealthy if less than 25% of + // the instances/endpoints in the IG/NEG are healthy. - This option will + // never result in draining more than 50% of the configured IGs/NEGs for + // the Backend Service. + Enable bool `json:"enable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicyAutoCapacityDrain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceLbPolicyFailoverConfig: Option to specify health based +// failover behavior. This is not related to Network load balancer +// FailoverPolicy. +type ServiceLbPolicyFailoverConfig struct { + // FailoverHealthThreshold: Optional. The percentage threshold that a + // load balancer will begin to send traffic to failover backends. If the + // percentage of endpoints in a MIG/NEG is smaller than this value, + // traffic would be sent to failover backends if possible. This field + // should be set to a value between 1 and 99. The default value is 50 + // for Global external HTTP(S) load balancer (classic) and Proxyless + // service mesh, and 70 for others. + FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FailoverHealthThreshold") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailoverHealthThreshold") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceLbPolicyFailoverConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -9769,39 +10403,58 @@ func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.meshes.create": +// method id "networkservices.projects.locations.lbRouteExtensions.create": -type ProjectsLocationsMeshesCreateCall struct { - s *Service - parent string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbRouteExtensionsCreateCall struct { + s *Service + parent string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Mesh in a given project and location. +// Create: Creates a new `LbRouteExtension` resource in a given project +// and location. // -// - parent: The parent resource of the Mesh. Must be in the format -// `projects/*/locations/global`. -func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { - c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource of the `LbRouteExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall { + c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.mesh = mesh + c.lbrouteextension = lbrouteextension return c } -// MeshId sets the optional parameter "meshId": Required. Short name of -// the Mesh resource to be created. -func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("meshId", meshId) +// LbRouteExtensionId sets the optional parameter "lbRouteExtensionId": +// Required. User-provided ID of the `LbRouteExtension` resource to be +// created. +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9809,21 +10462,21 @@ func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *Projec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9831,14 +10484,14 @@ func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9851,14 +10504,14 @@ func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.create" call. +// Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9889,30 +10542,35 @@ func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates a new Mesh in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.create", + // "id": "networkservices.projects.locations.lbRouteExtensions.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "meshId": { - // "description": "Required. Short name of the Mesh resource to be created.", + // "lbRouteExtensionId": { + // "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", + // "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/meshes", + // "path": "v1/{+parent}/lbRouteExtensions", // "request": { - // "$ref": "Mesh" + // "$ref": "LbRouteExtension" // }, // "response": { // "$ref": "Operation" @@ -9924,9 +10582,9 @@ func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*O } -// method id "networkservices.projects.locations.meshes.delete": +// method id "networkservices.projects.locations.lbRouteExtensions.delete": -type ProjectsLocationsMeshesDeleteCall struct { +type ProjectsLocationsLbRouteExtensionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9934,20 +10592,39 @@ type ProjectsLocationsMeshesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Mesh. +// Delete: Deletes the specified `LbRouteExtension` resource. // -// - name: A name of the Mesh to delete. Must be in the format -// `projects/*/locations/global/meshes/*`. -func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { - c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the `LbRouteExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9955,21 +10632,21 @@ func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *Projec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9992,14 +10669,14 @@ func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.delete" call. +// Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10030,20 +10707,25 @@ func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "description": "Deletes the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.meshes.delete", + // "id": "networkservices.projects.locations.lbRouteExtensions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", + // "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", @@ -10057,9 +10739,9 @@ func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*O } -// method id "networkservices.projects.locations.meshes.get": +// method id "networkservices.projects.locations.lbRouteExtensions.get": -type ProjectsLocationsMeshesGetCall struct { +type ProjectsLocationsLbRouteExtensionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10068,12 +10750,14 @@ type ProjectsLocationsMeshesGetCall struct { header_ http.Header } -// Get: Gets details of a single Mesh. +// Get: Gets details of the specified `LbRouteExtension` resource. // -// - name: A name of the Mesh to get. Must be in the format -// `projects/*/locations/global/meshes/*`. -func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { - c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the `LbRouteExtension` resource to get. Must be in +// the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall { + c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10081,7 +10765,7 @@ func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMesh // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10091,7 +10775,7 @@ func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10099,21 +10783,21 @@ func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *Projects // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10139,14 +10823,14 @@ func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.get" call. -// Exactly one of *Mesh or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Mesh.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call. +// Exactly one of *LbRouteExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbRouteExtension.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10165,7 +10849,7 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Mesh{ + ret := &LbRouteExtension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10177,25 +10861,25 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh } return ret, nil // { - // "description": "Gets details of a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "description": "Gets details of the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.get", + // "id": "networkservices.projects.locations.lbRouteExtensions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", + // "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Mesh" + // "$ref": "LbRouteExtension" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10204,53 +10888,61 @@ func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh } -// method id "networkservices.projects.locations.meshes.getIamPolicy": +// method id "networkservices.projects.locations.lbRouteExtensions.list": -type ProjectsLocationsMeshesGetIamPolicyCall struct { +type ProjectsLocationsLbRouteExtensionsListCall struct { s *Service - resource string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// List: Lists `LbRouteExtension` resources in a given project and +// location. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall { - c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The project and location from which the `LbRouteExtension` +// resources are listed, specified in the following format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall { + c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10260,7 +10952,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -10268,21 +10960,21 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10295,7 +10987,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10303,19 +10995,19 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call. +// Exactly one of *ListLbRouteExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbRouteExtensionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10334,7 +11026,7 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListLbRouteExtensionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10346,31 +11038,46 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", + // "description": "Lists `LbRouteExtension` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.getIamPolicy", + // "id": "networkservices.projects.locations.lbRouteExtensions.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", // "format": "int32", // "location": "query", // "type": "integer" // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/lbRouteExtensions", // "response": { - // "$ref": "Policy" + // "$ref": "ListLbRouteExtensionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10379,112 +11086,141 @@ func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.meshes.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsMeshesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.lbRouteExtensions.patch": + +type ProjectsLocationsLbRouteExtensionsPatchCall struct { + s *Service + name string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Meshes in a given project and location. +// Patch: Updates the parameters of the specified `LbRouteExtension` +// resource. // -// - parent: The project and location from which the Meshes should be -// listed, specified in the format `projects/*/locations/global`. -func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { - c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Identifier. Name of the `LbRouteExtension` resource in the +// following format: +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall { + c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.lbrouteextension = lbrouteextension return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Meshes to return per call. -func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListMeshesResponse` Indicates that this is a -// continuation of a prior `ListMeshes` call, and that the system should -// return the next page of data. -func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbRouteExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesListCall) Header() http.Header { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.list" call. -// Exactly one of *ListMeshesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListMeshesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) { +// Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10503,7 +11239,7 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMeshesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10515,36 +11251,39 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists Meshes in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.meshes.list", + // "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbRouteExtensions.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Meshes to return per call.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "name": { + // "description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + // "required": true, + // "type": "string" // }, - // "pageToken": { - // "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/meshes", + // "path": "v1/{+name}", + // "request": { + // "$ref": "LbRouteExtension" + // }, // "response": { - // "$ref": "ListMeshesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10553,64 +11292,58 @@ func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*Lis } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkservices.projects.locations.meshes.patch": +// method id "networkservices.projects.locations.lbTrafficExtensions.create": -type ProjectsLocationsMeshesPatchCall struct { - s *Service - name string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsCreateCall struct { + s *Service + parent string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Mesh. +// Create: Creates a new `LbTrafficExtension` resource in a given +// project and location. // -// - name: Name of the Mesh resource. It matches pattern -// `projects/*/locations/global/meshes/`. -func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { - c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.mesh = mesh +// - parent: The parent resource of the `LbTrafficExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lbtrafficextension = lbtrafficextension return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the Mesh resource by -// the update. The fields specified in the update_mask are relative to -// the resource, not the full request. A field will be overwritten if it -// is in the mask. If the user does not provide a mask then all fields -// will be overwritten. -func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// LbTrafficExtensionId sets the optional parameter +// "lbTrafficExtensionId": Required. User-provided ID of the +// `LbTrafficExtension` resource to be created. +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10618,21 +11351,21 @@ func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *Project // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10640,34 +11373,34 @@ func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.patch" call. +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10698,31 +11431,35 @@ func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the parameters of a single Mesh.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - // "httpMethod": "PATCH", - // "id": "networkservices.projects.locations.meshes.patch", + // "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.lbTrafficExtensions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", + // "lbTrafficExtensionId": { + // "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/lbTrafficExtensions", // "request": { - // "$ref": "Mesh" + // "$ref": "LbTrafficExtension" // }, // "response": { // "$ref": "Operation" @@ -10734,36 +11471,49 @@ func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "networkservices.projects.locations.meshes.setIamPolicy": +// method id "networkservices.projects.locations.lbTrafficExtensions.delete": -type ProjectsLocationsMeshesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Delete: Deletes the specified `LbTrafficExtension` resource. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall { - c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the `LbTrafficExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10771,21 +11521,21 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10793,34 +11543,29 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10839,7 +11584,7 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10851,28 +11596,30 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.setIamPolicy", + // "description": "Deletes the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.lbTrafficExtensions.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10881,96 +11628,98 @@ func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.meshes.testIamPermissions": +// method id "networkservices.projects.locations.lbTrafficExtensions.get": -type ProjectsLocationsMeshesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets details of the specified `LbTrafficExtension` resource. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall { - c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: A name of the `LbTrafficExtension` resource to get. Must be +// in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall { + c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call. +// Exactly one of *LbTrafficExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbTrafficExtension.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10989,7 +11738,7 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &LbTrafficExtension{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11001,28 +11750,25 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.meshes.testIamPermissions", + // "description": "Gets details of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "LbTrafficExtension" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11031,97 +11777,126 @@ func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.Cal } -// method id "networkservices.projects.locations.operations.cancel": +// method id "networkservices.projects.locations.lbTrafficExtensions.list": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLbTrafficExtensionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// List: Lists `LbTrafficExtension` resources in a given project and +// location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The project and location from which the +// `LbTrafficExtension` resources are listed, specified in the +// following format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall { + c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call. +// Exactly one of *ListLbTrafficExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbTrafficExtensionsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11140,7 +11915,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListLbTrafficExtensionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11152,28 +11927,46 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.operations.cancel", + // "description": "Lists `LbTrafficExtension` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, + // "path": "v1/{+parent}/lbTrafficExtensions", // "response": { - // "$ref": "Empty" + // "$ref": "ListLbTrafficExtensionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11182,32 +11975,84 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.lbTrafficExtensions.patch": + +type ProjectsLocationsLbTrafficExtensionsPatchCall struct { + s *Service + name string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Patch: Updates the parameters of the specified `LbTrafficExtension` +// resource. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the `LbTrafficExtension` resource in the +// following format: +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.lbtrafficextension = lbtrafficextension + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbTrafficExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11215,21 +12060,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11237,11 +12082,16 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -11252,14 +12102,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11278,7 +12128,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11290,25 +12140,39 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.operations.delete", + // "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbTrafficExtensions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "LbTrafficExtension" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11317,97 +12181,2801 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.get": +// method id "networkservices.projects.locations.meshes.create": -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMeshesCreateCall struct { + s *Service + parent string + mesh *Mesh + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates a new Mesh in a given project and location. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource of the Mesh. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { + c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.mesh = mesh + return c +} + +// MeshId sets the optional parameter "meshId": Required. Short name of +// the Mesh resource to be created. +func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { + c.urlParams_.Set("meshId", meshId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Mesh in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "meshId": { + // "description": "Required. Short name of the Mesh resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/meshes", + // "request": { + // "$ref": "Mesh" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.delete": + +type ProjectsLocationsMeshesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Mesh. +// +// - name: A name of the Mesh to delete. Must be in the format +// `projects/*/locations/global/meshes/*`. +func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { + c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.meshes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.get": + +type ProjectsLocationsMeshesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Mesh. +// +// - name: A name of the Mesh to get. Must be in the format +// `projects/*/locations/global/meshes/*`. +func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { + c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.get" call. +// Exactly one of *Mesh or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Mesh.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Mesh{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Mesh" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.getIamPolicy": + +type ProjectsLocationsMeshesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall { + c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.list": + +type ProjectsLocationsMeshesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Meshes in a given project and location. +// +// - parent: The project and location from which the Meshes should be +// listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { + c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Meshes to return per call. +func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListMeshesResponse` Indicates that this is a +// continuation of a prior `ListMeshes` call, and that the system should +// return the next page of data. +func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.list" call. +// Exactly one of *ListMeshesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListMeshesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListMeshesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Meshes in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.meshes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Meshes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/meshes", + // "response": { + // "$ref": "ListMeshesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.meshes.patch": + +type ProjectsLocationsMeshesPatchCall struct { + s *Service + name string + mesh *Mesh + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Mesh. +// +// - name: Name of the Mesh resource. It matches pattern +// `projects/*/locations/global/meshes/`. +func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { + c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.mesh = mesh + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Mesh resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single Mesh.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.meshes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Mesh" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.setIamPolicy": + +type ProjectsLocationsMeshesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall { + c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.testIamPermissions": + +type ProjectsLocationsMeshesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall { + c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.serviceBindings.create": + +type ProjectsLocationsServiceBindingsCreateCall struct { + s *Service + parent string + servicebinding *ServiceBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ServiceBinding in a given project and location. +// +// - parent: The parent resource of the ServiceBinding. Must be in the +// format `projects/*/locations/global`. +func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { + c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.servicebinding = servicebinding + return c +} + +// ServiceBindingId sets the optional parameter "serviceBindingId": +// Required. Short name of the ServiceBinding resource to be created. +func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { + c.urlParams_.Set("serviceBindingId", serviceBindingId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new ServiceBinding in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "serviceBindingId": { + // "description": "Required. Short name of the ServiceBinding resource to be created.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceBindings", + // "request": { + // "$ref": "ServiceBinding" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.delete": + +type ProjectsLocationsServiceBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServiceBinding. +// +// - name: A name of the ServiceBinding to delete. Must be in the format +// `projects/*/locations/global/serviceBindings/*`. +func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { + c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single ServiceBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.serviceBindings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.get": + +type ProjectsLocationsServiceBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServiceBinding. +// +// - name: A name of the ServiceBinding to get. Must be in the format +// `projects/*/locations/global/serviceBindings/*`. +func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { + c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.get" call. +// Exactly one of *ServiceBinding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServiceBinding.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServiceBinding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single ServiceBinding.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServiceBinding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.getIamPolicy": + +type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceBindings.list": + +type ProjectsLocationsServiceBindingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServiceBinding in a given project and location. +// +// - parent: The project and location from which the ServiceBindings +// should be listed, specified in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { + c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// ServiceBindings to return per call. +func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListServiceBindingsResponse` Indicates that this is a +// continuation of a prior `ListRouters` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceBindings.list" call. +// Exactly one of *ListServiceBindingsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListServiceBindingsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServiceBindingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists ServiceBinding in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of ServiceBindings to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceBindings", + // "response": { + // "$ref": "ListServiceBindingsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": + +type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall { + c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11426,7 +14994,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11438,25 +15006,28 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.get", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11465,118 +15036,96 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkservices.projects.locations.operations.list": +// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { + c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11595,7 +15144,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11607,41 +15156,28 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.list", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11650,60 +15186,43 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "networkservices.projects.locations.serviceBindings.create": +// method id "networkservices.projects.locations.serviceLbPolicies.create": -type ProjectsLocationsServiceBindingsCreateCall struct { - s *Service - parent string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceLbPoliciesCreateCall struct { + s *Service + parent string + servicelbpolicy *ServiceLbPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ServiceBinding in a given project and location. +// Create: Creates a new ServiceLbPolicy in a given project and +// location. // -// - parent: The parent resource of the ServiceBinding. Must be in the -// format `projects/*/locations/global`. -func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { - c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource of the ServiceLbPolicy. Must be in the +// format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall { + c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.servicebinding = servicebinding + c.servicelbpolicy = servicelbpolicy return c } -// ServiceBindingId sets the optional parameter "serviceBindingId": -// Required. Short name of the ServiceBinding resource to be created. -func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("serviceBindingId", serviceBindingId) +// ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": +// Required. Short name of the ServiceLbPolicy resource to be created. +// E.g. for resource name +// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb +// _policy_name}`. the id is value of {service_lb_policy_name} +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall { + c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11711,21 +15230,21 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11733,14 +15252,14 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11753,14 +15272,14 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.create" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11791,30 +15310,30 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates a new ServiceBinding in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "description": "Creates a new ServiceLbPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.create", + // "id": "networkservices.projects.locations.serviceLbPolicies.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + // "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "serviceBindingId": { - // "description": "Required. Short name of the ServiceBinding resource to be created.", + // "serviceLbPolicyId": { + // "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/serviceBindings", + // "path": "v1/{+parent}/serviceLbPolicies", // "request": { - // "$ref": "ServiceBinding" + // "$ref": "ServiceLbPolicy" // }, // "response": { // "$ref": "Operation" @@ -11826,9 +15345,9 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.delete": +// method id "networkservices.projects.locations.serviceLbPolicies.delete": -type ProjectsLocationsServiceBindingsDeleteCall struct { +type ProjectsLocationsServiceLbPoliciesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11836,12 +15355,13 @@ type ProjectsLocationsServiceBindingsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single ServiceBinding. +// Delete: Deletes a single ServiceLbPolicy. // -// - name: A name of the ServiceBinding to delete. Must be in the format -// `projects/*/locations/global/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { - c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the ServiceLbPolicy to delete. Must be in the +// format +// `projects/{project}/locations/{location}/serviceLbPolicies/*`. +func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall { + c := &ProjectsLocationsServiceLbPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11849,7 +15369,7 @@ func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11857,21 +15377,21 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11894,14 +15414,14 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11932,18 +15452,18 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a single ServiceBinding.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "description": "Deletes a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.serviceBindings.delete", + // "id": "networkservices.projects.locations.serviceLbPolicies.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -11959,9 +15479,9 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.get": +// method id "networkservices.projects.locations.serviceLbPolicies.get": -type ProjectsLocationsServiceBindingsGetCall struct { +type ProjectsLocationsServiceLbPoliciesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11970,12 +15490,12 @@ type ProjectsLocationsServiceBindingsGetCall struct { header_ http.Header } -// Get: Gets details of a single ServiceBinding. +// Get: Gets details of a single ServiceLbPolicy. // -// - name: A name of the ServiceBinding to get. Must be in the format -// `projects/*/locations/global/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { - c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the ServiceLbPolicy to get. Must be in the format +// `projects/{project}/locations/{location}/serviceLbPolicies/*`. +func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall { + c := &ProjectsLocationsServiceLbPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11983,7 +15503,7 @@ func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11993,7 +15513,7 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12001,21 +15521,21 @@ func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12041,14 +15561,14 @@ func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.get" call. -// Exactly one of *ServiceBinding or error will be non-nil. Any non-2xx +// Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call. +// Exactly one of *ServiceLbPolicy or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *ServiceBinding.ServerResponse.Header or (if a response was returned +// *ServiceLbPolicy.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12067,7 +15587,7 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ServiceBinding{ + ret := &ServiceLbPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12079,25 +15599,25 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets details of a single ServiceBinding.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "description": "Gets details of a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.get", + // "id": "networkservices.projects.locations.serviceLbPolicies.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "ServiceBinding" + // "$ref": "ServiceLbPolicy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12106,9 +15626,9 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } -// method id "networkservices.projects.locations.serviceBindings.getIamPolicy": +// method id "networkservices.projects.locations.serviceLbPolicies.getIamPolicy": -type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { +type ProjectsLocationsServiceLbPoliciesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12125,8 +15645,8 @@ type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { - c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServiceLbPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12144,7 +15664,7 @@ func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12152,7 +15672,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12162,7 +15682,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -12170,21 +15690,21 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12210,14 +15730,14 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12249,9 +15769,9 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + // "id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12265,7 +15785,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -12281,9 +15801,9 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.list": +// method id "networkservices.projects.locations.serviceLbPolicies.list": -type ProjectsLocationsServiceBindingsListCall struct { +type ProjectsLocationsServiceLbPoliciesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12292,29 +15812,29 @@ type ProjectsLocationsServiceBindingsListCall struct { header_ http.Header } -// List: Lists ServiceBinding in a given project and location. +// List: Lists ServiceLbPolicies in a given project and location. // -// - parent: The project and location from which the ServiceBindings +// - parent: The project and location from which the ServiceLbPolicies // should be listed, specified in the format -// `projects/*/locations/global`. -func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { - c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall { + c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceBindings to return per call. -func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { +// ServiceLbPolicies to return per call. +func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListServiceBindingsResponse` Indicates that this is a +// by the last `ListServiceLbPoliciesResponse` Indicates that this is a // continuation of a prior `ListRouters` call, and that the system // should return the next page of data. -func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12322,7 +15842,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12332,7 +15852,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall { c.ifNoneMatch_ = entityTag return c } @@ -12340,21 +15860,21 @@ func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12367,7 +15887,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12380,14 +15900,14 @@ func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.list" call. -// Exactly one of *ListServiceBindingsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceBindingsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call. +// Exactly one of *ListServiceLbPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListServiceLbPoliciesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12406,7 +15926,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListServiceBindingsResponse{ + ret := &ListServiceLbPoliciesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12418,36 +15938,36 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists ServiceBinding in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "description": "Lists ServiceLbPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.list", + // "id": "networkservices.projects.locations.serviceLbPolicies.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of ServiceBindings to return per call.", + // "description": "Maximum number of ServiceLbPolicies to return per call.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", + // "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", + // "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/serviceBindings", + // "path": "v1/{+parent}/serviceLbPolicies", // "response": { - // "$ref": "ListServiceBindingsResponse" + // "$ref": "ListServiceLbPoliciesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12459,7 +15979,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { +func (c *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -12477,9 +15997,170 @@ func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f } } -// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": +// method id "networkservices.projects.locations.serviceLbPolicies.patch": -type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { +type ProjectsLocationsServiceLbPoliciesPatchCall struct { + s *Service + name string + servicelbpolicy *ServiceLbPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ServiceLbPolicy. +// +// - name: Name of the ServiceLbPolicy resource. It matches pattern +// `projects/{project}/locations/{location}/serviceLbPolicies/{service_ +// lb_policy_name}`. +func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall { + c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.servicelbpolicy = servicelbpolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the ServiceLbPolicy +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single ServiceLbPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.serviceLbPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ServiceLbPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.serviceLbPolicies.setIamPolicy": + +type ProjectsLocationsServiceLbPoliciesSetIamPolicyCall struct { s *Service resource string setiampolicyrequest *SetIamPolicyRequest @@ -12496,8 +16177,8 @@ type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall { - c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServiceLbPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.setiampolicyrequest = setiampolicyrequest return c @@ -12506,7 +16187,7 @@ func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12514,21 +16195,21 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12556,14 +16237,14 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12595,9 +16276,9 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + // "id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12605,7 +16286,7 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } @@ -12624,9 +16305,9 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": +// method id "networkservices.projects.locations.serviceLbPolicies.testIamPermissions": -type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { +type ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall struct { s *Service resource string testiampermissionsrequest *TestIamPermissionsRequest @@ -12646,8 +16327,8 @@ type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { - c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceLbPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.testiampermissionsrequest = testiampermissionsrequest return c @@ -12656,7 +16337,7 @@ func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12664,21 +16345,21 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12706,14 +16387,14 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call. +// Do executes the "networkservices.projects.locations.serviceLbPolicies.testIamPermissions" call. // Exactly one of *TestIamPermissionsResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *TestIamPermissionsResponse.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12745,9 +16426,9 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...goog return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + // "id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -12755,7 +16436,7 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...goog // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", // "required": true, // "type": "string" // } diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index c160b52e65a..b3aa443b060 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20240125", + "revision": "20240207", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2697,7 +2697,7 @@ "id": "ExtensionChainExtension", "properties": { "authority": { - "description": "Required. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service.", "type": "string" }, "failOpen": { @@ -2760,7 +2760,7 @@ "type": "object" }, "Gateway": { - "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 30", + "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", "id": "Gateway", "properties": { "addresses": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 1a30222e1d7..4d17b463f97 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -779,7 +779,7 @@ func (s *ExtensionChain) MarshalJSON() ([]byte, error) { // ExtensionChainExtension: A single extension in the chain to execute // for the matching request. type ExtensionChainExtension struct { - // Authority: Required. The `:authority` header in the gRPC request sent + // Authority: Optional. The `:authority` header in the gRPC request sent // from Envoy to the extension service. Authority string `json:"authority,omitempty"` @@ -900,7 +900,7 @@ func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { // a load balancer. It captures the ip:port over which the services are // exposed by the proxy, along with any policy configurations. Routes // have reference to to Gateways to dictate how requests should be -// routed by this Gateway. Next id: 30 +// routed by this Gateway. Next id: 32 type Gateway struct { // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the // Gateway will receive the traffic. When no address is provided, an IP diff --git a/places/v1/places-api.json b/places/v1/places-api.json index f4315014a05..c1a7f1e490d 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -8,6 +8,9 @@ "https://www.googleapis.com/auth/maps-platform.places": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places" }, + "https://www.googleapis.com/auth/maps-platform.places.autocomplete": { + "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.autocomplete" + }, "https://www.googleapis.com/auth/maps-platform.places.details": { "description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.details" }, @@ -119,6 +122,26 @@ "resources": { "places": { "methods": { + "autocomplete": { + "description": "Returns predictions for the given input.", + "flatPath": "v1/places:autocomplete", + "httpMethod": "POST", + "id": "places.places.autocomplete", + "parameterOrder": [], + "parameters": {}, + "path": "v1/places:autocomplete", + "request": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequest" + }, + "response": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/maps-platform.places", + "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + ] + }, "get": { "description": "Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format.", "flatPath": "v1/places/{placesId}", @@ -144,6 +167,11 @@ "description": "Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", "location": "query", "type": "string" + }, + "sessionToken": { + "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -248,7 +276,7 @@ } } }, - "revision": "20240114", + "revision": "20240219", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -285,6 +313,223 @@ }, "type": "object" }, + "GoogleMapsPlacesV1AutocompletePlacesRequest": { + "description": "Request proto for AutocompletePlaces.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequest", + "properties": { + "includeQueryPredictions": { + "description": "Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.", + "type": "boolean" + }, + "includedPrimaryTypes": { + "description": "Optional. Included primary Place type (for example, \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedRegionCodes": { + "description": "Optional. Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both `location_restriction` and `included_region_codes` are set, the results will be located in the area of intersection.", + "items": { + "type": "string" + }, + "type": "array" + }, + "input": { + "description": "Required. The text string on which to search.", + "type": "string" + }, + "inputOffset": { + "description": "Optional. A zero-based Unicode character offset of `input` indicating the cursor position in `input`. The cursor position may influence what predictions are returned. If empty, defaults to the length of `input`.", + "format": "int32", + "type": "integer" + }, + "languageCode": { + "description": "Optional. The language in which to return results. Defaults to en-US. The results may be in mixed languages if the language used in `input` is different from `language_code` or if the returned Place does not have a translation from the local language to `language_code`.", + "type": "string" + }, + "locationBias": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", + "description": "Optional. Bias results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." + }, + "locationRestriction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", + "description": "Optional. Restrict results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." + }, + "origin": { + "$ref": "GoogleTypeLatLng", + "description": "Optional. The origin point from which to calculate geodesic distance to the destination (returned as `distance_meters`). If this value is omitted, geodesic distance will not be returned." + }, + "regionCode": { + "description": "Optional. The region code, specified as a CLDR two-character region code. This affects address formatting, result ranking, and may influence what results are returned. This does not restrict results to the specified region. To restrict results to a region, use `region_code_restriction`.", + "type": "string" + }, + "sessionToken": { + "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias": { + "description": "The region to search. The results may be biased around the specified region.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", + "properties": { + "circle": { + "$ref": "GoogleMapsPlacesV1Circle", + "description": "A circle defined by a center point and radius." + }, + "rectangle": { + "$ref": "GoogleGeoTypeViewport", + "description": "A viewport defined by a northeast and a southwest corner." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction": { + "description": "The region to search. The results will be restricted to the specified region.", + "id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", + "properties": { + "circle": { + "$ref": "GoogleMapsPlacesV1Circle", + "description": "A circle defined by a center point and radius." + }, + "rectangle": { + "$ref": "GoogleGeoTypeViewport", + "description": "A viewport defined by a northeast and a southwest corner." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponse": { + "description": "Response proto for AutocompletePlaces.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponse", + "properties": { + "suggestions": { + "description": "Contains a list of suggestions, ordered in descending order of relevance.", + "items": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion": { + "description": "An Autocomplete suggestion result.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion", + "properties": { + "placePrediction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", + "description": "A prediction for a Place." + }, + "queryPrediction": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", + "description": "A prediction for a query." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText": { + "description": "Text representing a Place or query prediction. The text may be used as is or formatted.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "properties": { + "matches": { + "description": "A list of string ranges identifying where the input request matched in `text`. The ranges can be used to format specific parts of `text`. The substrings may not be exact matches of `input` if the matching was determined by criteria other than string matching (for example, spell corrections or transliterations). These values are Unicode character offsets of `text`. The ranges are guaranteed to be ordered in increasing offset values.", + "items": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange" + }, + "type": "array" + }, + "text": { + "description": "Text that may be used as is or formatted with `matches`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction": { + "description": "Prediction results for a Place Autocomplete prediction.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", + "properties": { + "distanceMeters": { + "description": "The length of the geodesic in meters from `origin` if `origin` is specified. Certain predictions such as routes may not populate this field.", + "format": "int32", + "type": "integer" + }, + "place": { + "description": "The resource name of the suggested Place. This name can be used in other APIs that accept Place names.", + "type": "string" + }, + "placeId": { + "description": "The unique identifier of the suggested Place. This identifier can be used in other APIs that accept Place IDs.", + "type": "string" + }, + "structuredFormat": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "description": "A breakdown of the Place prediction into main text containing the name of the Place and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa." + }, + "text": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Contains the human-readable name for the returned result. For establishment results, this is usually the business name and address. `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa. This text may be different from the `display_name` returned by GetPlace. May be in mixed languages if the request `input` and `language_code` are in different languages or if the Place does not have a translation from the local language to `language_code`." + }, + "types": { + "description": "List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types. A type is a categorization of a Place. Places with shared types will share similar characteristics.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction": { + "description": "Prediction results for a Query Autocomplete prediction.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", + "properties": { + "structuredFormat": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "description": "A breakdown of the query prediction into main text containing the query and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa." + }, + "text": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, TextSearch). `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa. May be in mixed languages if the request `input` and `language_code` are in different languages or if part of the query does not have a translation from the local language to `language_code`." + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange": { + "description": "Identifies a substring within a given text.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange", + "properties": { + "endOffset": { + "description": "Zero-based offset of the last Unicode character (exclusive).", + "format": "int32", + "type": "integer" + }, + "startOffset": { + "description": "Zero-based offset of the first Unicode character of the string (inclusive).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat": { + "description": "Contains a breakdown of a Place or query prediction into main text and secondary text. For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query. The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.", + "id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", + "properties": { + "mainText": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Represents the name of the Place or query." + }, + "secondaryText": { + "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", + "description": "Represents additional disambiguating features (such as a city or region) to further identify the Place or refine the query." + } + }, + "type": "object" + }, "GoogleMapsPlacesV1Circle": { "description": "Circle with a LatLng as center and radius.", "id": "GoogleMapsPlacesV1Circle", @@ -653,7 +898,7 @@ "description": "Payment options the place accepts. If a payment option data is not available, the payment option field will be unset." }, "photos": { - "description": "Information (including references) about photos of this place.", + "description": "Information (including references) about photos of this place. A maximum of 10 photos can be returned.", "items": { "$ref": "GoogleMapsPlacesV1Photo" }, @@ -716,7 +961,7 @@ "type": "boolean" }, "reviews": { - "description": "List of reviews about this place, sorted by relevance.", + "description": "List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.", "items": { "$ref": "GoogleMapsPlacesV1Review" }, diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index d81c1f7807f..2b0f224a554 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -108,6 +108,10 @@ const ( // Private Service: https://www.googleapis.com/auth/maps-platform.places MapsPlatformPlacesScope = "https://www.googleapis.com/auth/maps-platform.places" + // Private Service: + // https://www.googleapis.com/auth/maps-platform.places.autocomplete + MapsPlatformPlacesAutocompleteScope = "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + // Private Service: // https://www.googleapis.com/auth/maps-platform.places.details MapsPlatformPlacesDetailsScope = "https://www.googleapis.com/auth/maps-platform.places.details" @@ -126,6 +130,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/maps-platform.places", + "https://www.googleapis.com/auth/maps-platform.places.autocomplete", "https://www.googleapis.com/auth/maps-platform.places.details", "https://www.googleapis.com/auth/maps-platform.places.nearbysearch", "https://www.googleapis.com/auth/maps-platform.places.textsearch", @@ -283,6 +288,486 @@ func (s *GoogleMapsPlacesV1AuthorAttribution) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleMapsPlacesV1AutocompletePlacesRequest: Request proto for +// AutocompletePlaces. +type GoogleMapsPlacesV1AutocompletePlacesRequest struct { + // IncludeQueryPredictions: Optional. If true, the response will include + // both Place and query predictions. Otherwise the response will only + // return Place predictions. + IncludeQueryPredictions bool `json:"includeQueryPredictions,omitempty"` + + // IncludedPrimaryTypes: Optional. Included primary Place type (for + // example, "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // A Place is only returned if its primary type is included in this + // list. Up to 5 values can be specified. If no types are specified, all + // Place types are returned. + IncludedPrimaryTypes []string `json:"includedPrimaryTypes,omitempty"` + + // IncludedRegionCodes: Optional. Only include results in the specified + // regions, specified as up to 15 CLDR two-character region codes. An + // empty set will not restrict the results. If both + // `location_restriction` and `included_region_codes` are set, the + // results will be located in the area of intersection. + IncludedRegionCodes []string `json:"includedRegionCodes,omitempty"` + + // Input: Required. The text string on which to search. + Input string `json:"input,omitempty"` + + // InputOffset: Optional. A zero-based Unicode character offset of + // `input` indicating the cursor position in `input`. The cursor + // position may influence what predictions are returned. If empty, + // defaults to the length of `input`. + InputOffset int64 `json:"inputOffset,omitempty"` + + // LanguageCode: Optional. The language in which to return results. + // Defaults to en-US. The results may be in mixed languages if the + // language used in `input` is different from `language_code` or if the + // returned Place does not have a translation from the local language to + // `language_code`. + LanguageCode string `json:"languageCode,omitempty"` + + // LocationBias: Optional. Bias results to a specified location. At most + // one of `location_bias` or `location_restriction` should be set. If + // neither are set, the results will be biased by IP address, meaning + // the IP address will be mapped to an imprecise location and used as a + // biasing signal. + LocationBias *GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias `json:"locationBias,omitempty"` + + // LocationRestriction: Optional. Restrict results to a specified + // location. At most one of `location_bias` or `location_restriction` + // should be set. If neither are set, the results will be biased by IP + // address, meaning the IP address will be mapped to an imprecise + // location and used as a biasing signal. + LocationRestriction *GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction `json:"locationRestriction,omitempty"` + + // Origin: Optional. The origin point from which to calculate geodesic + // distance to the destination (returned as `distance_meters`). If this + // value is omitted, geodesic distance will not be returned. + Origin *GoogleTypeLatLng `json:"origin,omitempty"` + + // RegionCode: Optional. The region code, specified as a CLDR + // two-character region code. This affects address formatting, result + // ranking, and may influence what results are returned. This does not + // restrict results to the specified region. To restrict results to a + // region, use `region_code_restriction`. + RegionCode string `json:"regionCode,omitempty"` + + // SessionToken: Optional. A string which identifies an Autocomplete + // session for billing purposes. Must be a URL and filename safe base64 + // string with at most 36 ASCII characters in length. Otherwise an + // INVALID_ARGUMENT error is returned. The session begins when the user + // starts typing a query, and concludes when they select a place and a + // call to Place Details or Address Validation is made. Each session can + // have multiple queries, followed by one Place Details or Address + // Validation request. The credentials used for each request within a + // session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must + // generate a fresh token for each session. If the `session_token` + // parameter is omitted, or if you reuse a session token, the session is + // charged as if no session token was provided (each request is billed + // separately). We recommend the following guidelines: * Use session + // tokens for all Place Autocomplete calls. * Generate a fresh token for + // each session. Using a version 4 UUID is recommended. * Ensure that + // the credentials used for all Place Autocomplete, Place Details, and + // Address Validation requests within a session belong to the same Cloud + // Console project. * Be sure to pass a unique session token for each + // new session. Using the same token for more than one session will + // result in each request being billed individually. + SessionToken string `json:"sessionToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IncludeQueryPredictions") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IncludeQueryPredictions") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias: The region +// to search. The results may be biased around the specified region. +type GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias struct { + // Circle: A circle defined by a center point and radius. + Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` + + // Rectangle: A viewport defined by a northeast and a southwest corner. + Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Circle") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Circle") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction: The +// region to search. The results will be restricted to the specified +// region. +type GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction struct { + // Circle: A circle defined by a center point and radius. + Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` + + // Rectangle: A viewport defined by a northeast and a southwest corner. + Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Circle") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Circle") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponse: Response proto for +// AutocompletePlaces. +type GoogleMapsPlacesV1AutocompletePlacesResponse struct { + // Suggestions: Contains a list of suggestions, ordered in descending + // order of relevance. + Suggestions []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion `json:"suggestions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Suggestions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Suggestions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion: An +// Autocomplete suggestion result. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion struct { + // PlacePrediction: A prediction for a Place. + PlacePrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction `json:"placePrediction,omitempty"` + + // QueryPrediction: A prediction for a query. + QueryPrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction `json:"queryPrediction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PlacePrediction") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PlacePrediction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText: +// +// Text representing a Place or query prediction. The text may be used +// +// as is or formatted. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText struct { + // Matches: A list of string ranges identifying where the input request + // matched in `text`. The ranges can be used to format specific parts of + // `text`. The substrings may not be exact matches of `input` if the + // matching was determined by criteria other than string matching (for + // example, spell corrections or transliterations). These values are + // Unicode character offsets of `text`. The ranges are guaranteed to be + // ordered in increasing offset values. + Matches []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange `json:"matches,omitempty"` + + // Text: Text that may be used as is or formatted with `matches`. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Matches") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Matches") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction: +// +// Prediction results for a Place Autocomplete prediction. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction struct { + // DistanceMeters: The length of the geodesic in meters from `origin` if + // `origin` is specified. Certain predictions such as routes may not + // populate this field. + DistanceMeters int64 `json:"distanceMeters,omitempty"` + + // Place: The resource name of the suggested Place. This name can be + // used in other APIs that accept Place names. + Place string `json:"place,omitempty"` + + // PlaceId: The unique identifier of the suggested Place. This + // identifier can be used in other APIs that accept Place IDs. + PlaceId string `json:"placeId,omitempty"` + + // StructuredFormat: A breakdown of the Place prediction into main text + // containing the name of the Place and secondary text containing + // additional disambiguating features (such as a city or region). + // `structured_format` is recommended for developers who wish to show + // two separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a Place prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. + StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` + + // Text: Contains the human-readable name for the returned result. For + // establishment results, this is usually the business name and address. + // `text` is recommended for developers who wish to show a single UI + // element. Developers who wish to show two separate, but related, UI + // elements may want to use `structured_format` instead. They are two + // different ways to represent a Place prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. This text may + // be different from the `display_name` returned by GetPlace. May be in + // mixed languages if the request `input` and `language_code` are in + // different languages or if the Place does not have a translation from + // the local language to `language_code`. + Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` + + // Types: List of types that apply to this Place from Table A or Table B + // in + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // A type is a categorization of a Place. Places with shared types will + // share similar characteristics. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DistanceMeters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DistanceMeters") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction: +// +// Prediction results for a Query Autocomplete prediction. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction struct { + // StructuredFormat: A breakdown of the query prediction into main text + // containing the query and secondary text containing additional + // disambiguating features (such as a city or region). + // `structured_format` is recommended for developers who wish to show + // two separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a query prediction. Users should not try + // to parse `structured_format` into `text` or vice versa. + StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` + + // Text: The predicted text. This text does not represent a Place, but + // rather a text query that could be used in a search endpoint (for + // example, TextSearch). `text` is recommended for developers who wish + // to show a single UI element. Developers who wish to show two + // separate, but related, UI elements may want to use + // `structured_format` instead. They are two different ways to represent + // a query prediction. Users should not try to parse `structured_format` + // into `text` or vice versa. May be in mixed languages if the request + // `input` and `language_code` are in different languages or if part of + // the query does not have a translation from the local language to + // `language_code`. + Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StructuredFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StructuredFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange: +// Identifies a substring within a given text. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange struct { + // EndOffset: Zero-based offset of the last Unicode character + // (exclusive). + EndOffset int64 `json:"endOffset,omitempty"` + + // StartOffset: Zero-based offset of the first Unicode character of the + // string (inclusive). + StartOffset int64 `json:"startOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat +// : Contains a breakdown of a Place or query prediction into main text +// and secondary text. For Place predictions, the main text contains the +// specific name of the Place. For query predictions, the main text +// contains the query. The secondary text contains additional +// disambiguating features (such as a city or region) to further +// identify the Place or refine the query. +type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat struct { + // MainText: Represents the name of the Place or query. + MainText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"mainText,omitempty"` + + // SecondaryText: Represents additional disambiguating features (such as + // a city or region) to further identify the Place or refine the query. + SecondaryText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"secondaryText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MainText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MainText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleMapsPlacesV1Circle: Circle with a LatLng as center and radius. type GoogleMapsPlacesV1Circle struct { // Center: Required. Center latitude and longitude. The range of @@ -773,7 +1258,7 @@ type GoogleMapsPlacesV1Place struct { PaymentOptions *GoogleMapsPlacesV1PlacePaymentOptions `json:"paymentOptions,omitempty"` // Photos: Information (including references) about photos of this - // place. + // place. A maximum of 10 photos can be returned. Photos []*GoogleMapsPlacesV1Photo `json:"photos,omitempty"` // PlusCode: Plus code of the place location lat/long. @@ -827,7 +1312,8 @@ type GoogleMapsPlacesV1Place struct { // Restroom: Place has restroom. Restroom bool `json:"restroom,omitempty"` - // Reviews: List of reviews about this place, sorted by relevance. + // Reviews: List of reviews about this place, sorted by relevance. A + // maximum of 5 reviews can be returned. Reviews []*GoogleMapsPlacesV1Review `json:"reviews,omitempty"` // ServesBeer: Specifies if the place serves beer. @@ -2060,6 +2546,135 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "places.places.autocomplete": + +type PlacesAutocompleteCall struct { + s *Service + googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Autocomplete: Returns predictions for the given input. +func (r *PlacesService) Autocomplete(googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest) *PlacesAutocompleteCall { + c := &PlacesAutocompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlemapsplacesv1autocompleteplacesrequest = googlemapsplacesv1autocompleteplacesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PlacesAutocompleteCall) Fields(s ...googleapi.Field) *PlacesAutocompleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PlacesAutocompleteCall) Context(ctx context.Context) *PlacesAutocompleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PlacesAutocompleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlacesAutocompleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlemapsplacesv1autocompleteplacesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/places:autocomplete") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "places.places.autocomplete" call. +// Exactly one of *GoogleMapsPlacesV1AutocompletePlacesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleMapsPlacesV1AutocompletePlacesResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PlacesAutocompleteCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1AutocompletePlacesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleMapsPlacesV1AutocompletePlacesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns predictions for the given input.", + // "flatPath": "v1/places:autocomplete", + // "httpMethod": "POST", + // "id": "places.places.autocomplete", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/places:autocomplete", + // "request": { + // "$ref": "GoogleMapsPlacesV1AutocompletePlacesRequest" + // }, + // "response": { + // "$ref": "GoogleMapsPlacesV1AutocompletePlacesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/maps-platform.places", + // "https://www.googleapis.com/auth/maps-platform.places.autocomplete" + // ] + // } + +} + // method id "places.places.get": type PlacesGetCall struct { @@ -2103,6 +2718,33 @@ func (c *PlacesGetCall) RegionCode(regionCode string) *PlacesGetCall { return c } +// SessionToken sets the optional parameter "sessionToken": A string +// which identifies an Autocomplete session for billing purposes. Must +// be a URL and filename safe base64 string with at most 36 ASCII +// characters in length. Otherwise an INVALID_ARGUMENT error is +// returned. The session begins when the user starts typing a query, and +// concludes when they select a place and a call to Place Details or +// Address Validation is made. Each session can have multiple queries, +// followed by one Place Details or Address Validation request. The +// credentials used for each request within a session must belong to the +// same Google Cloud Console project. Once a session has concluded, the +// token is no longer valid; your app must generate a fresh token for +// each session. If the `session_token` parameter is omitted, or if you +// reuse a session token, the session is charged as if no session token +// was provided (each request is billed separately). We recommend the +// following guidelines: * Use session tokens for all Place Autocomplete +// calls. * Generate a fresh token for each session. Using a version 4 +// UUID is recommended. * Ensure that the credentials used for all Place +// Autocomplete, Place Details, and Address Validation requests within a +// session belong to the same Cloud Console project. * Be sure to pass a +// unique session token for each new session. Using the same token for +// more than one session will result in each request being billed +// individually. +func (c *PlacesGetCall) SessionToken(sessionToken string) *PlacesGetCall { + c.urlParams_.Set("sessionToken", sessionToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2226,6 +2868,11 @@ func (c *PlacesGetCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1Pla // "description": "Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", // "location": "query", // "type": "string" + // }, + // "sessionToken": { + // "description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index babf3ebccc0..4acf3d3dcd8 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -356,6 +356,146 @@ "resources": { "locations": { "resources": { + "orgPolicyViolationsPreviews": { + "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolationsPreviews", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "orgPolicyViolations": { + "methods": { + "list": { + "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items 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 call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/orgPolicyViolations", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "replays": { "methods": { "create": { @@ -707,7 +847,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1174,6 +1314,42 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse": { + "description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", + "id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolationsPreviews": { + "description": "The list of OrgPolicyViolationsPreview", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse": { + "description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", + "id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolations": { + "description": "The list of OrgPolicyViolations", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolation" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1ListReplayResultsResponse": { "description": "Response message for Simulator.ListReplayResults.", "id": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse", @@ -1192,6 +1368,177 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "Optional. The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "Optional. The new or updated OrgPolicy." + }, + "policyParent": { + "description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolation": { + "description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolation", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The custom constraint being violated." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Any error encountered during the evaluation." + }, + "name": { + "description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", + "type": "string" + }, + "resource": { + "$ref": "GoogleCloudPolicysimulatorV1ResourceContext", + "description": "The resource violating the constraint." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview", + "properties": { + "createTime": { + "description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "customConstraints": { + "description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Output only. Number of scanned resources with zero violations.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "errors": { + "description": "Output only. Number of resources that returned an error when scanned.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "noncompliant": { + "description": "Output only. Number of scanned resources with at least one violation.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "scanned": { + "description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "unenforced": { + "description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1Replay": { "description": "A resource describing a `Replay`, or simulation.", "id": "GoogleCloudPolicysimulatorV1Replay", @@ -1347,6 +1694,79 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1ResourceContext": { + "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", + "id": "GoogleCloudPolicysimulatorV1ResourceContext", + "properties": { + "ancestors": { + "description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", + "items": { + "type": "string" + }, + "type": "array" + }, + "assetType": { + "description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", + "type": "string" + }, + "resource": { + "description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1545,6 +1965,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index 5b86483b471..f4523941a72 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -244,6 +244,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -251,9 +252,32 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService + Replays *OrganizationsLocationsReplaysService } +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsService{s: s} + rs.OrgPolicyViolations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s) + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsService struct { + s *Service + + OrgPolicyViolations *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService +} + +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService{s: s} + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) @@ -1103,16 +1127,16 @@ func (s *GoogleCloudPolicysimulatorV1ExplainedPolicy) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ListReplayResultsResponse: Response -// message for Simulator.ListReplayResults. -type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { +// GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse: +// ListOrgPolicyViolationsPreviewsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews. +type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse struct { // NextPageToken: A token that you can use to retrieve the next page of - // ReplayResult objects. If this field is omitted, there are no - // subsequent pages. + // results. If this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` - // ReplayResults: The results of running a Replay. - ReplayResults []*GoogleCloudPolicysimulatorV1ReplayResult `json:"replayResults,omitempty"` + // OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview + OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -1135,46 +1159,28 @@ type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ListReplayResultsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ListReplayResultsResponse +func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, -// or simulation. -type GoogleCloudPolicysimulatorV1Replay struct { - // Config: Required. The configuration used for the `Replay`. - Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"` - - // Name: Output only. The resource name of the `Replay`, which has the - // following format: - // `{projects|folders|organizations}/{resource-id}/locations/global/repla - // ys/{replay-id}`, where `{resource-id}` is the ID of the project, - // folder, or organization that owns the Replay. Example: - // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d - // 7d-8e03-479ce1833c36` - Name string `json:"name,omitempty"` - - // ResultsSummary: Output only. Summary statistics about the replayed - // log entries. - ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"` +// GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse: +// ListOrgPolicyViolationsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolations +type GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // State: Output only. The current state of the `Replay`. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "PENDING" - The `Replay` has not started yet. - // "RUNNING" - The `Replay` is currently running. - // "SUCCEEDED" - The `Replay` has successfully completed. - // "FAILED" - The `Replay` has finished with an error. - State string `json:"state,omitempty"` + // OrgPolicyViolations: The list of OrgPolicyViolations + OrgPolicyViolations []*GoogleCloudPolicysimulatorV1OrgPolicyViolation `json:"orgPolicyViolations,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Config") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1182,48 +1188,37 @@ type GoogleCloudPolicysimulatorV1Replay struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1Replay +func (s *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for -// a Replay. -type GoogleCloudPolicysimulatorV1ReplayConfig struct { - // LogSource: The logs to use as input for the Replay. - // - // Possible values: - // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log - // source is unspecified, the Replay defaults to using - // `RECENT_ACCESSES`. - // "RECENT_ACCESSES" - All access logs from the last 90 days. These - // logs may not include logs from the most recent 7 days. - LogSource string `json:"logSource,omitempty"` +// GoogleCloudPolicysimulatorV1ListReplayResultsResponse: Response +// message for Simulator.ListReplayResults. +type GoogleCloudPolicysimulatorV1ListReplayResultsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // ReplayResult objects. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // PolicyOverlay: A mapping of the resources that you want to simulate - // policies for and the policies that you want to simulate. Keys are the - // full resource names for the resources. For example, - // `//cloudresourcemanager.googleapis.com/projects/my-project`. For - // examples of full resource names for Google Cloud services, see - // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. - // Values are Policy objects representing the policies that you want to - // simulate. Replays automatically take into account any IAM policies - // inherited through the resource hierarchy, and any policies set on - // descendant resources. You do not need to include these policies in - // the policy overlay. - PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + // ReplayResults: The results of running a Replay. + ReplayResults []*GoogleCloudPolicysimulatorV1ReplayResult `json:"replayResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogSource") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1231,34 +1226,75 @@ type GoogleCloudPolicysimulatorV1ReplayConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LogSource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig +func (s *GoogleCloudPolicysimulatorV1ListReplayResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ListReplayResultsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayDiff: The difference between the -// results of evaluating an access tuple under the current (baseline) -// policies and under the proposed (simulated) policies. This difference -// explains how a principal's access could change if the proposed -// policies were applied. -type GoogleCloudPolicysimulatorV1ReplayDiff struct { - // AccessDiff: A summary and comparison of the principal's access under - // the current (baseline) policies and the proposed (simulated) policies - // for a single access tuple. The evaluation of the principal's access - // is reported in the AccessState field. - AccessDiff *GoogleCloudPolicysimulatorV1AccessStateDiff `json:"accessDiff,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyOverlay: The proposed changes to +// OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessDiff") to + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay: +// A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1266,28 +1302,33 @@ type GoogleCloudPolicysimulatorV1ReplayDiff struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessDiff") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayDiff) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayDiff +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a -// Replay operation. -type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { - // StartTime: Time when the request was received. - StartTime string `json:"startTime,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay: A change +// to an OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "StartTime") to + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1295,8 +1336,8 @@ type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StartTime") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1304,49 +1345,31 @@ type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata +func (s *GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayResult: The result of replaying a -// single access tuple against a simulated state. -type GoogleCloudPolicysimulatorV1ReplayResult struct { - // AccessTuple: The access tuple that was replayed. This field includes - // information about the principal, resource, and permission that were - // involved in the access attempt. - AccessTuple *GoogleCloudPolicysimulatorV1AccessTuple `json:"accessTuple,omitempty"` - - // Diff: The difference between the principal's access under the current - // (baseline) policies and the principal's access under the proposed - // (simulated) policies. This field is only included for access tuples - // that were successfully replayed and had different results under the - // current policies and the proposed policies. - Diff *GoogleCloudPolicysimulatorV1ReplayDiff `json:"diff,omitempty"` +// GoogleCloudPolicysimulatorV1OrgPolicyViolation: OrgPolicyViolation is +// a resource representing a single resource violating a single +// OrgPolicy constraint. +type GoogleCloudPolicysimulatorV1OrgPolicyViolation struct { + // CustomConstraint: The custom constraint being violated. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // Error: The error that caused the access tuple replay to fail. This - // field is only included for access tuples that were not replayed - // successfully. + // Error: Any error encountered during the evaluation. Error *GoogleRpcStatus `json:"error,omitempty"` - // LastSeenDate: The latest date this access tuple was seen in the logs. - LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` - - // Name: The resource name of the `ReplayResult`, in the following - // format: - // `{projects|folders|organizations}/{resource-id}/locations/global/repla - // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is - // the ID of the project, folder, or organization that owns the Replay. - // Example: - // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d - // 7d-8e03-479ce1833c36/results/1234` + // Name: The name of the `OrgPolicyViolation`. Example: + // organizations/my-example-org/locations/global/orgPolicyViolationsPrevi + // ews/506a5f7f/orgPolicyViolations/38ce` Name string `json:"name,omitempty"` - // Parent: The Replay that the access tuple was included in. - Parent string `json:"parent,omitempty"` + // Resource: The resource violating the constraint. + Resource *GoogleCloudPolicysimulatorV1ResourceContext `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessTuple") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1354,245 +1377,30 @@ type GoogleCloudPolicysimulatorV1ReplayResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessTuple") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1ReplayResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayResult +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics -// about the replayed log entries. -type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct { - // DifferenceCount: The number of replayed log entries with a difference - // between baseline and simulated policies. - DifferenceCount int64 `json:"differenceCount,omitempty"` - - // ErrorCount: The number of log entries that could not be replayed. - ErrorCount int64 `json:"errorCount,omitempty"` - - // LogCount: The total number of log entries replayed. - LogCount int64 `json:"logCount,omitempty"` - - // NewestDate: The date of the newest log entry replayed. - NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` - - // OldestDate: The date of the oldest log entry replayed. - OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` - - // UnchangedCount: The number of replayed log entries with no difference - // between baseline and simulated policies. - UnchangedCount int64 `json:"unchangedCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DifferenceCount") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DifferenceCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe -// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata -// is metadata about an OrgPolicyViolationsPreview generations -// operation. -type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { - // RequestTime: Time when the request was received. - RequestTime string `json:"requestTime,omitempty"` - - // ResourcesFound: Total number of resources that need scanning. Should - // equal resource_scanned + resources_pending - ResourcesFound int64 `json:"resourcesFound,omitempty"` - - // ResourcesPending: Number of resources still to scan. - ResourcesPending int64 `json:"resourcesPending,omitempty"` - - // ResourcesScanned: Number of resources already scanned. - ResourcesScanned int64 `json:"resourcesScanned,omitempty"` - - // StartTime: Time when the request started processing, i.e. when the - // state was set to RUNNING. - StartTime string `json:"startTime,omitempty"` - - // State: The current state of the operation. - // - // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RequestTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RequestTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed -// changes to OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { - // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes - // to preview violations for. Any existing CustomConstraints with the - // same name will be overridden in the simulation. That is, violations - // will be determined as if all custom constraints in the overlay were - // instantiated. Only a single custom_constraint is supported in the - // overlay at a time. For evaluating multiple constraints, multiple - // `GenerateOrgPolicyViolationsPreview` requests are made, where each - // request evaluates a single constraint. - CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` - - // Policies: Optional. The OrgPolicy changes to preview violations for. - // Any existing OrgPolicies with the same name will be overridden in the - // simulation. That is, violations will be determined as if all policies - // in the overlay were created or updated. - Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomConstraints") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CustomConstraints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl -// ay: A change to an OrgPolicy custom constraint. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { - // CustomConstraint: Optional. The new or updated custom constraint. - CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - - // CustomConstraintParent: Optional. Resource the constraint is attached - // to. Example: "organization/987654" - CustomConstraintParent string `json:"customConstraintParent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomConstraint") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CustomConstraint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A -// change to an OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { - // Policy: Optional. The new or updated OrgPolicy. - Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - - // PolicyParent: Optional. The parent of the policy we are attaching to. - // Example: "projects/123456" - PolicyParent string `json:"policyParent,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview: // OrgPolicyViolationsPreview is a resource providing a preview of the // violations that will exist if an OrgPolicy change is made. The list // of violations are modeled as child resources and retrieved via a // ListOrgPolicyViolations API call. There are potentially more // OrgPolicyViolations than could fit in an embedded field. Thus, the // use of a child resource instead of a field. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { +type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview struct { // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` // was created. CreateTime string `json:"createTime,omitempty"` @@ -1618,11 +1426,11 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { // Overlay: Required. The proposed changes we are previewing violations // for. - Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` + Overlay *GoogleCloudPolicysimulatorV1OrgPolicyOverlay `json:"overlay,omitempty"` // ResourceCounts: Output only. A summary of the state of all resources // scanned for compliance with the changed OrgPolicy. - ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + ResourceCounts *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` // State: Output only. The state of the `OrgPolicyViolationsPreview`. // @@ -1646,6 +1454,10 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { // a single resource may violate multiple constraints. ViolationsCount int64 `json:"violationsCount,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1663,16 +1475,16 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou -// nts: A summary of the state of all resources scanned for compliance -// with the changed OrgPolicy. -type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { +// GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts: +// A summary of the state of all resources scanned for compliance with +// the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts struct { // Compliant: Output only. Number of scanned resources with zero // violations. Compliant int64 `json:"compliant,omitempty"` @@ -1711,48 +1523,46 @@ type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts s NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts +func (s *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper -// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is -// metadata about an OrgPolicyViolationsPreview generations operation. -type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { - // RequestTime: Time when the request was received. - RequestTime string `json:"requestTime,omitempty"` +// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, +// or simulation. +type GoogleCloudPolicysimulatorV1Replay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"` - // ResourcesFound: Total number of resources that need scanning. Should - // equal resource_scanned + resources_pending - ResourcesFound int64 `json:"resourcesFound,omitempty"` + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` - // ResourcesPending: Number of resources still to scan. - ResourcesPending int64 `json:"resourcesPending,omitempty"` + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"` - // ResourcesScanned: Number of resources already scanned. - ResourcesScanned int64 `json:"resourcesScanned,omitempty"` - - // StartTime: Time when the request started processing, i.e. when the - // state was set to RUNNING. - StartTime string `json:"startTime,omitempty"` - - // State: The current state of the operation. + // State: Output only. The current state of the `Replay`. // // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestTime") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1760,75 +1570,83 @@ type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperation // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata +func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1Replay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed -// changes to OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { - // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes - // to preview violations for. Any existing CustomConstraints with the - // same name will be overridden in the simulation. That is, violations - // will be determined as if all custom constraints in the overlay were - // instantiated. Only a single custom_constraint is supported in the - // overlay at a time. For evaluating multiple constraints, multiple - // `GenerateOrgPolicyViolationsPreview` requests are made, where each - // request evaluates a single constraint. - CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for +// a Replay. +type GoogleCloudPolicysimulatorV1ReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` - // Policies: Optional. The OrgPolicy changes to preview violations for. - // Any existing OrgPolicies with the same name will be overridden in the - // simulation. That is, violations will be determined as if all policies - // in the overlay were created or updated. - Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomConstraints") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "LogSource") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomConstraints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla -// y: A change to an OrgPolicy custom constraint. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { - // CustomConstraint: Optional. The new or updated custom constraint. - CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - - // CustomConstraintParent: Optional. Resource the constraint is attached - // to. Example: "organization/987654" - CustomConstraintParent string `json:"customConstraintParent,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayDiff: The difference between the +// results of evaluating an access tuple under the current (baseline) +// policies and under the proposed (simulated) policies. This difference +// explains how a principal's access could change if the proposed +// policies were applied. +type GoogleCloudPolicysimulatorV1ReplayDiff struct { + // AccessDiff: A summary and comparison of the principal's access under + // the current (baseline) policies and the proposed (simulated) policies + // for a single access tuple. The evaluation of the principal's access + // is reported in the AccessState field. + AccessDiff *GoogleCloudPolicysimulatorV1AccessStateDiff `json:"accessDiff,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // ForceSendFields is a list of field names (e.g. "AccessDiff") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1836,33 +1654,28 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomConstraint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AccessDiff") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayDiff raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A -// change to an OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { - // Policy: Optional. The new or updated OrgPolicy. - Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - - // PolicyParent: Optional. The parent of the policy we are attaching to. - // Example: "projects/123456" - PolicyParent string `json:"policyParent,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a +// Replay operation. +type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { + // StartTime: Time when the request was received. + StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // ForceSendFields is a list of field names (e.g. "StartTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1870,8 +1683,8 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "StartTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1879,74 +1692,49 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay +func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: -// OrgPolicyViolationsPreview is a resource providing a preview of the -// violations that will exist if an OrgPolicy change is made. The list -// of violations are modeled as child resources and retrieved via a -// ListOrgPolicyViolations API call. There are potentially more -// OrgPolicyViolations than could fit in an embedded field. Thus, the -// use of a child resource instead of a field. -type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { - // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` - // was created. - CreateTime string `json:"createTime,omitempty"` - - // CustomConstraints: Output only. The names of the constraints against - // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` - // only contains `PolicyOverlay` then it contains the name of the - // configured custom constraint, applicable to the specified policies. - // Otherwise it contains the name of the constraint specified in - // `CustomConstraintOverlay`. Format: - // `organizations/{organization_id}/customConstraints/{custom_constraint_ - // id}` Example: - // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - CustomConstraints []string `json:"customConstraints,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayResult: The result of replaying a +// single access tuple against a simulated state. +type GoogleCloudPolicysimulatorV1ReplayResult struct { + // AccessTuple: The access tuple that was replayed. This field includes + // information about the principal, resource, and permission that were + // involved in the access attempt. + AccessTuple *GoogleCloudPolicysimulatorV1AccessTuple `json:"accessTuple,omitempty"` - // Name: Output only. The resource name of the - // `OrgPolicyViolationsPreview`. It has the following format: - // `organizations/{organization}/locations/{location}/orgPolicyViolations - // Previews/{orgPolicyViolationsPreview}` Example: - // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev - // iews/506a5f7f` - Name string `json:"name,omitempty"` + // Diff: The difference between the principal's access under the current + // (baseline) policies and the principal's access under the proposed + // (simulated) policies. This field is only included for access tuples + // that were successfully replayed and had different results under the + // current policies and the proposed policies. + Diff *GoogleCloudPolicysimulatorV1ReplayDiff `json:"diff,omitempty"` - // Overlay: Required. The proposed changes we are previewing violations - // for. - Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + // Error: The error that caused the access tuple replay to fail. This + // field is only included for access tuples that were not replayed + // successfully. + Error *GoogleRpcStatus `json:"error,omitempty"` - // ResourceCounts: Output only. A summary of the state of all resources - // scanned for compliance with the changed OrgPolicy. - ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + // LastSeenDate: The latest date this access tuple was seen in the logs. + LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` - // State: Output only. The state of the `OrgPolicyViolationsPreview`. - // - // Possible values: - // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. - // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been - // created yet. - // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently - // being created. - // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation - // finished successfully. - // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed - // with an error. - State string `json:"state,omitempty"` + // Name: The resource name of the `ReplayResult`, in the following + // format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is + // the ID of the project, folder, or organization that owns the Replay. + // Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36/results/1234` + Name string `json:"name,omitempty"` - // ViolationsCount: Output only. The number of OrgPolicyViolations in - // this `OrgPolicyViolationsPreview`. This count may differ from - // `resource_summary.noncompliant_count` because each OrgPolicyViolation - // is specific to a resource **and** constraint. If there are multiple - // constraints being evaluated (i.e. multiple policies in the overlay), - // a single resource may violate multiple constraints. - ViolationsCount int64 `json:"violationsCount,omitempty"` + // Parent: The Replay that the access tuple was included in. + Parent string `json:"parent,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AccessTuple") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1954,47 +1742,45 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AccessTuple") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview +func (s *GoogleCloudPolicysimulatorV1ReplayResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun -// ts: A summary of the state of all resources scanned for compliance -// with the changed OrgPolicy. -type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { - // Compliant: Output only. Number of scanned resources with zero - // violations. - Compliant int64 `json:"compliant,omitempty"` +// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics +// about the replayed log entries. +type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` - // Errors: Output only. Number of resources that returned an error when - // scanned. - Errors int64 `json:"errors,omitempty"` + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` - // Noncompliant: Output only. Number of scanned resources with at least - // one violation. - Noncompliant int64 `json:"noncompliant,omitempty"` + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` - // Scanned: Output only. Number of resources checked for compliance. - // Must equal: unenforced + noncompliant + compliant + error - Scanned int64 `json:"scanned,omitempty"` + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` - // Unenforced: Output only. Number of resources where the constraint was - // not enforced, i.e. the Policy set `enforced: false` for that - // resource. - Unenforced int64 `json:"unenforced,omitempty"` + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Compliant") to + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2002,7 +1788,59 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Compliant") to include in + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1ResourceContext: ResourceContext provides +// the context we know about a resource. It is similar in concept to +// google.cloud.asset.v1.Resource, but focuses on the information +// specifically used by Simulator. +type GoogleCloudPolicysimulatorV1ResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` + + // Resource: The full name of the resource. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance + // s/instance1` See Resource names + // (https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Resource string `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ancestors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ancestors") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2011,41 +1849,48 @@ type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts st NullFields []string `json:"-"` } -func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts +func (s *GoogleCloudPolicysimulatorV1ResourceContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ResourceContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,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"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2053,44 +1898,58 @@ type GoogleIamV1AuditConfig struct { // This may be used to include empty fields in Patch requests. 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. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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"` +// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe +// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata +// is metadata about an OrgPolicyViolationsPreview generations +// operation. +type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // LogType: The log type that this config enables. + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. // // 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"` + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2098,7 +1957,49 @@ type GoogleIamV1AuditLogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2108,101 +2009,23 @@ type GoogleIamV1AuditLogConfig struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a -// `role`. -type GoogleIamV1Binding 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 *GoogleTypeExpr `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}/subject/{subject_attribute_value}`: A single identity in a - // workforce identity pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/attribute.{attribute_name}/{attribute_value}`: All workforce - // identities with a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po - // ol_id}/*`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/gl - // obal/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}/{at - // tribute_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/workforcePool - // s/{pool_id}/subject/{subject_attribute_value}`: Deleted single - // identity in a workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePool - // s/my-pool-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl +// ay: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,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"` + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2210,105 +2033,33 @@ type GoogleIamV1Binding struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1AuditConfig `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 []*GoogleIamV1Binding `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"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,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"` + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2316,98 +2067,131 @@ type GoogleIamV1Policy struct { // This may be used to include empty fields in Patch requests. 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. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { + // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` + // was created. + CreateTime string `json:"createTime,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // CustomConstraints: Output only. The names of the constraints against + // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` + // only contains `PolicyOverlay` then it contains the name of the + // configured custom constraint, applicable to the specified policies. + // Otherwise it contains the name of the constraint specified in + // `CustomConstraintOverlay`. Format: + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + CustomConstraints []string `json:"customConstraints,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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 *GoogleRpcStatus `json:"error,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou +// nts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Output only. Number of scanned resources with zero + // violations. + Compliant int64 `json:"compliant,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"` + // Errors: Output only. Number of resources that returned an error when + // scanned. + Errors int64 `json:"errors,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"` + // Noncompliant: Output only. Number of scanned resources with at least + // one violation. + Noncompliant int64 `json:"noncompliant,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"` + // Scanned: Output only. Number of resources checked for compliance. + // Must equal: unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Unenforced: Output only. Number of resources where the constraint was + // not enforced, i.e. the Policy set `enforced: false` for that + // resource. + Unenforced int64 `json:"unenforced,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "Compliant") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2415,8 +2199,8 @@ type GoogleLongrunningOperation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -2424,34 +2208,48 @@ type GoogleLongrunningOperation struct { NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleRpcStatus: 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 GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,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"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,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"` + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2459,46 +2257,57 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper +// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2506,165 +2315,1385 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: 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 GoogleTypeExpr 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 +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { + // CustomConstraints: Optional. The OrgPolicy CustomConstraint changes + // to preview violations for. Any existing CustomConstraints with the + // same name will be overridden in the simulation. That is, violations + // will be determined as if all custom constraints in the overlay were + // instantiated. Only a single custom_constraint is supported in the + // overlay at a time. For evaluating multiple constraints, multiple + // `GenerateOrgPolicyViolationsPreview` requests are made, where each + // request evaluates a single constraint. + CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: Optional. The OrgPolicy changes to preview violations for. + // Any existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla +// y: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: Optional. The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Optional. Resource the constraint is attached + // to. Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { + // Policy: Optional. The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: Optional. The parent of the policy we are attaching to. + // Example: "projects/123456" + PolicyParent string `json:"policyParent,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { + // CreateTime: Output only. Time when this `OrgPolicyViolationsPreview` + // was created. + CreateTime string `json:"createTime,omitempty"` + + // CustomConstraints: Output only. The names of the constraints against + // which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` + // only contains `PolicyOverlay` then it contains the name of the + // configured custom constraint, applicable to the specified policies. + // Otherwise it contains the name of the constraint specified in + // `CustomConstraintOverlay`. Format: + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + CustomConstraints []string `json:"customConstraints,omitempty"` + + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` + + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun +// ts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Output only. Number of scanned resources with zero + // violations. + Compliant int64 `json:"compliant,omitempty"` + + // Errors: Output only. Number of resources that returned an error when + // scanned. + Errors int64 `json:"errors,omitempty"` + + // Noncompliant: Output only. Number of scanned resources with at least + // one violation. + Noncompliant int64 `json:"noncompliant,omitempty"` + + // Scanned: Output only. Number of resources checked for compliance. + // Must equal: unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Output only. Number of resources where the constraint was + // not enforced, i.e. the Policy set `enforced: false` for that + // resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding 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 *GoogleTypeExpr `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}/subject/{subject_attribute_value}`: A single identity in a + // workforce identity pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/attribute.{attribute_name}/{attribute_value}`: All workforce + // identities with a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/*`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/gl + // obal/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}/{at + // tribute_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/workforcePool + // s/{pool_id}/subject/{subject_attribute_value}`: Deleted single + // identity in a workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePool + // s/my-pool-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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `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 []*GoogleIamV1Binding `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"` + + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: 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 GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: 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 GoogleTypeExpr 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"` + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "policysimulator.folders.locations.replays.create": + +type FoldersLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *FoldersLocationsReplaysCreateCall { + c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.folders.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.get": + +type FoldersLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { + c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1Replay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.get": + +type FoldersLocationsReplaysOperationsGetCall 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 *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "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/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "policysimulator.folders.locations.replays.operations.list": - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +type FoldersLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// method id "policysimulator.folders.locations.replays.create": +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type FoldersLocationsReplaysCreateCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Create: Creates and starts a Replay using the given ReplayConfig. -// -// - parent: The parent resource where this Replay will be created. This -// resource must be a project, folder, or organization with a -// location. Example: `projects/my-example-project/locations/global`. -func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1replay *GoogleCloudPolicysimulatorV1Replay) *FoldersLocationsReplaysCreateCall { - c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1replay = googlecloudpolicysimulatorv1replay +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysCreateCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1replay) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replays") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2683,7 +3712,7 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2695,28 +3724,41 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates and starts a Replay using the given ReplayConfig.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays", - // "httpMethod": "POST", - // "id": "policysimulator.folders.locations.replays.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "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/{+parent}/replays", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2725,36 +3767,74 @@ func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "policysimulator.folders.locations.replays.get": +// 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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type FoldersLocationsReplaysGetCall struct { +// method id "policysimulator.folders.locations.replays.results.list": + +type FoldersLocationsReplaysResultsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the specified Replay. Each `Replay` is available for at -// least 7 days. +// List: Lists the results of running a Replay. // -// - name: The name of the Replay to retrieve, in the following format: +// - parent: The Replay whose results are listed, in the following +// format: // `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}`, where `{resource-id}` is the ID of the project, -// folder, or organization that owns the `Replay`. Example: -// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- -// 4d7d-8e03-479ce1833c36`. -func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { - c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2764,7 +3844,7 @@ func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLo // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2772,21 +3852,21 @@ func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersL // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2799,7 +3879,7 @@ func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2807,20 +3887,21 @@ func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.get" call. -// Exactly one of *GoogleCloudPolicysimulatorV1Replay or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudPolicysimulatorV1Replay.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1Replay, error) { +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2839,7 +3920,7 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1Replay{ + ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2851,25 +3932,36 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.get", + // "id": "policysimulator.folders.locations.replays.results.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/results", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1Replay" + // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2878,9 +3970,30 @@ func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "policysimulator.folders.locations.replays.operations.get": +// 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 *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type FoldersLocationsReplaysOperationsGetCall struct { +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2894,8 +4007,8 @@ type FoldersLocationsReplaysOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2903,7 +4016,7 @@ func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2913,7 +4026,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2921,21 +4034,21 @@ func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2961,14 +4074,14 @@ func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3000,9 +4113,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "flatPath": "v1/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "id": "policysimulator.operations.get", // "parameterOrder": [ // "name" // ], @@ -3010,7 +4123,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } @@ -3026,9 +4139,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.operations.list": -type FoldersLocationsReplaysOperationsListCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3042,29 +4155,29 @@ type FoldersLocationsReplaysOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3072,7 +4185,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3082,7 +4195,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3090,21 +4203,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3130,7 +4243,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Do executes the "policysimulator.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -3138,7 +4251,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3170,9 +4283,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "flatPath": "v1/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], @@ -3185,7 +4298,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^operations$", // "required": true, // "type": "string" // }, @@ -3215,7 +4328,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // 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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3233,53 +4346,194 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.folders.locations.replays.results.list": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1orgpolicyviolationspreview *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1orgpolicyviolationspreview = googlecloudpolicysimulatorv1orgpolicyviolationspreview + return c +} + +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1orgpolicyviolationspreview) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": -type FoldersLocationsReplaysResultsListCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the results of running a Replay. +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. // -// - parent: The Replay whose results are listed, in the following -// format: -// `{projects|folders|organizations}/{resource-id}/locations/global/rep -// lays/{replay-id}` Example: -// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 -// 3-479ce1833c36`. -func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { - c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of ReplayResult objects to return. Defaults to 5000. The maximum -// value is 5000; values above 5000 are rounded down to 5000. -func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous Simulator.ListReplayResults call. Provide -// this token to retrieve the next page of results. When paginating, all -// other parameters provided to [Simulator.ListReplayResults[] must -// match the call that provided the page token. -func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3289,7 +4543,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3297,21 +4551,21 @@ func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3324,7 +4578,7 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3332,21 +4586,22 @@ func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.results.list" call. -// Exactly one of *GoogleCloudPolicysimulatorV1ListReplayResultsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1ListReplayResultsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview.ServerResponse +// .Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListReplayResultsResponse, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3365,7 +4620,7 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1ListReplayResultsResponse{ + ret := &GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3377,36 +4632,25 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists the results of running a Replay.", - // "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.results.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "name": { + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/results", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3415,53 +4659,52 @@ func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListReplayResultsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.operations.get": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": -type OperationsGetCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { s *Service - name string + parent 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. +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent the violations are scoped to. Format: +// `organizations/{organization}/locations/{location}` Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3471,7 +4714,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3479,21 +4722,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3506,7 +4749,7 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolationsPreviews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3514,19 +4757,22 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse.S +// erverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3545,7 +4791,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3557,25 +4803,36 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/operations/{operationsId}", + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "pageSize": { + // "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/orgPolicyViolationsPreviews", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3584,45 +4841,65 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OperationsListCall struct { +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { s *Service - name string + parent 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`. +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. // -// - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3630,7 +4907,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3640,7 +4917,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3648,21 +4925,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3675,7 +4952,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/orgPolicyViolations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3683,20 +4960,22 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3715,7 +4994,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3727,41 +5006,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/operations", + // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/orgPolicyViolations", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3773,7 +5047,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // 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 *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index d1031e463b5..905c66d5b46 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -424,39 +424,42 @@ "organizations": { "resources": { "locations": { - "methods": { - "orgPolicyViolationsPreviews": { - "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - "httpMethod": "POST", - "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", - "request": { - "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "orgPolicyViolationsPreviews": { "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generate": { "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", @@ -1075,7 +1078,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1562,6 +1565,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaExplainedAccess": { "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", "id": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", @@ -2113,6 +2167,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index aa0fdce51de..84c783fe266 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -268,7 +268,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -276,7 +276,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -1235,6 +1235,64 @@ func (s *GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaExplainedAccess: Details about how a // set of policies, listed in ExplainedPolicy, resulted in a certain // AccessState when replaying an access tuple. @@ -2161,6 +2219,64 @@ func (s *GoogleCloudPolicysimulatorV1alphaResourceContext) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper // ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is // metadata about an OrgPolicyViolationsPreview generations operation. @@ -4590,9 +4706,9 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { s *Service parent string googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview @@ -4601,26 +4717,35 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { header_ http.Header } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. // // - parent: The organization under which this // OrgPolicyViolationsPreview will be created. Example: // `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview = googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview return c } +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4628,21 +4753,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4670,14 +4795,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4708,14 +4833,19 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", // "location": "path", diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index 3ce5ffbaecb..ced87c46128 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -424,39 +424,42 @@ "organizations": { "resources": { "locations": { - "methods": { - "orgPolicyViolationsPreviews": { - "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - "httpMethod": "POST", - "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", - "location": "path", - "pattern": "^organizations/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", - "request": { - "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, "resources": { "orgPolicyViolationsPreviews": { "methods": { + "create": { + "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orgPolicyViolationsPreviewId": { + "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generate": { "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", @@ -1075,7 +1078,7 @@ } } }, - "revision": "20240121", + "revision": "20240218", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1383,6 +1386,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1760,6 +1814,57 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e., when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaExplainedAccess": { "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", "id": "GoogleCloudPolicysimulatorV1betaExplainedAccess", diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index f2dd878daee..aaf8a98da5e 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -268,7 +268,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -276,7 +276,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -942,6 +942,64 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOpera +// tionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe // rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata // is metadata about an OrgPolicyViolationsPreview generations @@ -1537,6 +1595,64 @@ func (s *GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperat +// ionMetadata: CreateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e., when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaExplainedAccess: Details about how a // set of policies, listed in ExplainedPolicy, resulted in a certain // AccessState when replaying an access tuple. @@ -4591,9 +4707,9 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall struct { s *Service parent string googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview @@ -4602,26 +4718,35 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { header_ http.Header } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +// Create: CreateOrgPolicyViolationsPreview creates an +// OrgPolicyViolationsPreview for the proposed changes in the provided +// OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy +// are specified by this `OrgPolicyOverlay`. The resources to scan are +// inferred from these specified changes. // // - parent: The organization under which this // OrgPolicyViolationsPreview will be created. Example: // `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Create(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview return c } +// OrgPolicyViolationsPreviewId sets the optional parameter +// "orgPolicyViolationsPreviewId": An optional user-specified ID for the +// OrgPolicyViolationsPreview. If not provided, a random ID will be +// generated. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) OrgPolicyViolationsPreviewId(orgPolicyViolationsPreviewId string) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { + c.urlParams_.Set("orgPolicyViolationsPreviewId", orgPolicyViolationsPreviewId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4629,21 +4754,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4671,14 +4796,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4709,14 +4834,19 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "orgPolicyViolationsPreviewId": { + // "description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", // "location": "path", diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index cca8c46ea94..a49ea7f8215 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -1573,7 +1573,7 @@ } } }, - "revision": "20240126", + "revision": "20240208", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1631,7 +1631,7 @@ "Default value. This value is unused.", "Ingestion is active.", "Permission denied encountered while consuming data from Kinesis. This can happen if: - The provided `aws_role_arn` does not exist or does not have the appropriate permissions attached. - The provided `aws_role_arn` is not set up properly for Identity Federation using `gcp_service_account`. - The Pub/Sub SA is not granted the `iam.serviceAccounts.getOpenIdToken` permission on `gcp_service_account`.", - "Permission denied encountered while publishing to the topic. This can happen due to Pub/Sub SA has not been granted the [appropriate publish permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)", + "Permission denied encountered while publishing to the topic. This can happen if the Pub/Sub SA has not been granted the [appropriate publish permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)", "The Kinesis stream does not exist.", "The Kinesis consumer does not exist." ], @@ -1653,6 +1653,10 @@ "description": "Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.", "type": "boolean" }, + "serviceAccountEmail": { + "description": "Optional. The service account to use to write to BigQuery. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.", + "type": "string" + }, "state": { "description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.", "enum": [ @@ -1745,6 +1749,10 @@ "format": "google-duration", "type": "string" }, + "serviceAccountEmail": { + "description": "Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.", + "type": "string" + }, "state": { "description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.", "enum": [ diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index d8465f0c508..5aedaa3f35c 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -346,7 +346,7 @@ type AwsKinesis struct { // Pub/Sub SA is not granted the `iam.serviceAccounts.getOpenIdToken` // permission on `gcp_service_account`. // "PUBLISH_PERMISSION_DENIED" - Permission denied encountered while - // publishing to the topic. This can happen due to Pub/Sub SA has not + // publishing to the topic. This can happen if the Pub/Sub SA has not // been granted the [appropriate publish // permissions](https://cloud.google.com/pubsub/docs/access-control#pubsu // b.publisher) @@ -390,6 +390,15 @@ type BigQueryConfig struct { // backlog. DropUnknownFields bool `json:"dropUnknownFields,omitempty"` + // ServiceAccountEmail: Optional. The service account to use to write to + // BigQuery. The subscription creator or updater that specifies this + // field must have `iam.serviceAccounts.actAs` permission on the service + // account. If not specified, the Pub/Sub service agent + // (https://cloud.google.com/iam/docs/service-agents), + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is + // used. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + // State: Output only. An output-only field that indicates whether or // not the subscription can receive messages. // @@ -604,6 +613,15 @@ type CloudStorageConfig struct { // deadline. MaxDuration string `json:"maxDuration,omitempty"` + // ServiceAccountEmail: Optional. The service account to use to write to + // Cloud Storage. The subscription creator or updater that specifies + // this field must have `iam.serviceAccounts.actAs` permission on the + // service account. If not specified, the Pub/Sub service agent + // (https://cloud.google.com/iam/docs/service-agents), + // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is + // used. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + // State: Output only. An output-only field that indicates whether or // not the subscription can receive messages. // diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index e4e35638a5e..1329286a111 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://retail.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Retail", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", + "description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/recommendations", "fullyEncodeReservedExpansion": true, @@ -2087,7 +2087,7 @@ } } }, - "revision": "20240207", + "revision": "20240212", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3089,6 +3089,23 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportMetadata": { + "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2ExportMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2FulfillmentInfo": { "description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.", "id": "GoogleCloudRetailV2FulfillmentInfo", @@ -7271,7 +7288,7 @@ } }, "servicePath": "", - "title": "Retail API", + "title": "Vertex AI Search for Retail API", "version": "v2", "version_module": true } \ No newline at end of file diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 78e570f56ff..36c6fbe5873 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package retail provides access to the Retail API. +// Package retail provides access to the Vertex AI Search for Retail API. // // For product documentation, see: https://cloud.google.com/recommendations // @@ -2279,6 +2279,40 @@ func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportMetadata: Metadata related to the progress +// of the Export operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2ExportMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2FulfillmentInfo: Fulfillment information, such as // the store IDs for in-store pickup or region IDs for different // shipping methods. diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 61b0b91a7ef..9990e196a1d 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://retail.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Retail", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", + "description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/recommendations", "fullyEncodeReservedExpansion": true, @@ -2416,7 +2416,7 @@ } } }, - "revision": "20240207", + "revision": "20240212", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2652,6 +2652,23 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportMetadata": { + "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2ExportMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2GcsOutputResult": { "description": "A Gcs output result.", "id": "GoogleCloudRetailV2GcsOutputResult", @@ -7948,7 +7965,7 @@ } }, "servicePath": "", - "title": "Retail API", + "title": "Vertex AI Search for Retail API", "version": "v2alpha", "version_module": true } \ No newline at end of file diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index dac3d482d50..db043dca6e8 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package retail provides access to the Retail API. +// Package retail provides access to the Vertex AI Search for Retail API. // // For product documentation, see: https://cloud.google.com/recommendations // @@ -847,6 +847,40 @@ func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportMetadata: Metadata related to the progress +// of the Export operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2ExportMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2GcsOutputResult: A Gcs output result. type GoogleCloudRetailV2GcsOutputResult struct { // OutputUri: The uri of Gcs output diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 881b220e939..8d09230d9e9 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://retail.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Retail", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", + "description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/recommendations", "fullyEncodeReservedExpansion": true, @@ -2115,7 +2115,7 @@ } } }, - "revision": "20240207", + "revision": "20240212", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2351,6 +2351,23 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportMetadata": { + "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2ExportMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2GcsOutputResult": { "description": "A Gcs output result.", "id": "GoogleCloudRetailV2GcsOutputResult", @@ -7425,7 +7442,7 @@ } }, "servicePath": "", - "title": "Retail API", + "title": "Vertex AI Search for Retail API", "version": "v2beta", "version_module": true } \ No newline at end of file diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index bf6f4e84c2e..6f5536c7622 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package retail provides access to the Retail API. +// Package retail provides access to the Vertex AI Search for Retail API. // // For product documentation, see: https://cloud.google.com/recommendations // @@ -799,6 +799,40 @@ func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportMetadata: Metadata related to the progress +// of the Export operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2ExportMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2GcsOutputResult: A Gcs output result. type GoogleCloudRetailV2GcsOutputResult struct { // OutputUri: The uri of Gcs output diff --git a/run/v2/run-api.json b/run/v2/run-api.json index f89ba99c200..8f27eb5628a 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1317,7 +1317,7 @@ } } }, - "revision": "20240204", + "revision": "20240211", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -2635,6 +2635,10 @@ ], "type": "string" }, + "healthCheckDisabled": { + "description": "Optional. Disables health checking containers during deployment.", + "type": "boolean" + }, "labels": { "additionalProperties": { "type": "string" @@ -2660,7 +2664,7 @@ "type": "string" }, "sessionAffinity": { - "description": "Enable session affinity.", + "description": "Optional. Enable session affinity.", "type": "boolean" }, "timeout": { diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 1b4dc6296e8..16cbfb407ba 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -2126,6 +2126,10 @@ type GoogleCloudRunV2RevisionTemplate struct { // "EXECUTION_ENVIRONMENT_GEN2" - Uses Second Generation environment. ExecutionEnvironment string `json:"executionEnvironment,omitempty"` + // HealthCheckDisabled: Optional. Disables health checking containers + // during deployment. + HealthCheckDisabled bool `json:"healthCheckDisabled,omitempty"` + // Labels: Unstructured key value map that can be used to organize and // categorize objects. User-provided labels are shared with Google's // billing system, so they can be used to filter, or break down billing @@ -2158,7 +2162,7 @@ type GoogleCloudRunV2RevisionTemplate struct { // default service account. ServiceAccount string `json:"serviceAccount,omitempty"` - // SessionAffinity: Enable session affinity. + // SessionAffinity: Optional. Enable session affinity. SessionAffinity bool `json:"sessionAffinity,omitempty"` // Timeout: Max allowed time for an instance to respond to a request. diff --git a/safebrowsing/v5/safebrowsing-api.json b/safebrowsing/v5/safebrowsing-api.json index f2ad09cc29b..27cb6445189 100644 --- a/safebrowsing/v5/safebrowsing-api.json +++ b/safebrowsing/v5/safebrowsing-api.json @@ -99,14 +99,14 @@ "hashes": { "methods": { "search": { - "description": "Search for full hashes matching the specified prefixes. This is a custom method as described by guidance at https://google.aip.dev/136", + "description": "Search for full hashes matching the specified prefixes. This is a custom method as defined by https://google.aip.dev/136 (the custom method refers to this method having a custom name within Google's general API development nomenclature; it does not refer to using a custom HTTP method).", "flatPath": "v5/hashes:search", "httpMethod": "GET", "id": "safebrowsing.hashes.search", "parameterOrder": [], "parameters": { "hashPrefixes": { - "description": "Required. The hash prefixes to be looked up.", + "description": "Required. The hash prefixes to be looked up. Clients MUST NOT send more than 1000 hash prefixes. However, following the URL processing procedure, clients SHOULD NOT need to send more than 30 hash prefixes. Currently each hash prefix is required to be exactly 4 bytes long. This MAY be relaxed in the future.", "format": "byte", "location": "query", "repeated": true, @@ -121,7 +121,7 @@ } } }, - "revision": "20230923", + "revision": "20240211", "rootUrl": "https://safebrowsing.googleapis.com/", "schemas": { "GoogleSecuritySafebrowsingV5FullHash": { @@ -144,7 +144,7 @@ "type": "object" }, "GoogleSecuritySafebrowsingV5FullHashFullHashDetail": { - "description": "Details about a matching full hash. An important note about forward compatibility: new threat types and threat attributes may be added by the server at any time; those additions are considered minor version changes. It is Google's policy not to expose minor version numbers in APIs (see https://cloud.google.com/apis/design/versioning), so clients MUST be prepared to receive FullHashDetail messages containing ThreatType enum values or ThreatAttribute enum values that are considered invalid by the client. Therefore, it is the client's responsibility to check for the validity of all ThreatType and ThreatAttribute enum values; if any value is considered invalid, the client MUST disregard the entire FullHashDetail message.", + "description": "Details about a matching full hash. An important note about forward compatibility: new threat types and threat attributes may be added by the server at any time; those additions are considered minor version changes. It is Google's policy not to expose minor version numbers in APIs (see https://cloud.google.com/apis/design/versioning for the versioning policy), so clients MUST be prepared to receive `FullHashDetail` messages containing `ThreatType` enum values or `ThreatAttribute` enum values that are considered invalid by the client. Therefore, it is the client's responsibility to check for the validity of all `ThreatType` and `ThreatAttribute` enum values; if any value is considered invalid, the client MUST disregard the entire `FullHashDetail` message.", "id": "GoogleSecuritySafebrowsingV5FullHashFullHashDetail", "properties": { "attributes": { @@ -156,7 +156,7 @@ "FRAME_ONLY" ], "enumDescriptions": [ - "Unknown.", + "Unknown attribute. If this is returned by the server, the client shall disregard the enclosing `FullHashDetail` altogether.", "Indicates that the threat_type should not be used for enforcement.", "Indicates that the threat_type should only be used for enforcement on frames." ], @@ -174,7 +174,7 @@ "POTENTIALLY_HARMFUL_APPLICATION" ], "enumDescriptions": [ - "Unknown.", + "Unknown threat type. If this is returned by the server, the client shall disregard the enclosing `FullHashDetail` altogether.", "Malware threat type.", "Social engineering threat type.", "Unwanted software threat type.", @@ -186,11 +186,11 @@ "type": "object" }, "GoogleSecuritySafebrowsingV5SearchHashesResponse": { - "description": "The response returned after searching threat hashes. Note that if nothing is found, the server will return an OK status (HTTP status code 200) with the `full_hashes` field empty, rather than returning a NOT_FOUND status (HTTP status code 404).", + "description": "The response returned after searching threat hashes. If nothing is found, the server will return an OK status (HTTP status code 200) with the `full_hashes` field empty, rather than returning a NOT_FOUND status (HTTP status code 404). **What's new in V5**: There is a separation between FullHash and FullHashDetail. In the case when a hash represents a site having multiple threats (e.g. both MALWARE and SOCIAL_ENGINEERING), the full hash does not need to be sent twice as in V4. Furthermore, the cache duration has been simplified into a single `cache_duration` field.", "id": "GoogleSecuritySafebrowsingV5SearchHashesResponse", "properties": { "cacheDuration": { - "description": "The client-side cache duration. The client shall add this duration to the current time to determine the expiration time. The expiration time then applies to every hash prefix queried by the client in the request, regardless of how many full hashes are returned in the response. Even if the server returns no full hashes for a particular hash prefix, this fact should also be cached by the client. Important: the client must not assume that the server will return the same cache duration for all responses. The server may choose different cache durations for different responses depending on the situation.", + "description": "The client-side cache duration. The client MUST add this duration to the current time to determine the expiration time. The expiration time then applies to every hash prefix queried by the client in the request, regardless of how many full hashes are returned in the response. Even if the server returns no full hashes for a particular hash prefix, this fact MUST also be cached by the client. Important: the client MUST NOT assume that the server will return the same cache duration for all responses. The server MAY choose different cache durations for different responses depending on the situation.", "format": "google-duration", "type": "string" }, diff --git a/safebrowsing/v5/safebrowsing-gen.go b/safebrowsing/v5/safebrowsing-gen.go index 082768ddd44..97ab1783c13 100644 --- a/safebrowsing/v5/safebrowsing-gen.go +++ b/safebrowsing/v5/safebrowsing-gen.go @@ -191,19 +191,22 @@ func (s *GoogleSecuritySafebrowsingV5FullHash) MarshalJSON() ([]byte, error) { // new threat types and threat attributes may be added by the server at // any time; those additions are considered minor version changes. It is // Google's policy not to expose minor version numbers in APIs (see -// https://cloud.google.com/apis/design/versioning), so clients MUST be -// prepared to receive FullHashDetail messages containing ThreatType -// enum values or ThreatAttribute enum values that are considered -// invalid by the client. Therefore, it is the client's responsibility -// to check for the validity of all ThreatType and ThreatAttribute enum -// values; if any value is considered invalid, the client MUST disregard -// the entire FullHashDetail message. +// https://cloud.google.com/apis/design/versioning for the versioning +// policy), so clients MUST be prepared to receive `FullHashDetail` +// messages containing `ThreatType` enum values or `ThreatAttribute` +// enum values that are considered invalid by the client. Therefore, it +// is the client's responsibility to check for the validity of all +// `ThreatType` and `ThreatAttribute` enum values; if any value is +// considered invalid, the client MUST disregard the entire +// `FullHashDetail` message. type GoogleSecuritySafebrowsingV5FullHashFullHashDetail struct { // Attributes: Unordered list. Additional attributes about those full // hashes. This may be empty. // // Possible values: - // "THREAT_ATTRIBUTE_UNSPECIFIED" - Unknown. + // "THREAT_ATTRIBUTE_UNSPECIFIED" - Unknown attribute. If this is + // returned by the server, the client shall disregard the enclosing + // `FullHashDetail` altogether. // "CANARY" - Indicates that the threat_type should not be used for // enforcement. // "FRAME_ONLY" - Indicates that the threat_type should only be used @@ -213,7 +216,9 @@ type GoogleSecuritySafebrowsingV5FullHashFullHashDetail struct { // ThreatType: The type of threat. This field will never be empty. // // Possible values: - // "THREAT_TYPE_UNSPECIFIED" - Unknown. + // "THREAT_TYPE_UNSPECIFIED" - Unknown threat type. If this is + // returned by the server, the client shall disregard the enclosing + // `FullHashDetail` altogether. // "MALWARE" - Malware threat type. // "SOCIAL_ENGINEERING" - Social engineering threat type. // "UNWANTED_SOFTWARE" - Unwanted software threat type. @@ -245,19 +250,24 @@ func (s *GoogleSecuritySafebrowsingV5FullHashFullHashDetail) MarshalJSON() ([]by } // GoogleSecuritySafebrowsingV5SearchHashesResponse: The response -// returned after searching threat hashes. Note that if nothing is -// found, the server will return an OK status (HTTP status code 200) -// with the `full_hashes` field empty, rather than returning a NOT_FOUND -// status (HTTP status code 404). +// returned after searching threat hashes. If nothing is found, the +// server will return an OK status (HTTP status code 200) with the +// `full_hashes` field empty, rather than returning a NOT_FOUND status +// (HTTP status code 404). **What's new in V5**: There is a separation +// between FullHash and FullHashDetail. In the case when a hash +// represents a site having multiple threats (e.g. both MALWARE and +// SOCIAL_ENGINEERING), the full hash does not need to be sent twice as +// in V4. Furthermore, the cache duration has been simplified into a +// single `cache_duration` field. type GoogleSecuritySafebrowsingV5SearchHashesResponse struct { - // CacheDuration: The client-side cache duration. The client shall add + // CacheDuration: The client-side cache duration. The client MUST add // this duration to the current time to determine the expiration time. // The expiration time then applies to every hash prefix queried by the // client in the request, regardless of how many full hashes are // returned in the response. Even if the server returns no full hashes - // for a particular hash prefix, this fact should also be cached by the - // client. Important: the client must not assume that the server will - // return the same cache duration for all responses. The server may + // for a particular hash prefix, this fact MUST also be cached by the + // client. Important: the client MUST NOT assume that the server will + // return the same cache duration for all responses. The server MAY // choose different cache durations for different responses depending on // the situation. CacheDuration string `json:"cacheDuration,omitempty"` @@ -303,15 +313,21 @@ type HashesSearchCall struct { } // Search: Search for full hashes matching the specified prefixes. This -// is a custom method as described by guidance at -// https://google.aip.dev/136 +// is a custom method as defined by https://google.aip.dev/136 (the +// custom method refers to this method having a custom name within +// Google's general API development nomenclature; it does not refer to +// using a custom HTTP method). func (r *HashesService) Search() *HashesSearchCall { c := &HashesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } // HashPrefixes sets the optional parameter "hashPrefixes": Required. -// The hash prefixes to be looked up. +// The hash prefixes to be looked up. Clients MUST NOT send more than +// 1000 hash prefixes. However, following the URL processing procedure, +// clients SHOULD NOT need to send more than 30 hash prefixes. Currently +// each hash prefix is required to be exactly 4 bytes long. This MAY be +// relaxed in the future. func (c *HashesSearchCall) HashPrefixes(hashPrefixes ...string) *HashesSearchCall { c.urlParams_.SetMulti("hashPrefixes", append([]string{}, hashPrefixes...)) return c @@ -415,14 +431,14 @@ func (c *HashesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleSecuritySafe } return ret, nil // { - // "description": "Search for full hashes matching the specified prefixes. This is a custom method as described by guidance at https://google.aip.dev/136", + // "description": "Search for full hashes matching the specified prefixes. This is a custom method as defined by https://google.aip.dev/136 (the custom method refers to this method having a custom name within Google's general API development nomenclature; it does not refer to using a custom HTTP method).", // "flatPath": "v5/hashes:search", // "httpMethod": "GET", // "id": "safebrowsing.hashes.search", // "parameterOrder": [], // "parameters": { // "hashPrefixes": { - // "description": "Required. The hash prefixes to be looked up.", + // "description": "Required. The hash prefixes to be looked up. Clients MUST NOT send more than 1000 hash prefixes. However, following the URL processing procedure, clients SHOULD NOT need to send more than 30 hash prefixes. Currently each hash prefix is required to be exactly 4 bytes long. This MAY be relaxed in the future.", // "format": "byte", // "location": "query", // "repeated": true, diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 507edd28fa5..447d2e9f9b2 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240205", + "revision": "20240216", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5223,7 +5223,9 @@ "UNABLE_TO_VERIFY_DEFINERS", "SUBSCRIPTION_CALCULATION_STATUS", "PG_SUBSCRIPTION_COUNT", - "PG_SYNC_PARALLEL_LEVEL" + "PG_SYNC_PARALLEL_LEVEL", + "INSUFFICIENT_DISK_SIZE", + "INSUFFICIENT_MACHINE_TIER" ], "enumDescriptions": [ "", @@ -5268,7 +5270,9 @@ "Unable to verify definers on the source for MySQL.", "If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", "Count of subscriptions needed to sync source data for PostgreSQL database.", - "Final parallel level that is used to do migration." + "Final parallel level that is used to do migration.", + "The disk size of the replica instance is smaller than the data size of the source instance.", + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 8cf1ce79f65..e80983a70c5 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -4385,6 +4385,11 @@ type SqlExternalSyncSettingError struct { // source data for PostgreSQL database. // "PG_SYNC_PARALLEL_LEVEL" - Final parallel level that is used to do // migration. + // "INSUFFICIENT_DISK_SIZE" - The disk size of the replica instance is + // smaller than the data size of the source instance. + // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance + // is greater than 1 TB, the number of cores of the replica instance is + // less than 8, and the memory of the replica is less than 32 GB. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index af9071f1943..45524f0a693 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240205", + "revision": "20240216", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5224,7 +5224,9 @@ "UNABLE_TO_VERIFY_DEFINERS", "SUBSCRIPTION_CALCULATION_STATUS", "PG_SUBSCRIPTION_COUNT", - "PG_SYNC_PARALLEL_LEVEL" + "PG_SYNC_PARALLEL_LEVEL", + "INSUFFICIENT_DISK_SIZE", + "INSUFFICIENT_MACHINE_TIER" ], "enumDescriptions": [ "", @@ -5269,7 +5271,9 @@ "Unable to verify definers on the source for MySQL.", "If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", "Count of subscriptions needed to sync source data for PostgreSQL database.", - "Final parallel level that is used to do migration." + "Final parallel level that is used to do migration.", + "The disk size of the replica instance is smaller than the data size of the source instance.", + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 1c7d16da35e..707aff3929d 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -4389,6 +4389,11 @@ type SqlExternalSyncSettingError struct { // source data for PostgreSQL database. // "PG_SYNC_PARALLEL_LEVEL" - Final parallel level that is used to do // migration. + // "INSUFFICIENT_DISK_SIZE" - The disk size of the replica instance is + // smaller than the data size of the source instance. + // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance + // is greater than 1 TB, the number of cores of the replica instance is + // less than 8, and the memory of the replica is less than 32 GB. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 6535d954c78..cb34638d2be 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -33,7 +33,7 @@ "location": "me-central2" } ], - "etag": "\"3136303536373738333537393834303934353433\"", + "etag": "\"3135323132313733303039343736303631393739\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -1632,11 +1632,6 @@ "managedFolder" ], "parameters": { - "allowNonEmpty": { - "description": "Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission.", - "location": "query", - "type": "boolean" - }, "bucket": { "description": "Name of the bucket containing the managed folder.", "location": "path", @@ -4045,7 +4040,7 @@ } } }, - "revision": "20240205", + "revision": "20240209", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AnywhereCache": { @@ -4858,6 +4853,11 @@ "description": "The name of the bucket containing this folder.", "type": "string" }, + "createTime": { + "description": "The creation time of the folder in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, "id": { "description": "The ID of the folder, including the bucket name, folder name.", "type": "string" @@ -4890,12 +4890,7 @@ "description": "The link to this folder.", "type": "string" }, - "timeCreated": { - "description": "The creation time of the folder in RFC 3339 format.", - "format": "date-time", - "type": "string" - }, - "updated": { + "updateTime": { "description": "The modification time of the folder metadata in RFC 3339 format.", "format": "date-time", "type": "string" diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index f540f7c8382..6f01795faa9 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -1853,6 +1853,9 @@ type Folder struct { // Bucket: The name of the bucket containing this folder. Bucket string `json:"bucket,omitempty"` + // CreateTime: The creation time of the folder in RFC 3339 format. + CreateTime string `json:"createTime,omitempty"` + // Id: The ID of the folder, including the bucket name, folder name. Id string `json:"id,omitempty"` @@ -1876,12 +1879,9 @@ type Folder struct { // SelfLink: The link to this folder. SelfLink string `json:"selfLink,omitempty"` - // TimeCreated: The creation time of the folder in RFC 3339 format. - TimeCreated string `json:"timeCreated,omitempty"` - - // Updated: The modification time of the folder metadata in RFC 3339 + // UpdateTime: The modification time of the folder metadata in RFC 3339 // format. - Updated string `json:"updated,omitempty"` + UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -9452,16 +9452,6 @@ func (r *ManagedFoldersService) Delete(bucket string, managedFolder string) *Man return c } -// AllowNonEmpty sets the optional parameter "allowNonEmpty": Allows the -// deletion of a managed folder even if it is not empty. A managed -// folder is empty if there are no objects or managed folders that it -// applies to. Callers must have storage.managedFolders.setIamPolicy -// permission. -func (c *ManagedFoldersDeleteCall) AllowNonEmpty(allowNonEmpty bool) *ManagedFoldersDeleteCall { - c.urlParams_.Set("allowNonEmpty", fmt.Sprint(allowNonEmpty)) - return c -} - // IfMetagenerationMatch sets the optional parameter // "ifMetagenerationMatch": If set, only deletes the managed folder if // its metageneration matches this value. @@ -9548,11 +9538,6 @@ func (c *ManagedFoldersDeleteCall) Do(opts ...googleapi.CallOption) error { // "managedFolder" // ], // "parameters": { - // "allowNonEmpty": { - // "description": "Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission.", - // "location": "query", - // "type": "boolean" - // }, // "bucket": { // "description": "Name of the bucket containing the managed folder.", // "location": "path", diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 983efc144a2..78f9e81737b 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -632,7 +632,7 @@ } } }, - "revision": "20240209", + "revision": "20240217", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -794,6 +794,21 @@ }, "type": "object" }, + "BatchTaskSpec": { + "id": "BatchTaskSpec", + "properties": { + "deleteObjectTaskSpec": { + "$ref": "DeleteObjectTaskSpec" + }, + "listTaskSpec": { + "$ref": "ListTaskSpec" + }, + "metadataTaskSpec": { + "$ref": "MetadataTaskSpec" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -822,6 +837,26 @@ }, "type": "object" }, + "DeleteObjectTaskSpec": { + "id": "DeleteObjectTaskSpec", + "properties": { + "generation": { + "format": "int64", + "type": "string" + }, + "hardDeleteVersionedObject": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "size": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1020,6 +1055,18 @@ }, "type": "object" }, + "ListTaskSpec": { + "id": "ListTaskSpec", + "properties": { + "manifest": { + "$ref": "Manifest" + }, + "objectPrefixes": { + "$ref": "ObjectPrefixes" + } + }, + "type": "object" + }, "ListTransferJobsResponse": { "description": "Response from ListTransferJobs.", "id": "ListTransferJobsResponse", @@ -1085,6 +1132,18 @@ }, "type": "object" }, + "Manifest": { + "id": "Manifest", + "properties": { + "manifestLocation": { + "type": "string" + }, + "root": { + "type": "string" + } + }, + "type": "object" + }, "MetadataOptions": { "description": "Specifies the metadata options for running a transfer.", "id": "MetadataOptions", @@ -1196,7 +1255,7 @@ "type": "string" }, "timeCreated": { - "description": "Specifies how each object's `timeCreated` metadata is preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as TIME_CREATED_SKIP.", + "description": "Specifies how each object's `timeCreated` metadata is preserved for transfers. If unspecified, the default behavior is the same as TIME_CREATED_SKIP.", "enum": [ "TIME_CREATED_UNSPECIFIED", "TIME_CREATED_SKIP", @@ -1205,7 +1264,7 @@ "enumDescriptions": [ "TimeCreated behavior is unspecified.", "Do not preserve the `timeCreated` metadata from the source object.", - "Preserves the source object's `timeCreated` metadata in the `customTime` field in the destination object. Note that any value stored in the source object's `customTime` field will not be propagated to the destination object." + "Preserves the source object's `timeCreated` or `lastModified` metadata in the `customTime` field in the destination object. Note that any value stored in the source object's `customTime` field will not be propagated to the destination object." ], "type": "string" }, @@ -1226,6 +1285,26 @@ }, "type": "object" }, + "MetadataTaskSpec": { + "id": "MetadataTaskSpec", + "properties": { + "bucketName": { + "type": "string" + }, + "generation": { + "format": "int64", + "type": "string" + }, + "key": { + "type": "string" + }, + "size": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "NotificationConfig": { "description": "Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following `PubsubMessage.attributes`: * `\"eventType\"`: one of the EventType values * `\"payloadFormat\"`: one of the PayloadFormat values * `\"projectId\"`: the project_id of the `TransferOperation` * `\"transferJobName\"`: the transfer_job_name of the `TransferOperation` * `\"transferOperationName\"`: the name of the `TransferOperation` The `PubsubMessage.data` contains a TransferOperation resource formatted according to the specified `PayloadFormat`.", "id": "NotificationConfig", @@ -1311,6 +1390,30 @@ }, "type": "object" }, + "ObjectPrefix": { + "id": "ObjectPrefix", + "properties": { + "bucketName": { + "type": "string" + }, + "objectPrefix": { + "type": "string" + } + }, + "type": "object" + }, + "ObjectPrefixes": { + "id": "ObjectPrefixes", + "properties": { + "objectPrefixes": { + "items": { + "$ref": "ObjectPrefix" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index cef13f25f44..be9e06f7dc4 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -544,6 +544,38 @@ func (s *BandwidthLimit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BatchTaskSpec struct { + DeleteObjectTaskSpec *DeleteObjectTaskSpec `json:"deleteObjectTaskSpec,omitempty"` + + ListTaskSpec *ListTaskSpec `json:"listTaskSpec,omitempty"` + + MetadataTaskSpec *MetadataTaskSpec `json:"metadataTaskSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DeleteObjectTaskSpec") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeleteObjectTaskSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod BatchTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -596,6 +628,38 @@ func (s *Date) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DeleteObjectTaskSpec struct { + Generation int64 `json:"generation,omitempty,string"` + + HardDeleteVersionedObject bool `json:"hardDeleteVersionedObject,omitempty"` + + Name string `json:"name,omitempty"` + + Size int64 `json:"size,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Generation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Generation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteObjectTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod DeleteObjectTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1050,6 +1114,34 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ListTaskSpec struct { + Manifest *Manifest `json:"manifest,omitempty"` + + ObjectPrefixes *ObjectPrefixes `json:"objectPrefixes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Manifest") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Manifest") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod ListTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListTransferJobsResponse: Response from ListTransferJobs. type ListTransferJobsResponse struct { // NextPageToken: The list next page token. @@ -1151,6 +1243,35 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Manifest struct { + ManifestLocation string `json:"manifestLocation,omitempty"` + + Root string `json:"root,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ManifestLocation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ManifestLocation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Manifest) MarshalJSON() ([]byte, error) { + type NoMethod Manifest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetadataOptions: Specifies the metadata options for running a // transfer. type MetadataOptions struct { @@ -1251,17 +1372,18 @@ type MetadataOptions struct { TemporaryHold string `json:"temporaryHold,omitempty"` // TimeCreated: Specifies how each object's `timeCreated` metadata is - // preserved for transfers between Google Cloud Storage buckets. If - // unspecified, the default behavior is the same as TIME_CREATED_SKIP. + // preserved for transfers. If unspecified, the default behavior is the + // same as TIME_CREATED_SKIP. // // Possible values: // "TIME_CREATED_UNSPECIFIED" - TimeCreated behavior is unspecified. // "TIME_CREATED_SKIP" - Do not preserve the `timeCreated` metadata // from the source object. // "TIME_CREATED_PRESERVE_AS_CUSTOM_TIME" - Preserves the source - // object's `timeCreated` metadata in the `customTime` field in the - // destination object. Note that any value stored in the source object's - // `customTime` field will not be propagated to the destination object. + // object's `timeCreated` or `lastModified` metadata in the `customTime` + // field in the destination object. Note that any value stored in the + // source object's `customTime` field will not be propagated to the + // destination object. TimeCreated string `json:"timeCreated,omitempty"` // Uid: Specifies how each file's POSIX user ID (UID) attribute should @@ -1298,6 +1420,38 @@ func (s *MetadataOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type MetadataTaskSpec struct { + BucketName string `json:"bucketName,omitempty"` + + Generation int64 `json:"generation,omitempty,string"` + + Key string `json:"key,omitempty"` + + Size int64 `json:"size,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BucketName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MetadataTaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod MetadataTaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NotificationConfig: Specification to configure notifications // published to Pub/Sub. Notifications are published to the // customer-provided topic using the following @@ -1476,6 +1630,61 @@ func (s *ObjectConditions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ObjectPrefix struct { + BucketName string `json:"bucketName,omitempty"` + + ObjectPrefix string `json:"objectPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ObjectPrefix) MarshalJSON() ([]byte, error) { + type NoMethod ObjectPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ObjectPrefixes struct { + ObjectPrefixes []*ObjectPrefix `json:"objectPrefixes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ObjectPrefixes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ObjectPrefixes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ObjectPrefixes) MarshalJSON() ([]byte, error) { + type NoMethod ObjectPrefixes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 470922f64ef..778a224db96 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -448,7 +448,7 @@ } } }, - "revision": "20240206", + "revision": "20240213", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -1900,6 +1900,12 @@ "description": "Output only. Identifies supported clients for DirectAccess for this Android version.", "readOnly": true }, + "interactiveDeviceAvailabilityEstimate": { + "description": "Output only. The estimated wait time for a single interactive device session using Direct Access.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, "versionId": { "description": "An Android version.", "type": "string" diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index 93bbce81ad1..65c59fb3912 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -2516,6 +2516,11 @@ type PerAndroidVersionInfo struct { // for DirectAccess for this Android version. DirectAccessVersionInfo *DirectAccessVersionInfo `json:"directAccessVersionInfo,omitempty"` + // InteractiveDeviceAvailabilityEstimate: Output only. The estimated + // wait time for a single interactive device session using Direct + // Access. + InteractiveDeviceAvailabilityEstimate string `json:"interactiveDeviceAvailabilityEstimate,omitempty"` + // VersionId: An Android version. VersionId string `json:"versionId,omitempty"` diff --git a/trafficdirector/v3/trafficdirector-api.json b/trafficdirector/v3/trafficdirector-api.json index 1a072df0ee3..6a2ba86d0fe 100644 --- a/trafficdirector/v3/trafficdirector-api.json +++ b/trafficdirector/v3/trafficdirector-api.json @@ -128,7 +128,7 @@ } } }, - "revision": "20240201", + "revision": "20240214", "rootUrl": "https://trafficdirector.googleapis.com/", "schemas": { "Address": { diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index c4f3c93671d..20d8ed8626a 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20240124", + "revision": "20240207", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -902,10 +902,24 @@ "type": "string" }, "frameRate": { - "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Will default to the input frame rate if larger than the input frame rate. The API will generate an output FPS that is divisible by the input FPS, and smaller or equal to the target FPS. See [Calculating frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more information.", + "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", "format": "double", "type": "number" }, + "frameRateConversionStrategy": { + "description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", + "enum": [ + "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", + "DOWNSAMPLE", + "DROP_DUPLICATE" + ], + "enumDescriptions": [ + "Unspecified frame rate conversion strategy.", + "Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ \u003e 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", + "Drop or duplicate frames to match the specified frame rate." + ], + "type": "string" + }, "gopDuration": { "description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", "format": "google-duration", @@ -1016,10 +1030,24 @@ "type": "boolean" }, "frameRate": { - "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Will default to the input frame rate if larger than the input frame rate. The API will generate an output FPS that is divisible by the input FPS, and smaller or equal to the target FPS. See [Calculating frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more information.", + "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", "format": "double", "type": "number" }, + "frameRateConversionStrategy": { + "description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", + "enum": [ + "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", + "DOWNSAMPLE", + "DROP_DUPLICATE" + ], + "enumDescriptions": [ + "Unspecified frame rate conversion strategy.", + "Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ \u003e 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", + "Drop or duplicate frames to match the specified frame rate." + ], + "type": "string" + }, "gopDuration": { "description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", "format": "google-duration", @@ -1816,10 +1844,24 @@ "type": "integer" }, "frameRate": { - "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Will default to the input frame rate if larger than the input frame rate. The API will generate an output FPS that is divisible by the input FPS, and smaller or equal to the target FPS. See [Calculating frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more information.", + "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", "format": "double", "type": "number" }, + "frameRateConversionStrategy": { + "description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", + "enum": [ + "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", + "DOWNSAMPLE", + "DROP_DUPLICATE" + ], + "enumDescriptions": [ + "Unspecified frame rate conversion strategy.", + "Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ \u003e 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", + "Drop or duplicate frames to match the specified frame rate." + ], + "type": "string" + }, "gopDuration": { "description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", "format": "google-duration", diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index 1a5eb32d74e..099072eaed4 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -1135,14 +1135,27 @@ type H264CodecSettings struct { EntropyCoder string `json:"entropyCoder,omitempty"` // FrameRate: Required. The target video frame rate in frames per second - // (FPS). Must be less than or equal to 120. Will default to the input - // frame rate if larger than the input frame rate. The API will generate - // an output FPS that is divisible by the input FPS, and smaller or - // equal to the target FPS. See Calculating frame rate - // (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - // more information. + // (FPS). Must be less than or equal to 120. FrameRate float64 `json:"frameRate,omitempty"` + // FrameRateConversionStrategy: Optional. Frame rate conversion strategy + // for desired frame rate. The default is `DOWNSAMPLE`. + // + // Possible values: + // "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED" - Unspecified frame + // rate conversion strategy. + // "DOWNSAMPLE" - Selectively retain frames to reduce the output frame + // rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / + // target frame rate)`. When _n_ = 1 (that is, the target frame rate is + // greater than the input frame rate), the output frame rate matches the + // input frame rate. When _n_ > 1, frames are dropped and the output + // frame rate is equal to `(input frame rate / n)`. For more + // information, see [Calculate frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). + // "DROP_DUPLICATE" - Drop or duplicate frames to match the specified + // frame rate. + FrameRateConversionStrategy string `json:"frameRateConversionStrategy,omitempty"` + // GopDuration: Select the GOP size based on the specified duration. The // default is `3s`. Note that `gopDuration` must be less than or equal // to `segmentDuration` (#SegmentSettings), and `segmentDuration` @@ -1308,14 +1321,27 @@ type H265CodecSettings struct { EnableTwoPass bool `json:"enableTwoPass,omitempty"` // FrameRate: Required. The target video frame rate in frames per second - // (FPS). Must be less than or equal to 120. Will default to the input - // frame rate if larger than the input frame rate. The API will generate - // an output FPS that is divisible by the input FPS, and smaller or - // equal to the target FPS. See Calculating frame rate - // (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - // more information. + // (FPS). Must be less than or equal to 120. FrameRate float64 `json:"frameRate,omitempty"` + // FrameRateConversionStrategy: Optional. Frame rate conversion strategy + // for desired frame rate. The default is `DOWNSAMPLE`. + // + // Possible values: + // "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED" - Unspecified frame + // rate conversion strategy. + // "DOWNSAMPLE" - Selectively retain frames to reduce the output frame + // rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / + // target frame rate)`. When _n_ = 1 (that is, the target frame rate is + // greater than the input frame rate), the output frame rate matches the + // input frame rate. When _n_ > 1, frames are dropped and the output + // frame rate is equal to `(input frame rate / n)`. For more + // information, see [Calculate frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). + // "DROP_DUPLICATE" - Drop or duplicate frames to match the specified + // frame rate. + FrameRateConversionStrategy string `json:"frameRateConversionStrategy,omitempty"` + // GopDuration: Select the GOP size based on the specified duration. The // default is `3s`. Note that `gopDuration` must be less than or equal // to `segmentDuration` (#SegmentSettings), and `segmentDuration` @@ -2560,14 +2586,27 @@ type Vp9CodecSettings struct { CrfLevel int64 `json:"crfLevel,omitempty"` // FrameRate: Required. The target video frame rate in frames per second - // (FPS). Must be less than or equal to 120. Will default to the input - // frame rate if larger than the input frame rate. The API will generate - // an output FPS that is divisible by the input FPS, and smaller or - // equal to the target FPS. See Calculating frame rate - // (https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - // more information. + // (FPS). Must be less than or equal to 120. FrameRate float64 `json:"frameRate,omitempty"` + // FrameRateConversionStrategy: Optional. Frame rate conversion strategy + // for desired frame rate. The default is `DOWNSAMPLE`. + // + // Possible values: + // "FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED" - Unspecified frame + // rate conversion strategy. + // "DOWNSAMPLE" - Selectively retain frames to reduce the output frame + // rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / + // target frame rate)`. When _n_ = 1 (that is, the target frame rate is + // greater than the input frame rate), the output frame rate matches the + // input frame rate. When _n_ > 1, frames are dropped and the output + // frame rate is equal to `(input frame rate / n)`. For more + // information, see [Calculate frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate). + // "DROP_DUPLICATE" - Drop or duplicate frames to match the specified + // frame rate. + FrameRateConversionStrategy string `json:"frameRateConversionStrategy,omitempty"` + // GopDuration: Select the GOP size based on the specified duration. The // default is `3s`. Note that `gopDuration` must be less than or equal // to `segmentDuration` (#SegmentSettings), and `segmentDuration` diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index e66b1fbaa5b..3b93de33dd8 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -772,6 +772,33 @@ }, "genericclass": { "methods": { + "addmessage": { + "description": "Adds a message to the generic class referenced by the given class ID.", + "flatPath": "walletobjects/v1/genericClass/{resourceId}/addMessage", + "httpMethod": "POST", + "id": "walletobjects.genericclass.addmessage", + "parameterOrder": [ + "resourceId" + ], + "parameters": { + "resourceId": { + "description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "walletobjects/v1/genericClass/{resourceId}/addMessage", + "request": { + "$ref": "AddMessageRequest" + }, + "response": { + "$ref": "GenericClassAddMessageResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/wallet_object.issuer" + ] + }, "get": { "description": "Returns the generic class with the given class ID.", "flatPath": "walletobjects/v1/genericClass/{resourceId}", @@ -905,6 +932,33 @@ }, "genericobject": { "methods": { + "addmessage": { + "description": "Adds a message to the generic object referenced by the given object ID.", + "flatPath": "walletobjects/v1/genericObject/{resourceId}/addMessage", + "httpMethod": "POST", + "id": "walletobjects.genericobject.addmessage", + "parameterOrder": [ + "resourceId" + ], + "parameters": { + "resourceId": { + "description": "The unique identifier for an object. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "walletobjects/v1/genericObject/{resourceId}/addMessage", + "request": { + "$ref": "AddMessageRequest" + }, + "response": { + "$ref": "GenericObjectAddMessageResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/wallet_object.issuer" + ] + }, "get": { "description": "Returns the generic object with the given object ID.", "flatPath": "walletobjects/v1/genericObject/{resourceId}", @@ -2625,39 +2679,9 @@ ] } } - }, - "walletobjects": { - "resources": { - "v1": { - "resources": { - "privateContent": { - "methods": { - "uploadPrivateData": { - "description": "Upload private data (text or URI) and returns an Id to be used in its place.", - "flatPath": "walletobjects/v1/privateContent/uploadPrivateData", - "httpMethod": "POST", - "id": "walletobjects.walletobjects.v1.privateContent.uploadPrivateData", - "parameterOrder": [], - "parameters": {}, - "path": "walletobjects/v1/privateContent/uploadPrivateData", - "request": { - "$ref": "UploadPrivateDataRequest" - }, - "response": { - "$ref": "UploadPrivateDataResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/wallet_object.issuer" - ] - } - } - } - } - } - } } }, - "revision": "20240206", + "revision": "20240220", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -2786,9 +2810,13 @@ "AppLinkDataAppLinkInfoAppTarget": { "id": "AppLinkDataAppLinkInfoAppTarget", "properties": { + "packageName": { + "description": "Package name for AppTarget. For example: com.google.android.gm", + "type": "string" + }, "targetUri": { "$ref": "Uri", - "description": "URI for AppTarget. The description on the URI must be set." + "description": "URI for AppTarget. The description on the URI must be set. Prefer setting package field instead, if this target is defined for your application." } }, "type": "object" @@ -3909,7 +3937,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -4685,7 +4713,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -5087,6 +5115,13 @@ "$ref": "LinksModuleData", "description": "Links module data. If `linksModuleData` is also defined on the object, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object." }, + "messages": { + "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", + "items": { + "$ref": "Message" + }, + "type": "array" + }, "multipleDevicesAndHoldersAllowedStatus": { "description": "Identifies whether multiple users and devices will save the same object referencing this class.", "enum": [ @@ -5109,7 +5144,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -5154,6 +5189,17 @@ }, "type": "object" }, + "GenericClassAddMessageResponse": { + "description": "Response to adding a new issuer message to the class. This contains the entire updated GenericClass.", + "id": "GenericClassAddMessageResponse", + "properties": { + "resource": { + "$ref": "GenericClass", + "description": "The updated EventTicketClass resource." + } + }, + "type": "object" + }, "GenericClassListResponse": { "description": "List response which contains the list of all generic classes for a given issuer ID.", "id": "GenericClassListResponse", @@ -5340,6 +5386,17 @@ }, "type": "object" }, + "GenericObjectAddMessageResponse": { + "description": "Response to adding a new issuer message to the object. This contains the entire updated GenericObject.", + "id": "GenericObjectAddMessageResponse", + "properties": { + "resource": { + "$ref": "GenericObject", + "description": "The updated GenericObject resource." + } + }, + "type": "object" + }, "GenericObjectListResponse": { "description": "List response which contains the list of all generic objects for a given issuer ID.", "id": "GenericObjectListResponse", @@ -5495,7 +5552,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -6300,7 +6357,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -6960,7 +7017,7 @@ "description": "Translated strings for the message header." }, "messageType": { - "description": "The type of the message. Currently, this can only be set for offers.", + "description": "The message type.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "TEXT", @@ -7209,7 +7266,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -7680,36 +7737,6 @@ }, "type": "object" }, - "PrivateText": { - "description": "Private data for TextModule. This data will be rendered as a TextModule for a pass.", - "id": "PrivateText", - "properties": { - "body": { - "$ref": "LocalizedString", - "description": "Translated strings for the body." - }, - "header": { - "$ref": "LocalizedString", - "description": "Translated strings for the header." - } - }, - "type": "object" - }, - "PrivateUri": { - "description": "Private data for LinkModule. This data will be rendered as the LinkModule for a pass.", - "id": "PrivateUri", - "properties": { - "description": { - "$ref": "LocalizedString", - "description": "The URI's title appearing in the app as text and its translated strings. Recommended maximum is 20 characters to ensure the full string is displayed on smaller screens." - }, - "uri": { - "description": "The location of a web page, image, or other resource. URIs in the `LinksModuleData` can have different prefixes indicating the type of URI (a link to a web page, a link to a map, a telephone number, or an email address).", - "type": "string" - } - }, - "type": "object" - }, "PurchaseDetails": { "id": "PurchaseDetails", "properties": { @@ -8563,7 +8590,7 @@ ], "enumDescriptions": [ "Unspecified preference.", - "The same object can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", + "The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", "An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", "An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", "Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", @@ -9124,65 +9151,6 @@ }, "type": "object" }, - "UploadPrivateDataRequest": { - "description": "Request for sending user private Text or URI by the Issuer.", - "id": "UploadPrivateDataRequest", - "properties": { - "issuerId": { - "description": "The ID of the issuer sending the data.", - "format": "int64", - "type": "string" - }, - "text": { - "$ref": "PrivateText", - "description": "Private text data of the user." - }, - "uri": { - "$ref": "PrivateUri", - "description": "Private URIs of the user." - } - }, - "type": "object" - }, - "UploadPrivateDataResponse": { - "description": "Response for uploading user private data (text or URIs)", - "id": "UploadPrivateDataResponse", - "properties": { - "privateContentId": { - "description": "A 64-bit content id for the private data that was uploaded by the Issuer.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "UploadPrivateImageRequest": { - "description": "Request to upload user's private images by Issuers to be used in passes.", - "id": "UploadPrivateImageRequest", - "properties": { - "blob": { - "$ref": "Media", - "description": "A reference to the image payload that was uploaded by Scotty." - }, - "mediaRequestInfo": { - "$ref": "MediaRequestInfo", - "description": "Extra information about the uploaded media." - } - }, - "type": "object" - }, - "UploadPrivateImageResponse": { - "description": "Response for uploading the private image", - "id": "UploadPrivateImageResponse", - "properties": { - "privateContentId": { - "description": "A 64-bit content id for the image that was uploaded by the Issuer.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "Uri": { "id": "Uri", "properties": { diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index f4d357a2463..c0bc3a65c70 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -154,7 +154,6 @@ func New(client *http.Client) (*Service, error) { s.Smarttap = NewSmarttapService(s) s.Transitclass = NewTransitclassService(s) s.Transitobject = NewTransitobjectService(s) - s.Walletobjects = NewWalletobjectsService(s) return s, nil } @@ -200,8 +199,6 @@ type Service struct { Transitclass *TransitclassService Transitobject *TransitobjectService - - Walletobjects *WalletobjectsService } func (s *Service) userAgent() string { @@ -382,39 +379,6 @@ type TransitobjectService struct { s *Service } -func NewWalletobjectsService(s *Service) *WalletobjectsService { - rs := &WalletobjectsService{s: s} - rs.V1 = NewWalletobjectsV1Service(s) - return rs -} - -type WalletobjectsService struct { - s *Service - - V1 *WalletobjectsV1Service -} - -func NewWalletobjectsV1Service(s *Service) *WalletobjectsV1Service { - rs := &WalletobjectsV1Service{s: s} - rs.PrivateContent = NewWalletobjectsV1PrivateContentService(s) - return rs -} - -type WalletobjectsV1Service struct { - s *Service - - PrivateContent *WalletobjectsV1PrivateContentService -} - -func NewWalletobjectsV1PrivateContentService(s *Service) *WalletobjectsV1PrivateContentService { - rs := &WalletobjectsV1PrivateContentService{s: s} - return rs -} - -type WalletobjectsV1PrivateContentService struct { - s *Service -} - // ActivationOptions: ActivationOptions for the class type ActivationOptions struct { // ActivationUrl: HTTPS URL that supports REST semantics. Would be used @@ -644,10 +608,16 @@ func (s *AppLinkDataAppLinkInfo) MarshalJSON() ([]byte, error) { } type AppLinkDataAppLinkInfoAppTarget struct { + // PackageName: Package name for AppTarget. For example: + // com.google.android.gm + PackageName string `json:"packageName,omitempty"` + // TargetUri: URI for AppTarget. The description on the URI must be set. + // Prefer setting package field instead, if this target is defined for + // your application. TargetUri *Uri `json:"targetUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetUri") to + // ForceSendFields is a list of field names (e.g. "PackageName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -655,10 +625,10 @@ type AppLinkDataAppLinkInfoAppTarget struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetUri") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "PackageName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -2342,10 +2312,10 @@ type EventTicketClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -3282,10 +3252,10 @@ type FlightClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -3820,15 +3790,20 @@ type GenericClass struct { // these fields displayed is 10 from class and 10 from object. LinksModuleData *LinksModuleData `json:"linksModuleData,omitempty"` + // Messages: An array of messages displayed in the app. All users of + // this object will receive its associated messages. The maximum number + // of these fields is 10. + Messages []*Message `json:"messages,omitempty"` + // MultipleDevicesAndHoldersAllowedStatus: Identifies whether multiple // users and devices will save the same object referencing this class. // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -3906,6 +3881,39 @@ func (s *GenericClass) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GenericClassAddMessageResponse: Response to adding a new issuer +// message to the class. This contains the entire updated GenericClass. +type GenericClassAddMessageResponse struct { + // Resource: The updated EventTicketClass resource. + Resource *GenericClass `json:"resource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Resource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenericClassAddMessageResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenericClassAddMessageResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GenericClassListResponse: List response which contains the list of // all generic classes for a given issuer ID. type GenericClassListResponse struct { @@ -4111,6 +4119,40 @@ func (s *GenericObject) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GenericObjectAddMessageResponse: Response to adding a new issuer +// message to the object. This contains the entire updated +// GenericObject. +type GenericObjectAddMessageResponse struct { + // Resource: The updated GenericObject resource. + Resource *GenericObject `json:"resource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Resource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenericObjectAddMessageResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenericObjectAddMessageResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GenericObjectListResponse: List response which contains the list of // all generic objects for a given issuer ID. type GenericObjectListResponse struct { @@ -4273,10 +4315,10 @@ type GiftCardClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -5457,10 +5499,10 @@ type LoyaltyClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -6313,8 +6355,7 @@ type Message struct { // LocalizedHeader: Translated strings for the message header. LocalizedHeader *LocalizedString `json:"localizedHeader,omitempty"` - // MessageType: The type of the message. Currently, this can only be set - // for offers. + // MessageType: The message type. // // Possible values: // "MESSAGE_TYPE_UNSPECIFIED" @@ -6650,10 +6691,10 @@ type OfferClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -7239,75 +7280,6 @@ func (s *Permissions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrivateText: Private data for TextModule. This data will be rendered -// as a TextModule for a pass. -type PrivateText struct { - // Body: Translated strings for the body. - Body *LocalizedString `json:"body,omitempty"` - - // Header: Translated strings for the header. - Header *LocalizedString `json:"header,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Body") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PrivateText) MarshalJSON() ([]byte, error) { - type NoMethod PrivateText - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PrivateUri: Private data for LinkModule. This data will be rendered -// as the LinkModule for a pass. -type PrivateUri struct { - // Description: The URI's title appearing in the app as text and its - // translated strings. Recommended maximum is 20 characters to ensure - // the full string is displayed on smaller screens. - Description *LocalizedString `json:"description,omitempty"` - - // Uri: The location of a web page, image, or other resource. URIs in - // the `LinksModuleData` can have different prefixes indicating the type - // of URI (a link to a web page, a link to a map, a telephone number, or - // an email address). - Uri string `json:"uri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PrivateUri) MarshalJSON() ([]byte, error) { - type NoMethod PrivateUri - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type PurchaseDetails struct { // AccountId: ID of the account used to purchase the ticket. AccountId string `json:"accountId,omitempty"` @@ -8429,10 +8401,10 @@ type TransitClass struct { // // Possible values: // "STATUS_UNSPECIFIED" - Unspecified preference. - // "MULTIPLE_HOLDERS" - The same object can be saved by any number of - // different users, and on any number of devices. Partners typically use - // this setup for passes that do not need to be restricted to a single - // user or pinned to a single device. + // "MULTIPLE_HOLDERS" - The Pass object is shareable by a user and can + // be saved by any number of different users, and on any number of + // devices. Partners typically use this setup for passes that do not + // need to be restricted to a single user or pinned to a single device. // "ONE_USER_ALL_DEVICES" - An object can only be saved by one user, // but this user can view and use it on multiple of their devices. Once // the first user saves the object, no other user will be allowed to @@ -9059,138 +9031,6 @@ func (s *UpcomingNotification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UploadPrivateDataRequest: Request for sending user private Text or -// URI by the Issuer. -type UploadPrivateDataRequest struct { - // IssuerId: The ID of the issuer sending the data. - IssuerId int64 `json:"issuerId,omitempty,string"` - - // Text: Private text data of the user. - Text *PrivateText `json:"text,omitempty"` - - // Uri: Private URIs of the user. - Uri *PrivateUri `json:"uri,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IssuerId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IssuerId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UploadPrivateDataRequest) MarshalJSON() ([]byte, error) { - type NoMethod UploadPrivateDataRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UploadPrivateDataResponse: Response for uploading user private data -// (text or URIs) -type UploadPrivateDataResponse struct { - // PrivateContentId: A 64-bit content id for the private data that was - // uploaded by the Issuer. - PrivateContentId int64 `json:"privateContentId,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. "PrivateContentId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PrivateContentId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UploadPrivateDataResponse) MarshalJSON() ([]byte, error) { - type NoMethod UploadPrivateDataResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UploadPrivateImageRequest: Request to upload user's private images by -// Issuers to be used in passes. -type UploadPrivateImageRequest struct { - // Blob: A reference to the image payload that was uploaded by Scotty. - Blob *Media `json:"blob,omitempty"` - - // MediaRequestInfo: Extra information about the uploaded media. - MediaRequestInfo *MediaRequestInfo `json:"mediaRequestInfo,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Blob") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Blob") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UploadPrivateImageRequest) MarshalJSON() ([]byte, error) { - type NoMethod UploadPrivateImageRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UploadPrivateImageResponse: Response for uploading the private image -type UploadPrivateImageResponse struct { - // PrivateContentId: A 64-bit content id for the image that was uploaded - // by the Issuer. - PrivateContentId int64 `json:"privateContentId,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "PrivateContentId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PrivateContentId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UploadPrivateImageResponse) MarshalJSON() ([]byte, error) { - type NoMethod UploadPrivateImageResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type Uri struct { // Description: The URI's title appearing in the app as text. // Recommended maximum is 20 characters to ensure full string is @@ -12928,27 +12768,173 @@ func (c *FlightobjectUpdateCall) Do(opts ...googleapi.CallOption) (*FlightObject } -// method id "walletobjects.genericclass.get": +// method id "walletobjects.genericclass.addmessage": -type GenericclassGetCall struct { - s *Service - resourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GenericclassAddmessageCall struct { + s *Service + resourceId string + addmessagerequest *AddMessageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the generic class with the given class ID. +// Addmessage: Adds a message to the generic class referenced by the +// given class ID. // // - resourceId: The unique identifier for a class. This ID must be -// unique across all classes from an issuer. This value needs to -// follow the format `issuerID.identifier` where `issuerID` is issued -// by Google and `identifier` is chosen by you. The unique identifier -// can only include alphanumeric characters, `.`, `_`, or `-`. -func (r *GenericclassService) Get(resourceId string) *GenericclassGetCall { - c := &GenericclassGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resourceId = resourceId +// unique across all classes from an issuer. This value should follow +// the format issuer ID. identifier where the former is issued by +// Google and latter is chosen by you. Your unique identifier should +// only include alphanumeric characters, '.', '_', or '-'. +func (r *GenericclassService) Addmessage(resourceId string, addmessagerequest *AddMessageRequest) *GenericclassAddmessageCall { + c := &GenericclassAddmessageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resourceId = resourceId + c.addmessagerequest = addmessagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GenericclassAddmessageCall) Fields(s ...googleapi.Field) *GenericclassAddmessageCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GenericclassAddmessageCall) Context(ctx context.Context) *GenericclassAddmessageCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GenericclassAddmessageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GenericclassAddmessageCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addmessagerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "walletobjects/v1/genericClass/{resourceId}/addMessage") + 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{ + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "walletobjects.genericclass.addmessage" call. +// Exactly one of *GenericClassAddMessageResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenericClassAddMessageResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GenericclassAddmessageCall) Do(opts ...googleapi.CallOption) (*GenericClassAddMessageResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenericClassAddMessageResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds a message to the generic class referenced by the given class ID.", + // "flatPath": "walletobjects/v1/genericClass/{resourceId}/addMessage", + // "httpMethod": "POST", + // "id": "walletobjects.genericclass.addmessage", + // "parameterOrder": [ + // "resourceId" + // ], + // "parameters": { + // "resourceId": { + // "description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "walletobjects/v1/genericClass/{resourceId}/addMessage", + // "request": { + // "$ref": "AddMessageRequest" + // }, + // "response": { + // "$ref": "GenericClassAddMessageResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/wallet_object.issuer" + // ] + // } + +} + +// method id "walletobjects.genericclass.get": + +type GenericclassGetCall struct { + s *Service + resourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the generic class with the given class ID. +// +// - resourceId: The unique identifier for a class. This ID must be +// unique across all classes from an issuer. This value needs to +// follow the format `issuerID.identifier` where `issuerID` is issued +// by Google and `identifier` is chosen by you. The unique identifier +// can only include alphanumeric characters, `.`, `_`, or `-`. +func (r *GenericclassService) Get(resourceId string) *GenericclassGetCall { + c := &GenericclassGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resourceId = resourceId return c } @@ -13666,6 +13652,152 @@ func (c *GenericclassUpdateCall) Do(opts ...googleapi.CallOption) (*GenericClass } +// method id "walletobjects.genericobject.addmessage": + +type GenericobjectAddmessageCall struct { + s *Service + resourceId string + addmessagerequest *AddMessageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Addmessage: Adds a message to the generic object referenced by the +// given object ID. +// +// - resourceId: The unique identifier for an object. This ID must be +// unique across all classes from an issuer. This value should follow +// the format issuer ID. identifier where the former is issued by +// Google and latter is chosen by you. Your unique identifier should +// only include alphanumeric characters, '.', '_', or '-'. +func (r *GenericobjectService) Addmessage(resourceId string, addmessagerequest *AddMessageRequest) *GenericobjectAddmessageCall { + c := &GenericobjectAddmessageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resourceId = resourceId + c.addmessagerequest = addmessagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GenericobjectAddmessageCall) Fields(s ...googleapi.Field) *GenericobjectAddmessageCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GenericobjectAddmessageCall) Context(ctx context.Context) *GenericobjectAddmessageCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GenericobjectAddmessageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GenericobjectAddmessageCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addmessagerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "walletobjects/v1/genericObject/{resourceId}/addMessage") + 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{ + "resourceId": c.resourceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "walletobjects.genericobject.addmessage" call. +// Exactly one of *GenericObjectAddMessageResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenericObjectAddMessageResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GenericobjectAddmessageCall) Do(opts ...googleapi.CallOption) (*GenericObjectAddMessageResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenericObjectAddMessageResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds a message to the generic object referenced by the given object ID.", + // "flatPath": "walletobjects/v1/genericObject/{resourceId}/addMessage", + // "httpMethod": "POST", + // "id": "walletobjects.genericobject.addmessage", + // "parameterOrder": [ + // "resourceId" + // ], + // "parameters": { + // "resourceId": { + // "description": "The unique identifier for an object. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "walletobjects/v1/genericObject/{resourceId}/addMessage", + // "request": { + // "$ref": "AddMessageRequest" + // }, + // "response": { + // "$ref": "GenericObjectAddMessageResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/wallet_object.issuer" + // ] + // } + +} + // method id "walletobjects.genericobject.get": type GenericobjectGetCall struct { @@ -23241,129 +23373,3 @@ func (c *TransitobjectUpdateCall) Do(opts ...googleapi.CallOption) (*TransitObje // } } - -// method id "walletobjects.walletobjects.v1.privateContent.uploadPrivateData": - -type WalletobjectsV1PrivateContentUploadPrivateDataCall struct { - s *Service - uploadprivatedatarequest *UploadPrivateDataRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UploadPrivateData: Upload private data (text or URI) and returns an -// Id to be used in its place. -func (r *WalletobjectsV1PrivateContentService) UploadPrivateData(uploadprivatedatarequest *UploadPrivateDataRequest) *WalletobjectsV1PrivateContentUploadPrivateDataCall { - c := &WalletobjectsV1PrivateContentUploadPrivateDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.uploadprivatedatarequest = uploadprivatedatarequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *WalletobjectsV1PrivateContentUploadPrivateDataCall) Fields(s ...googleapi.Field) *WalletobjectsV1PrivateContentUploadPrivateDataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *WalletobjectsV1PrivateContentUploadPrivateDataCall) Context(ctx context.Context) *WalletobjectsV1PrivateContentUploadPrivateDataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *WalletobjectsV1PrivateContentUploadPrivateDataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WalletobjectsV1PrivateContentUploadPrivateDataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadprivatedatarequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "walletobjects/v1/privateContent/uploadPrivateData") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "walletobjects.walletobjects.v1.privateContent.uploadPrivateData" call. -// Exactly one of *UploadPrivateDataResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *UploadPrivateDataResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *WalletobjectsV1PrivateContentUploadPrivateDataCall) Do(opts ...googleapi.CallOption) (*UploadPrivateDataResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &UploadPrivateDataResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Upload private data (text or URI) and returns an Id to be used in its place.", - // "flatPath": "walletobjects/v1/privateContent/uploadPrivateData", - // "httpMethod": "POST", - // "id": "walletobjects.walletobjects.v1.privateContent.uploadPrivateData", - // "parameterOrder": [], - // "parameters": {}, - // "path": "walletobjects/v1/privateContent/uploadPrivateData", - // "request": { - // "$ref": "UploadPrivateDataRequest" - // }, - // "response": { - // "$ref": "UploadPrivateDataResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/wallet_object.issuer" - // ] - // } - -} diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 6a262f86d76..8cbbe613cef 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -217,6 +217,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "delete": { + "description": "Deletes a single Evaluation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + "httpMethod": "DELETE", + "id": "workloadmanager.projects.locations.evaluations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "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 Evaluation.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", @@ -292,6 +322,36 @@ "resources": { "executions": { "methods": { + "delete": { + "description": "Deletes a single Execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", + "httpMethod": "DELETE", + "id": "workloadmanager.projects.locations.evaluations.executions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + "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 Execution.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", @@ -701,15 +761,179 @@ ] } } + }, + "workloadProfiles": { + "methods": { + "get": { + "description": "Gets details of a single workload.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles/{workloadProfilesId}", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.workloadProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workloadProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "WorkloadProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "deprecated": true, + "description": "List workloads", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.workloadProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "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. Parent value for ListWorkloadRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workloadProfiles", + "response": { + "$ref": "ListWorkloadProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20240117", + "revision": "20240208", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { + "APILayerServer": { + "description": "The API layer server", + "id": "APILayerServer", + "properties": { + "name": { + "description": "Output only. The api layer name", + "readOnly": true, + "type": "string" + }, + "osVersion": { + "description": "Output only. OS information", + "readOnly": true, + "type": "string" + }, + "resources": { + "description": "Output only. resources in the component", + "items": { + "$ref": "CloudResource" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "AvailabilityGroup": { + "description": "The availability groups for sqlserver", + "id": "AvailabilityGroup", + "properties": { + "databases": { + "description": "Output only. The databases", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. The availability group name", + "readOnly": true, + "type": "string" + }, + "primaryServer": { + "description": "Output only. The primary server", + "readOnly": true, + "type": "string" + }, + "secondaryServers": { + "description": "Output only. The secondary servers", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "BackendServer": { + "description": "The backend server", + "id": "BackendServer", + "properties": { + "backupFile": { + "description": "Output only. The backup file", + "readOnly": true, + "type": "string" + }, + "backupSchedule": { + "description": "Output only. The backup schedule", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The backend name", + "readOnly": true, + "type": "string" + }, + "osVersion": { + "description": "Output only. OS information", + "readOnly": true, + "type": "string" + }, + "resources": { + "description": "Output only. resources in the component", + "items": { + "$ref": "CloudResource" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "BigQueryDestination": { "description": "Message describing big query destination", "id": "BigQueryDestination", @@ -731,6 +955,98 @@ "properties": {}, "type": "object" }, + "CloudResource": { + "description": "The resource on GCP", + "id": "CloudResource", + "properties": { + "kind": { + "description": "Output only. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.", + "enum": [ + "RESOURCE_KIND_UNSPECIFIED", + "RESOURCE_KIND_INSTANCE", + "RESOURCE_KIND_DISK", + "RESOURCE_KIND_ADDRESS", + "RESOURCE_KIND_FILESTORE", + "RESOURCE_KIND_HEALTH_CHECK", + "RESOURCE_KIND_FORWARDING_RULE", + "RESOURCE_KIND_BACKEND_SERVICE", + "RESOURCE_KIND_SUBNETWORK", + "RESOURCE_KIND_NETWORK", + "RESOURCE_KIND_PUBLIC_ADDRESS", + "RESOURCE_KIND_INSTANCE_GROUP" + ], + "enumDescriptions": [ + "Unspecified resource kind.", + "This is a compute instance.", + "This is a compute disk.", + "This is a compute address.", + "This is a filestore instance.", + "This is a compute health check.", + "This is a compute forwarding rule.", + "This is a compute backend service.", + "This is a compute subnetwork.", + "This is a compute network.", + "This is a public accessible IP Address.", + "This is a compute instance group." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. resource name", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "The cluster for sqlserver", + "id": "Cluster", + "properties": { + "nodes": { + "description": "Output only. The nodes", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "witnessServer": { + "description": "Output only. The witness server", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Database": { + "description": "The database for sqlserver", + "id": "Database", + "properties": { + "backupFile": { + "description": "Output only. The backup file", + "readOnly": true, + "type": "string" + }, + "backupSchedule": { + "description": "Output only. The backup schedule", + "readOnly": true, + "type": "string" + }, + "hostVm": { + "description": "Output only. The host VM", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The database name", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -910,6 +1226,31 @@ }, "type": "object" }, + "FrontEndServer": { + "description": "The front end server", + "id": "FrontEndServer", + "properties": { + "name": { + "description": "Output only. The frontend name", + "readOnly": true, + "type": "string" + }, + "osVersion": { + "description": "Output only. OS information", + "readOnly": true, + "type": "string" + }, + "resources": { + "description": "Output only. resources in the component", + "items": { + "$ref": "CloudResource" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "GceInstanceFilter": { "description": "Message describing compute engine instance filter", "id": "GceInstanceFilter", @@ -953,6 +1294,81 @@ }, "type": "object" }, + "Instance": { + "description": "a vm instance", + "id": "Instance", + "properties": { + "name": { + "description": "Output only. name of the VM", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The location of the VM", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Output only. The state of the VM", + "enum": [ + "INSTANCESTATE_UNSPECIFIED", + "PROVISIONING", + "STAGING", + "RUNNING", + "STOPPING", + "STOPPED", + "TERMINATED", + "SUSPENDING", + "SUSPENDED", + "REPAIRING", + "DEPROVISIONING" + ], + "enumDescriptions": [ + "The Status of the VM is unspecified", + "Resources are being allocated for the instance.", + "All required resources have been allocated and the instance is being started.", + "The instance is running.", + "The instance is currently stopping (either being deleted or killed).", + "The instance has stopped due to various reasons (user request, VM preemption, project freezing, etc.).", + "The instance has failed in some way.", + "The instance is suspending.", + "The instance is suspended.", + "The instance is in repair.", + "The instance is in de-provisioning state." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Layer": { + "description": "The database layer", + "id": "Layer", + "properties": { + "applicationType": { + "description": "the application layer", + "type": "string" + }, + "databaseType": { + "description": "Optional. the database layer", + "type": "string" + }, + "instances": { + "description": "Optional. instances in a layer", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "sid": { + "description": "Output only. system identification of a layer", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListEvaluationsResponse": { "description": "Message for response to listing Evaluations", "id": "ListEvaluationsResponse", @@ -1093,6 +1509,50 @@ }, "type": "object" }, + "ListWorkloadProfilesResponse": { + "description": "List workloadResponse returns a response with the list of workload overview", + "id": "ListWorkloadProfilesResponse", + "properties": { + "nextPageToken": { + "description": "Output only. A token identifying a page of results the server should return", + "readOnly": true, + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workloadOverviews": { + "description": "Output only. The list of Workload Overview", + "items": { + "$ref": "WorkloadProfileOverview" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "LoadBalancerServer": { + "description": "The load balancer for sqlserver", + "id": "LoadBalancerServer", + "properties": { + "ip": { + "description": "Output only. The IP address", + "readOnly": true, + "type": "string" + }, + "vm": { + "description": "Output only. The VM name", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents a Google Cloud location.", "id": "Location", @@ -1362,6 +1822,26 @@ }, "type": "object" }, + "SapComponent": { + "description": "The component of sap workload", + "id": "SapComponent", + "properties": { + "resources": { + "description": "Output only. resources in the component", + "items": { + "$ref": "CloudResource" + }, + "readOnly": true, + "type": "array" + }, + "sid": { + "description": "Output only. sid is the sap component identificator", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SapDiscovery": { "description": "The schema of SAP system discovery data.", "id": "SapDiscovery", @@ -1391,6 +1871,10 @@ "description": "Required. Unix timestamp this system has been updated last.", "format": "google-datetime", "type": "string" + }, + "workloadProperties": { + "$ref": "SapDiscoveryWorkloadProperties", + "description": "Optional. The properties of the workload." } }, "type": "object" @@ -1632,6 +2116,65 @@ }, "type": "object" }, + "SapDiscoveryWorkloadProperties": { + "description": "A set of properties describing an SAP workload.", + "id": "SapDiscoveryWorkloadProperties", + "properties": { + "productVersions": { + "description": "Optional. List of SAP Products and their versions running on the system.", + "items": { + "$ref": "SapDiscoveryWorkloadPropertiesProductVersion" + }, + "type": "array" + }, + "softwareComponentVersions": { + "description": "Optional. A list of SAP software components and their versions running on the system.", + "items": { + "$ref": "SapDiscoveryWorkloadPropertiesSoftwareComponentProperties" + }, + "type": "array" + } + }, + "type": "object" + }, + "SapDiscoveryWorkloadPropertiesProductVersion": { + "description": "A product name and version.", + "id": "SapDiscoveryWorkloadPropertiesProductVersion", + "properties": { + "name": { + "description": "Optional. Name of the product.", + "type": "string" + }, + "version": { + "description": "Optional. Version of the product.", + "type": "string" + } + }, + "type": "object" + }, + "SapDiscoveryWorkloadPropertiesSoftwareComponentProperties": { + "description": "A SAP software component name, version, and type.", + "id": "SapDiscoveryWorkloadPropertiesSoftwareComponentProperties", + "properties": { + "extVersion": { + "description": "Optional. The component's minor version.", + "type": "string" + }, + "name": { + "description": "Optional. Name of the component.", + "type": "string" + }, + "type": { + "description": "Optional. The component's type.", + "type": "string" + }, + "version": { + "description": "Optional. The component's major version.", + "type": "string" + } + }, + "type": "object" + }, "SapValidation": { "description": "A presentation of SAP workload insight. The schema of SAP workloads validation related data.", "id": "SapValidation", @@ -1696,6 +2239,53 @@ }, "type": "object" }, + "SapWorkload": { + "description": "The body of sap workload", + "id": "SapWorkload", + "properties": { + "application": { + "$ref": "SapComponent", + "description": "Output only. the acsc componment", + "readOnly": true + }, + "database": { + "$ref": "SapComponent", + "description": "Output only. the database componment", + "readOnly": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. The metadata for SAP workload.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "SapWorkloadOverview": { + "description": "The overview of sap workload", + "id": "SapWorkloadOverview", + "properties": { + "appSid": { + "description": "Output only. The application SID", + "readOnly": true, + "type": "string" + }, + "dbSid": { + "description": "Output only. The database SID", + "readOnly": true, + "type": "string" + }, + "sapSystemId": { + "description": "Output only. The UUID for a SAP workload", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ScannedResource": { "description": "Message of scanned resource", "id": "ScannedResource", @@ -1799,6 +2389,59 @@ }, "type": "object" }, + "SqlserverWorkload": { + "description": "The body of sqlserver workload", + "id": "SqlserverWorkload", + "properties": { + "ags": { + "description": "Output only. The availability groups for sqlserver", + "items": { + "$ref": "AvailabilityGroup" + }, + "readOnly": true, + "type": "array" + }, + "cluster": { + "$ref": "Cluster", + "description": "Output only. The cluster for sqlserver", + "readOnly": true + }, + "databases": { + "description": "Output only. The databases for sqlserver", + "items": { + "$ref": "Database" + }, + "readOnly": true, + "type": "array" + }, + "loadBalancerServer": { + "$ref": "LoadBalancerServer", + "description": "Output only. The load balancer for sqlserver", + "readOnly": true + } + }, + "type": "object" + }, + "SqlserverWorkloadOverview": { + "description": "The overview of sqlserver workload", + "id": "SqlserverWorkloadOverview", + "properties": { + "availabilityGroup": { + "description": "Output only. The availability groups", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "sqlserverSystemId": { + "description": "Output only. The UUID for a Sqlserver workload", + "readOnly": true, + "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", @@ -1826,6 +2469,45 @@ }, "type": "object" }, + "ThreeTierWorkload": { + "description": "The body of three tier workload", + "id": "ThreeTierWorkload", + "properties": { + "apiLayer": { + "$ref": "APILayerServer", + "description": "Output only. The API layer for three tier workload", + "readOnly": true + }, + "backend": { + "$ref": "BackendServer", + "description": "Output only. The backend for three tier workload", + "readOnly": true + }, + "endpoint": { + "description": "Output only. the workload endpoint", + "readOnly": true, + "type": "string" + }, + "frontend": { + "$ref": "FrontEndServer", + "description": "Output only. The frontend for three tier workload", + "readOnly": true + } + }, + "type": "object" + }, + "ThreeTierWorkloadOverview": { + "description": "The overview of three tier workload", + "id": "ThreeTierWorkloadOverview", + "properties": { + "threeTierSystemId": { + "description": "Output only. The UUID for a three tier workload", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ViolationDetails": { "description": "Message describing the violdation in execution result", "id": "ViolationDetails", @@ -1848,6 +2530,111 @@ }, "type": "object" }, + "WorkloadProfile": { + "description": "workload resource", + "id": "WorkloadProfile", + "properties": { + "application": { + "$ref": "Layer", + "deprecated": true, + "description": "Optional. The application layer" + }, + "ascs": { + "$ref": "Layer", + "deprecated": true, + "description": "Optional. The ascs layer" + }, + "database": { + "$ref": "Layer", + "deprecated": true, + "description": "Optional. The database layer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. such as name, description, version. More example can be found in deployment", + "type": "object" + }, + "name": { + "description": "Identifier. name of resource names have the form 'projects/{project_id}/workloads/{workload_id}'", + "type": "string" + }, + "refreshedTime": { + "description": "Required. time when the workload data was refreshed", + "format": "google-datetime", + "type": "string" + }, + "sapWorkload": { + "$ref": "SapWorkload", + "description": "The sap workload content" + }, + "sqlserverWorkload": { + "$ref": "SqlserverWorkload", + "description": "The sqlserver workload content" + }, + "state": { + "deprecated": true, + "description": "Output only. [output only] the current state if a a workload", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DEPLOYING", + "DESTROYING", + "MAINTENANCE" + ], + "enumDescriptions": [ + "unspecified", + "ACTIVE state", + "workload is in Deploying state", + "The workload is in Destroying state", + "The Workload is undermaintance" + ], + "readOnly": true, + "type": "string" + }, + "threeTierWorkload": { + "$ref": "ThreeTierWorkload", + "description": "The 3 tier web app workload content" + }, + "workloadType": { + "description": "Required. The type of the workload", + "enum": [ + "WORKLOAD_TYPE_UNSPECIFIED", + "S4_HANA", + "SQL_SERVER", + "THREE_TIER_WEB_APP" + ], + "enumDescriptions": [ + "unspecified workload type", + "running sap workload s4/hana", + "running sqlserver workload", + "running 3 tier web app workload" + ], + "type": "string" + } + }, + "type": "object" + }, + "WorkloadProfileOverview": { + "description": "a workload profile overview", + "id": "WorkloadProfileOverview", + "properties": { + "sapWorkloadOverview": { + "$ref": "SapWorkloadOverview", + "description": "The sap workload overview" + }, + "sqlserverWorkloadOverview": { + "$ref": "SqlserverWorkloadOverview", + "description": "The sqlserver workload overview" + }, + "threeTierWorkloadOverview": { + "$ref": "ThreeTierWorkloadOverview", + "description": "The three tier workload overview" + } + }, + "type": "object" + }, "WriteInsightRequest": { "description": "Request for sending the data insights.", "id": "WriteInsightRequest", diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 51a50b1d8df..8148af8c8ff 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -173,6 +173,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Insights = NewProjectsLocationsInsightsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Rules = NewProjectsLocationsRulesService(s) + rs.WorkloadProfiles = NewProjectsLocationsWorkloadProfilesService(s) return rs } @@ -186,6 +187,8 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService Rules *ProjectsLocationsRulesService + + WorkloadProfiles *ProjectsLocationsWorkloadProfilesService } func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { @@ -260,6 +263,126 @@ type ProjectsLocationsRulesService struct { s *Service } +func NewProjectsLocationsWorkloadProfilesService(s *Service) *ProjectsLocationsWorkloadProfilesService { + rs := &ProjectsLocationsWorkloadProfilesService{s: s} + return rs +} + +type ProjectsLocationsWorkloadProfilesService struct { + s *Service +} + +// APILayerServer: The API layer server +type APILayerServer struct { + // Name: Output only. The api layer name + Name string `json:"name,omitempty"` + + // OsVersion: Output only. OS information + OsVersion string `json:"osVersion,omitempty"` + + // Resources: Output only. resources in the component + Resources []*CloudResource `json:"resources,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *APILayerServer) MarshalJSON() ([]byte, error) { + type NoMethod APILayerServer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AvailabilityGroup: The availability groups for sqlserver +type AvailabilityGroup struct { + // Databases: Output only. The databases + Databases []string `json:"databases,omitempty"` + + // Name: Output only. The availability group name + Name string `json:"name,omitempty"` + + // PrimaryServer: Output only. The primary server + PrimaryServer string `json:"primaryServer,omitempty"` + + // SecondaryServers: Output only. The secondary servers + SecondaryServers []string `json:"secondaryServers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Databases") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Databases") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AvailabilityGroup) MarshalJSON() ([]byte, error) { + type NoMethod AvailabilityGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackendServer: The backend server +type BackendServer struct { + // BackupFile: Output only. The backup file + BackupFile string `json:"backupFile,omitempty"` + + // BackupSchedule: Output only. The backup schedule + BackupSchedule string `json:"backupSchedule,omitempty"` + + // Name: Output only. The backend name + Name string `json:"name,omitempty"` + + // OsVersion: Output only. OS information + OsVersion string `json:"osVersion,omitempty"` + + // Resources: Output only. resources in the component + Resources []*CloudResource `json:"resources,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupFile") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackupFile") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServer) MarshalJSON() ([]byte, error) { + type NoMethod BackendServer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BigQueryDestination: Message describing big query destination type BigQueryDestination struct { // CreateNewResultsTable: Optional. determine if results will be saved @@ -300,6 +423,123 @@ func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// CloudResource: The resource on GCP +type CloudResource struct { + // Kind: Output only. ComputeInstance, ComputeDisk, VPC, Bare Metal + // server, etc. + // + // Possible values: + // "RESOURCE_KIND_UNSPECIFIED" - Unspecified resource kind. + // "RESOURCE_KIND_INSTANCE" - This is a compute instance. + // "RESOURCE_KIND_DISK" - This is a compute disk. + // "RESOURCE_KIND_ADDRESS" - This is a compute address. + // "RESOURCE_KIND_FILESTORE" - This is a filestore instance. + // "RESOURCE_KIND_HEALTH_CHECK" - This is a compute health check. + // "RESOURCE_KIND_FORWARDING_RULE" - This is a compute forwarding + // rule. + // "RESOURCE_KIND_BACKEND_SERVICE" - This is a compute backend + // service. + // "RESOURCE_KIND_SUBNETWORK" - This is a compute subnetwork. + // "RESOURCE_KIND_NETWORK" - This is a compute network. + // "RESOURCE_KIND_PUBLIC_ADDRESS" - This is a public accessible IP + // Address. + // "RESOURCE_KIND_INSTANCE_GROUP" - This is a compute instance group. + Kind string `json:"kind,omitempty"` + + // Name: Output only. resource name + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudResource) MarshalJSON() ([]byte, error) { + type NoMethod CloudResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: The cluster for sqlserver +type Cluster struct { + // Nodes: Output only. The nodes + Nodes []string `json:"nodes,omitempty"` + + // WitnessServer: Output only. The witness server + WitnessServer string `json:"witnessServer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Nodes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Nodes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Database: The database for sqlserver +type Database struct { + // BackupFile: Output only. The backup file + BackupFile string `json:"backupFile,omitempty"` + + // BackupSchedule: Output only. The backup schedule + BackupSchedule string `json:"backupSchedule,omitempty"` + + // HostVm: Output only. The host VM + HostVm string `json:"hostVm,omitempty"` + + // Name: Output only. The database name + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupFile") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackupFile") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Database) MarshalJSON() ([]byte, error) { + type NoMethod Database + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -494,6 +734,40 @@ func (s *ExecutionResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FrontEndServer: The front end server +type FrontEndServer struct { + // Name: Output only. The frontend name + Name string `json:"name,omitempty"` + + // OsVersion: Output only. OS information + OsVersion string `json:"osVersion,omitempty"` + + // Resources: Output only. resources in the component + Resources []*CloudResource `json:"resources,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FrontEndServer) MarshalJSON() ([]byte, error) { + type NoMethod FrontEndServer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GceInstanceFilter: Message describing compute engine instance filter type GceInstanceFilter struct { // ServiceAccounts: Service account of compute engine @@ -568,6 +842,94 @@ func (s *Insight) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Instance: a vm instance +type Instance struct { + // Name: Output only. name of the VM + Name string `json:"name,omitempty"` + + // Region: Output only. The location of the VM + Region string `json:"region,omitempty"` + + // Status: Output only. The state of the VM + // + // Possible values: + // "INSTANCESTATE_UNSPECIFIED" - The Status of the VM is unspecified + // "PROVISIONING" - Resources are being allocated for the instance. + // "STAGING" - All required resources have been allocated and the + // instance is being started. + // "RUNNING" - The instance is running. + // "STOPPING" - The instance is currently stopping (either being + // deleted or killed). + // "STOPPED" - The instance has stopped due to various reasons (user + // request, VM preemption, project freezing, etc.). + // "TERMINATED" - The instance has failed in some way. + // "SUSPENDING" - The instance is suspending. + // "SUSPENDED" - The instance is suspended. + // "REPAIRING" - The instance is in repair. + // "DEPROVISIONING" - The instance is in de-provisioning state. + Status string `json:"status,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Layer: The database layer +type Layer struct { + // ApplicationType: the application layer + ApplicationType string `json:"applicationType,omitempty"` + + // DatabaseType: Optional. the database layer + DatabaseType string `json:"databaseType,omitempty"` + + // Instances: Optional. instances in a layer + Instances []*Instance `json:"instances,omitempty"` + + // Sid: Output only. system identification of a layer + Sid string `json:"sid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApplicationType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApplicationType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Layer) MarshalJSON() ([]byte, error) { + type NoMethod Layer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListEvaluationsResponse: Message for response to listing Evaluations type ListEvaluationsResponse struct { // Evaluations: The list of Evaluation @@ -833,15 +1195,86 @@ func (s *ListScannedResourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents a Google Cloud location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` +// ListWorkloadProfilesResponse: List workloadResponse returns a +// response with the list of workload overview +type ListWorkloadProfilesResponse struct { + // NextPageToken: Output only. A token identifying a page of results the + // server should return + NextPageToken string `json:"nextPageToken,omitempty"` - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkloadOverviews: Output only. The list of Workload Overview + WorkloadOverviews []*WorkloadProfileOverview `json:"workloadOverviews,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkloadProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkloadProfilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LoadBalancerServer: The load balancer for sqlserver +type LoadBalancerServer struct { + // Ip: Output only. The IP address + Ip string `json:"ip,omitempty"` + + // Vm: Output only. The VM name + Vm string `json:"vm,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ip") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ip") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LoadBalancerServer) MarshalJSON() ([]byte, error) { + type NoMethod LoadBalancerServer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` // LocationId: The canonical id for this location. For example: // "us-east1". @@ -1215,6 +1648,37 @@ func (s *RunEvaluationRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SapComponent: The component of sap workload +type SapComponent struct { + // Resources: Output only. resources in the component + Resources []*CloudResource `json:"resources,omitempty"` + + // Sid: Output only. sid is the sap component identificator + Sid string `json:"sid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Resources") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Resources") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapComponent) MarshalJSON() ([]byte, error) { + type NoMethod SapComponent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SapDiscovery: The schema of SAP system discovery data. type SapDiscovery struct { // ApplicationLayer: Optional. An SAP system may run without an @@ -1240,6 +1704,9 @@ type SapDiscovery struct { // last. UpdateTime string `json:"updateTime,omitempty"` + // WorkloadProperties: Optional. The properties of the workload. + WorkloadProperties *SapDiscoveryWorkloadProperties `json:"workloadProperties,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicationLayer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1567,6 +2034,111 @@ func (s *SapDiscoveryResourceInstanceProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SapDiscoveryWorkloadProperties: A set of properties describing an SAP +// workload. +type SapDiscoveryWorkloadProperties struct { + // ProductVersions: Optional. List of SAP Products and their versions + // running on the system. + ProductVersions []*SapDiscoveryWorkloadPropertiesProductVersion `json:"productVersions,omitempty"` + + // SoftwareComponentVersions: Optional. A list of SAP software + // components and their versions running on the system. + SoftwareComponentVersions []*SapDiscoveryWorkloadPropertiesSoftwareComponentProperties `json:"softwareComponentVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProductVersions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProductVersions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SapDiscoveryWorkloadProperties) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryWorkloadProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapDiscoveryWorkloadPropertiesProductVersion: A product name and +// version. +type SapDiscoveryWorkloadPropertiesProductVersion struct { + // Name: Optional. Name of the product. + Name string `json:"name,omitempty"` + + // Version: Optional. Version of the product. + Version string `json:"version,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapDiscoveryWorkloadPropertiesProductVersion) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryWorkloadPropertiesProductVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapDiscoveryWorkloadPropertiesSoftwareComponentProperties: A SAP +// software component name, version, and type. +type SapDiscoveryWorkloadPropertiesSoftwareComponentProperties struct { + // ExtVersion: Optional. The component's minor version. + ExtVersion string `json:"extVersion,omitempty"` + + // Name: Optional. Name of the component. + Name string `json:"name,omitempty"` + + // Type: Optional. The component's type. + Type string `json:"type,omitempty"` + + // Version: Optional. The component's major version. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExtVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExtVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapDiscoveryWorkloadPropertiesSoftwareComponentProperties) MarshalJSON() ([]byte, error) { + type NoMethod SapDiscoveryWorkloadPropertiesSoftwareComponentProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SapValidation: A presentation of SAP workload insight. The schema of // SAP workloads validation related data. type SapValidation struct { @@ -1664,6 +2236,74 @@ func (s *SapValidationValidationDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SapWorkload: The body of sap workload +type SapWorkload struct { + // Application: Output only. the acsc componment + Application *SapComponent `json:"application,omitempty"` + + // Database: Output only. the database componment + Database *SapComponent `json:"database,omitempty"` + + // Metadata: Output only. The metadata for SAP workload. + Metadata map[string]string `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Application") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Application") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapWorkload) MarshalJSON() ([]byte, error) { + type NoMethod SapWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapWorkloadOverview: The overview of sap workload +type SapWorkloadOverview struct { + // AppSid: Output only. The application SID + AppSid string `json:"appSid,omitempty"` + + // DbSid: Output only. The database SID + DbSid string `json:"dbSid,omitempty"` + + // SapSystemId: Output only. The UUID for a SAP workload + SapSystemId string `json:"sapSystemId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppSid") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppSid") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SapWorkloadOverview) MarshalJSON() ([]byte, error) { + type NoMethod SapWorkloadOverview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ScannedResource: Message of scanned resource type ScannedResource struct { // Resource: resource name @@ -1817,6 +2457,75 @@ func (s *SqlserverValidationValidationDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SqlserverWorkload: The body of sqlserver workload +type SqlserverWorkload struct { + // Ags: Output only. The availability groups for sqlserver + Ags []*AvailabilityGroup `json:"ags,omitempty"` + + // Cluster: Output only. The cluster for sqlserver + Cluster *Cluster `json:"cluster,omitempty"` + + // Databases: Output only. The databases for sqlserver + Databases []*Database `json:"databases,omitempty"` + + // LoadBalancerServer: Output only. The load balancer for sqlserver + LoadBalancerServer *LoadBalancerServer `json:"loadBalancerServer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ags") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ags") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlserverWorkload) MarshalJSON() ([]byte, error) { + type NoMethod SqlserverWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlserverWorkloadOverview: The overview of sqlserver workload +type SqlserverWorkloadOverview struct { + // AvailabilityGroup: Output only. The availability groups + AvailabilityGroup []string `json:"availabilityGroup,omitempty"` + + // SqlserverSystemId: Output only. The UUID for a Sqlserver workload + SqlserverSystemId string `json:"sqlserverSystemId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvailabilityGroup") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AvailabilityGroup") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SqlserverWorkloadOverview) MarshalJSON() ([]byte, error) { + type NoMethod SqlserverWorkloadOverview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -1861,19 +2570,21 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ViolationDetails: Message describing the violdation in execution -// result -type ViolationDetails struct { - // Asset: the name of asset - Asset string `json:"asset,omitempty"` +// ThreeTierWorkload: The body of three tier workload +type ThreeTierWorkload struct { + // ApiLayer: Output only. The API layer for three tier workload + ApiLayer *APILayerServer `json:"apiLayer,omitempty"` - // Observed: observed - Observed map[string]string `json:"observed,omitempty"` + // Backend: Output only. The backend for three tier workload + Backend *BackendServer `json:"backend,omitempty"` - // ServiceAccount: the service account associate with resource - ServiceAccount string `json:"serviceAccount,omitempty"` + // Endpoint: Output only. the workload endpoint + Endpoint string `json:"endpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Asset") to + // Frontend: Output only. The frontend for three tier workload + Frontend *FrontEndServer `json:"frontend,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiLayer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1881,8 +2592,8 @@ type ViolationDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Asset") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ApiLayer") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1890,8 +2601,184 @@ type ViolationDetails struct { NullFields []string `json:"-"` } -func (s *ViolationDetails) MarshalJSON() ([]byte, error) { - type NoMethod ViolationDetails +func (s *ThreeTierWorkload) MarshalJSON() ([]byte, error) { + type NoMethod ThreeTierWorkload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ThreeTierWorkloadOverview: The overview of three tier workload +type ThreeTierWorkloadOverview struct { + // ThreeTierSystemId: Output only. The UUID for a three tier workload + ThreeTierSystemId string `json:"threeTierSystemId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ThreeTierSystemId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ThreeTierSystemId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ThreeTierWorkloadOverview) MarshalJSON() ([]byte, error) { + type NoMethod ThreeTierWorkloadOverview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ViolationDetails: Message describing the violdation in execution +// result +type ViolationDetails struct { + // Asset: the name of asset + Asset string `json:"asset,omitempty"` + + // Observed: observed + Observed map[string]string `json:"observed,omitempty"` + + // ServiceAccount: the service account associate with resource + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ViolationDetails) MarshalJSON() ([]byte, error) { + type NoMethod ViolationDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadProfile: workload resource +type WorkloadProfile struct { + // Application: Optional. The application layer + Application *Layer `json:"application,omitempty"` + + // Ascs: Optional. The ascs layer + Ascs *Layer `json:"ascs,omitempty"` + + // Database: Optional. The database layer + Database *Layer `json:"database,omitempty"` + + // Labels: Optional. such as name, description, version. More example + // can be found in deployment + Labels map[string]string `json:"labels,omitempty"` + + // Name: Identifier. name of resource names have the form + // 'projects/{project_id}/workloads/{workload_id}' + Name string `json:"name,omitempty"` + + // RefreshedTime: Required. time when the workload data was refreshed + RefreshedTime string `json:"refreshedTime,omitempty"` + + // SapWorkload: The sap workload content + SapWorkload *SapWorkload `json:"sapWorkload,omitempty"` + + // SqlserverWorkload: The sqlserver workload content + SqlserverWorkload *SqlserverWorkload `json:"sqlserverWorkload,omitempty"` + + // State: Output only. [output only] the current state if a a workload + // + // Possible values: + // "STATE_UNSPECIFIED" - unspecified + // "ACTIVE" - ACTIVE state + // "DEPLOYING" - workload is in Deploying state + // "DESTROYING" - The workload is in Destroying state + // "MAINTENANCE" - The Workload is undermaintance + State string `json:"state,omitempty"` + + // ThreeTierWorkload: The 3 tier web app workload content + ThreeTierWorkload *ThreeTierWorkload `json:"threeTierWorkload,omitempty"` + + // WorkloadType: Required. The type of the workload + // + // Possible values: + // "WORKLOAD_TYPE_UNSPECIFIED" - unspecified workload type + // "S4_HANA" - running sap workload s4/hana + // "SQL_SERVER" - running sqlserver workload + // "THREE_TIER_WEB_APP" - running 3 tier web app workload + WorkloadType string `json:"workloadType,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Application") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Application") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadProfile) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadProfile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkloadProfileOverview: a workload profile overview +type WorkloadProfileOverview struct { + // SapWorkloadOverview: The sap workload overview + SapWorkloadOverview *SapWorkloadOverview `json:"sapWorkloadOverview,omitempty"` + + // SqlserverWorkloadOverview: The sqlserver workload overview + SqlserverWorkloadOverview *SqlserverWorkloadOverview `json:"sqlserverWorkloadOverview,omitempty"` + + // ThreeTierWorkloadOverview: The three tier workload overview + ThreeTierWorkloadOverview *ThreeTierWorkloadOverview `json:"threeTierWorkloadOverview,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SapWorkloadOverview") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SapWorkloadOverview") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkloadProfileOverview) MarshalJSON() ([]byte, error) { + type NoMethod WorkloadProfileOverview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2478,77 +3365,81 @@ func (c *ProjectsLocationsEvaluationsCreateCall) Do(opts ...googleapi.CallOption } -// method id "workloadmanager.projects.locations.evaluations.get": +// method id "workloadmanager.projects.locations.evaluations.delete": -type ProjectsLocationsEvaluationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Evaluation. +// Delete: Deletes a single Evaluation. // // - name: Name of the resource. -func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall { - c := &ProjectsLocationsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationsService) Delete(name string) *ProjectsLocationsEvaluationsDeleteCall { + c := &ProjectsLocationsEvaluationsDeleteCall{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 *ProjectsLocationsEvaluationsDeleteCall) RequestId(requestId string) *ProjectsLocationsEvaluationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall { +func (c *ProjectsLocationsEvaluationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall { +func (c *ProjectsLocationsEvaluationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -2559,14 +3450,14 @@ func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.evaluations.get" call. -// Exactly one of *Evaluation or error will be non-nil. Any non-2xx +// Do executes the "workloadmanager.projects.locations.evaluations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Evaluation.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*Evaluation, error) { +func (c *ProjectsLocationsEvaluationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2585,7 +3476,7 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Evaluation{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2597,10 +3488,10 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets details of a single Evaluation.", + // "description": "Deletes a single Evaluation.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", - // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.evaluations.get", + // "httpMethod": "DELETE", + // "id": "workloadmanager.projects.locations.evaluations.delete", // "parameterOrder": [ // "name" // ], @@ -2611,11 +3502,16 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", // "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": "Evaluation" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2624,58 +3520,30 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "workloadmanager.projects.locations.evaluations.list": +// method id "workloadmanager.projects.locations.evaluations.get": -type ProjectsLocationsEvaluationsListCall struct { +type ProjectsLocationsEvaluationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Evaluations in a given project and location. +// Get: Gets details of a single Evaluation. // -// - parent: Parent value for ListEvaluationsRequest. -func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { - c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall { - 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 *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { - 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 *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the resource. +func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall { + c := &ProjectsLocationsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2685,7 +3553,7 @@ func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *Pro // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2693,21 +3561,21 @@ func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2720,7 +3588,7 @@ func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2728,20 +3596,194 @@ func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.evaluations.list" call. -// Exactly one of *ListEvaluationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListEvaluationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) +// Do executes the "workloadmanager.projects.locations.evaluations.get" call. +// Exactly one of *Evaluation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Evaluation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*Evaluation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Evaluation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Evaluation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Evaluation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.list": + +type ProjectsLocationsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Evaluations in a given project and location. +// +// - parent: Parent value for ListEvaluationsRequest. +func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { + c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall { + 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 *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { + 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 *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.list" call. +// Exactly one of *ListEvaluationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListEvaluationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -2840,77 +3882,81 @@ func (c *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func } } -// method id "workloadmanager.projects.locations.evaluations.executions.get": +// method id "workloadmanager.projects.locations.evaluations.executions.delete": -type ProjectsLocationsEvaluationsExecutionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsExecutionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Execution. +// Delete: Deletes a single Execution. // // - name: Name of the resource. -func (r *ProjectsLocationsEvaluationsExecutionsService) Get(name string) *ProjectsLocationsEvaluationsExecutionsGetCall { - c := &ProjectsLocationsEvaluationsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEvaluationsExecutionsService) Delete(name string) *ProjectsLocationsEvaluationsExecutionsDeleteCall { + c := &ProjectsLocationsEvaluationsExecutionsDeleteCall{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 *ProjectsLocationsEvaluationsExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsEvaluationsExecutionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsGetCall { +func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsEvaluationsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsGetCall { +func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -2921,14 +3967,14 @@ func (c *ProjectsLocationsEvaluationsExecutionsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.evaluations.executions.get" call. -// Exactly one of *Execution or error will be non-nil. Any non-2xx +// Do executes the "workloadmanager.projects.locations.evaluations.executions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Execution.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) { +func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2947,7 +3993,7 @@ func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Execution{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2959,10 +4005,10 @@ func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets details of a single Execution.", + // "description": "Deletes a single Execution.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", - // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.evaluations.executions.get", + // "httpMethod": "DELETE", + // "id": "workloadmanager.projects.locations.evaluations.executions.delete", // "parameterOrder": [ // "name" // ], @@ -2973,11 +4019,16 @@ func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.Cal // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", // "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": "Execution" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2986,9 +4037,155 @@ func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.Cal } -// method id "workloadmanager.projects.locations.evaluations.executions.list": +// method id "workloadmanager.projects.locations.evaluations.executions.get": -type ProjectsLocationsEvaluationsExecutionsListCall struct { +type ProjectsLocationsEvaluationsExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Execution. +// +// - name: Name of the resource. +func (r *ProjectsLocationsEvaluationsExecutionsService) Get(name string) *ProjectsLocationsEvaluationsExecutionsGetCall { + c := &ProjectsLocationsEvaluationsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.executions.get" call. +// Exactly one of *Execution or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Execution.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Execution{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Execution.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.executions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Execution" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.executions.list": + +type ProjectsLocationsEvaluationsExecutionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4220,21 +5417,405 @@ type ProjectsLocationsOperationsGetCall struct { 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 +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workloadmanager.projects.locations.rules.list": + +type ProjectsLocationsRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists rules in a given project. +// +// - parent: The [project] on which to execute the request. The format +// is: projects/{project_id}/locations/{location} Currently, the +// pre-defined rules are global available to all projects and all +// regions. +func (r *ProjectsLocationsRulesService) List(parent string) *ProjectsLocationsRulesListCall { + c := &ProjectsLocationsRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CustomRulesBucket sets the optional parameter "customRulesBucket": +// The Cloud Storage bucket name for custom rules. +func (c *ProjectsLocationsRulesListCall) CustomRulesBucket(customRulesBucket string) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("customRulesBucket", customRulesBucket) + return c +} + +// Filter sets the optional parameter "filter": Filter based on +// primary_category, secondary_category +func (c *ProjectsLocationsRulesListCall) Filter(filter string) *ProjectsLocationsRulesListCall { + 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 *ProjectsLocationsRulesListCall) PageSize(pageSize int64) *ProjectsLocationsRulesListCall { + 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 *ProjectsLocationsRulesListCall) PageToken(pageToken string) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4244,7 +5825,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4252,21 +5833,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsRulesListCall) Context(ctx context.Context) *ProjectsLocationsRulesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4279,7 +5860,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4287,19 +5868,19 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "workloadmanager.projects.locations.rules.list" call. +// Exactly one of *ListRulesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRulesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*ListRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4318,7 +5899,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4330,25 +5911,46 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Lists rules in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/rules", // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.operations.get", + // "id": "workloadmanager.projects.locations.rules.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "customRulesBucket": { + // "description": "The Cloud Storage bucket name for custom rules.", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Filter based on primary_category, secondary_category", + // "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. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/rules", // "response": { - // "$ref": "Operation" + // "$ref": "ListRulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4357,9 +5959,30 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "workloadmanager.projects.locations.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRulesListCall) Pages(ctx context.Context, f func(*ListRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsOperationsListCall struct { +// method id "workloadmanager.projects.locations.workloadProfiles.get": + +type ProjectsLocationsWorkloadProfilesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4368,42 +5991,19 @@ type ProjectsLocationsOperationsListCall struct { 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`. +// Get: Gets details of a single workload. // -// - 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)} +// - name: Name of the resource. +func (r *ProjectsLocationsWorkloadProfilesService) Get(name string) *ProjectsLocationsWorkloadProfilesGetCall { + c := &ProjectsLocationsWorkloadProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsWorkloadProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadProfilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4413,7 +6013,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsWorkloadProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadProfilesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4421,21 +6021,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsWorkloadProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkloadProfilesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsWorkloadProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsWorkloadProfilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4448,7 +6048,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4461,14 +6061,14 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "workloadmanager.projects.locations.workloadProfiles.get" call. +// Exactly one of *WorkloadProfile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *WorkloadProfile.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsWorkloadProfilesGetCall) Do(opts ...googleapi.CallOption) (*WorkloadProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4487,7 +6087,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &WorkloadProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4499,41 +6099,25 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "Gets details of a single workload.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles/{workloadProfilesId}", // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.operations.list", + // "id": "workloadmanager.projects.locations.workloadProfiles.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. Name of the resource", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/workloadProfiles/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "WorkloadProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4542,30 +6126,9 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "workloadmanager.projects.locations.rules.list": +// method id "workloadmanager.projects.locations.workloadProfiles.list": -type ProjectsLocationsRulesListCall struct { +type ProjectsLocationsWorkloadProfilesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4574,28 +6137,17 @@ type ProjectsLocationsRulesListCall struct { header_ http.Header } -// List: Lists rules in a given project. +// List: List workloads // -// - parent: The [project] on which to execute the request. The format -// is: projects/{project_id}/locations/{location} Currently, the -// pre-defined rules are global available to all projects and all -// regions. -func (r *ProjectsLocationsRulesService) List(parent string) *ProjectsLocationsRulesListCall { - c := &ProjectsLocationsRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListWorkloadRequest. +func (r *ProjectsLocationsWorkloadProfilesService) List(parent string) *ProjectsLocationsWorkloadProfilesListCall { + c := &ProjectsLocationsWorkloadProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// CustomRulesBucket sets the optional parameter "customRulesBucket": -// The Cloud Storage bucket name for custom rules. -func (c *ProjectsLocationsRulesListCall) CustomRulesBucket(customRulesBucket string) *ProjectsLocationsRulesListCall { - c.urlParams_.Set("customRulesBucket", customRulesBucket) - return c -} - -// Filter sets the optional parameter "filter": Filter based on -// primary_category, secondary_category -func (c *ProjectsLocationsRulesListCall) Filter(filter string) *ProjectsLocationsRulesListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsWorkloadProfilesListCall) Filter(filter string) *ProjectsLocationsWorkloadProfilesListCall { c.urlParams_.Set("filter", filter) return c } @@ -4603,14 +6155,14 @@ func (c *ProjectsLocationsRulesListCall) Filter(filter string) *ProjectsLocation // 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 *ProjectsLocationsRulesListCall) PageSize(pageSize int64) *ProjectsLocationsRulesListCall { +func (c *ProjectsLocationsWorkloadProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkloadProfilesListCall { 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 *ProjectsLocationsRulesListCall) PageToken(pageToken string) *ProjectsLocationsRulesListCall { +func (c *ProjectsLocationsWorkloadProfilesListCall) PageToken(pageToken string) *ProjectsLocationsWorkloadProfilesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4618,7 +6170,7 @@ func (c *ProjectsLocationsRulesListCall) PageToken(pageToken string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRulesListCall { +func (c *ProjectsLocationsWorkloadProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkloadProfilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4628,7 +6180,7 @@ func (c *ProjectsLocationsRulesListCall) Fields(s ...googleapi.Field) *ProjectsL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRulesListCall { +func (c *ProjectsLocationsWorkloadProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkloadProfilesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4636,21 +6188,21 @@ func (c *ProjectsLocationsRulesListCall) IfNoneMatch(entityTag string) *Projects // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRulesListCall) Context(ctx context.Context) *ProjectsLocationsRulesListCall { +func (c *ProjectsLocationsWorkloadProfilesListCall) Context(ctx context.Context) *ProjectsLocationsWorkloadProfilesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRulesListCall) Header() http.Header { +func (c *ProjectsLocationsWorkloadProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsWorkloadProfilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4663,7 +6215,7 @@ func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workloadProfiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4676,14 +6228,14 @@ func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.rules.list" call. -// Exactly one of *ListRulesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListRulesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "workloadmanager.projects.locations.workloadProfiles.list" call. +// Exactly one of *ListWorkloadProfilesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkloadProfilesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*ListRulesResponse, error) { +func (c *ProjectsLocationsWorkloadProfilesListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4702,7 +6254,7 @@ func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListRulesResponse{ + ret := &ListWorkloadProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4714,46 +6266,42 @@ func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*List } return ret, nil // { - // "description": "Lists rules in a given project.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/rules", + // "deprecated": true, + // "description": "List workloads", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workloadProfiles", // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.rules.list", + // "id": "workloadmanager.projects.locations.workloadProfiles.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "customRulesBucket": { - // "description": "The Cloud Storage bucket name for custom rules.", - // "location": "query", - // "type": "string" - // }, // "filter": { - // "description": "Filter based on primary_category, secondary_category", + // "description": "Optional. Filtering 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.", + // "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.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions", + // "description": "Required. Parent value for ListWorkloadRequest", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/rules", + // "path": "v1/{+parent}/workloadProfiles", // "response": { - // "$ref": "ListRulesResponse" + // "$ref": "ListWorkloadProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4765,7 +6313,7 @@ func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*List // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRulesListCall) Pages(ctx context.Context, f func(*ListRulesResponse) error) error { +func (c *ProjectsLocationsWorkloadProfilesListCall) Pages(ctx context.Context, f func(*ListWorkloadProfilesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index 4f0cff33497..152110ebd5c 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -1,4 +1,37 @@ { + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/chat.bot": { + "description": "Private Service: https://www.googleapis.com/auth/chat.bot" + }, + "https://www.googleapis.com/auth/chat.memberships": { + "description": "View, add, and remove members from conversations in Google Chat" + }, + "https://www.googleapis.com/auth/chat.memberships.readonly": { + "description": "View members in Google Chat conversations." + }, + "https://www.googleapis.com/auth/chat.messages": { + "description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages." + }, + "https://www.googleapis.com/auth/chat.messages.reactions": { + "description": "View, add, and delete reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.reactions.readonly": { + "description": "View reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.readonly": { + "description": "View messages and reactions in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces": { + "description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat" + }, + "https://www.googleapis.com/auth/chat.spaces.readonly": { + "description": "View chat and spaces in Google Chat" + } + } + } + }, "basePath": "", "baseUrl": "https://workspaceevents.googleapis.com/", "batchPath": "batch", @@ -95,10 +128,512 @@ } }, "protocol": "rest", - "resources": {}, - "revision": "20240125", + "resources": { + "operations": { + "methods": { + "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/operations/{operationsId}", + "httpMethod": "GET", + "id": "workspaceevents.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + } + } + }, + "subscriptions": { + "methods": { + "create": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).", + "flatPath": "v1/subscriptions", + "httpMethod": "POST", + "id": "workspaceevents.subscriptions.create", + "parameterOrder": [], + "parameters": { + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't create the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/subscriptions", + "request": { + "$ref": "Subscription" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "delete": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/events/guides/delete-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "DELETE", + "id": "workspaceevents.subscriptions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to `true` and the subscription isn't found, the request succeeds but doesn't delete the subscription.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. Etag of the subscription. If present, it must match with the server's etag. Otherwise, request fails with the status `ABORTED`.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Resource name of the subscription to delete. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't delete the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "get": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.google.com/workspace/events/guides/get-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "GET", + "id": "workspaceevents.subscriptions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Subscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "list": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).", + "flatPath": "v1/subscriptions", + "httpMethod": "GET", + "id": "workspaceevents.subscriptions.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: ``` event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" event_types:\"google.workspace.chat.message.v1.created\" AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ( event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" ) AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ``` The server rejects invalid queries with an `INVALID_ARGUMENT` error.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.", + "location": "query", + "type": "string" + } + }, + "path": "v1/subscriptions", + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "patch": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.google.com/workspace/events/guides/update-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}", + "httpMethod": "PATCH", + "id": "workspaceevents.subscriptions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set to `true`, validates and previews the request, but doesn't update the subscription.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Subscription" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, + "reactivate": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fix the error that suspended the subscription. To learn how to use this method, see [Reactivate a Google Workspace subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).", + "flatPath": "v1/subscriptions/{subscriptionsId}:reactivate", + "httpMethod": "POST", + "id": "workspaceevents.subscriptions.reactivate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "location": "path", + "pattern": "^subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:reactivate", + "request": { + "$ref": "ReactivateSubscriptionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + } + } + } + }, + "revision": "20240218", "rootUrl": "https://workspaceevents.googleapis.com/", - "schemas": {}, + "schemas": { + "ListSubscriptionsResponse": { + "description": "The response message for SubscriptionsService.ListSubscriptions.", + "id": "ListSubscriptionsResponse", + "properties": { + "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" + }, + "subscriptions": { + "description": "List of subscriptions.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + } + }, + "type": "object" + }, + "NotificationEndpoint": { + "description": "The endpoint where the subscription delivers events.", + "id": "NotificationEndpoint", + "properties": { + "pubsubTopic": { + "description": "Immutable. The Cloud Pub/Sub topic that receives events for the subscription. Format: `projects/{project}/topics/{topic}` You must create the topic in the same Google Cloud project where you create this subscription. When the topic receives events, the events are encoded as Cloud Pub/Sub messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "PayloadOptions": { + "description": "Options about what data to include in the event payload. Only supported for Google Chat events.", + "id": "PayloadOptions", + "properties": { + "fieldMask": { + "description": "Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field.", + "format": "google-fieldmask", + "type": "string" + }, + "includeResource": { + "description": "Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource.", + "type": "boolean" + } + }, + "type": "object" + }, + "ReactivateSubscriptionRequest": { + "description": "The request message for SubscriptionsService.ReactivateSubscription.", + "id": "ReactivateSubscriptionRequest", + "properties": {}, + "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" + }, + "Subscription": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).", + "id": "Subscription", + "properties": { + "authority": { + "description": "Output only. The user who authorized the creation of the subscription. Format: `users/{user}` For Google Workspace users, the `{user}` value is the [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field from the Directory API.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the subscription is created.", + "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 might be sent on update requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "eventTypes": { + "description": "Required. Immutable. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. The supported event types depend on the target resource of your subscription. For details, see [Supported Google Workspace events](https://developers.google.com/workspace/events/guides#supported-events). By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "description": "Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "type": "string" + }, + "notificationEndpoint": { + "$ref": "NotificationEndpoint", + "description": "Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic." + }, + "payloadOptions": { + "$ref": "PayloadOptions", + "description": "Optional. Options about what data to include in the event payload. Only supported for Google Chat events." + }, + "reconciling": { + "description": "Output only. If `true`, the subscription is in the process of being updated.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. The state of the subscription. Determines whether the subscription can receive events and deliver them to the notification endpoint.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "SUSPENDED", + "DELETED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The subscription is active and can receive and deliver events to its notification endpoint.", + "The subscription is unable to receive events due to an error. To identify the error, see the `suspension_reason` field.", + "The subscription is deleted." + ], + "readOnly": true, + "type": "string" + }, + "suspensionReason": { + "description": "Output only. The error that suspended the subscription. To reactivate the subscription, resolve the error and call the `ReactivateSubscription` method.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "USER_SCOPE_REVOKED", + "RESOURCE_DELETED", + "USER_AUTHORIZATION_FAILURE", + "ENDPOINT_PERMISSION_DENIED", + "ENDPOINT_NOT_FOUND", + "ENDPOINT_RESOURCE_EXHAUSTED", + "OTHER" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The authorizing user has revoked the grant of one or more OAuth scopes. To learn more about authorization for Google Workspace, see [Configure the OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).", + "The target resource for the subscription no longer exists.", + "The user that authorized the creation of the subscription no longer has access to the subscription's target resource.", + "The Google Workspace application doesn't have access to deliver events to your subscription's notification endpoint.", + "The subscription's notification endpoint doesn't exist, or the endpoint can't be found in the Google Cloud project where you created the subscription.", + "The subscription's notification endpoint failed to receive events due to insufficient quota or reaching rate limiting.", + "An unidentified error has occurred." + ], + "readOnly": true, + "type": "string" + }, + "targetResource": { + "description": "Required. Immutable. The Google Workspace resource that's monitored for events, formatted as the [full resource name](https://google.aip.dev/122#full-resource-names). To learn about target resources and the events that they support, see [Supported Google Workspace events](https://developers.google.com/workspace/events#supported-events). A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an `ALREADY_EXISTS` error.", + "type": "string" + }, + "ttl": { + "description": "Input only. The time-to-live (TTL) or duration for the subscription. If unspecified or set to `0`, uses the maximum possible duration.", + "format": "google-duration", + "type": "string" + }, + "uid": { + "description": "Output only. System-assigned unique identifier for the subscription.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time that the subscription is updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, "servicePath": "", "title": "Google Workspace Events API", "version": "v1", diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index 1fd4690599c..2235a9d1999 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -34,6 +34,11 @@ // // # Other authentication options // +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: +// +// workspaceeventsService, err := workspaceevents.NewService(ctx, option.WithScopes(workspaceevents.ChatSpacesReadonlyScope)) +// // To use an API key for authentication (note: some APIs do not support API // keys), use [google.golang.org/api/option.WithAPIKey]: // @@ -94,8 +99,53 @@ const basePathTemplate = "https://workspaceevents.UNIVERSE_DOMAIN/" const mtlsBasePath = "https://workspaceevents.mtls.googleapis.com/" const defaultUniverseDomain = "googleapis.com" +// OAuth2 scopes used by this API. +const ( + // Private Service: https://www.googleapis.com/auth/chat.bot + ChatBotScope = "https://www.googleapis.com/auth/chat.bot" + + // View, add, and remove members from conversations in Google Chat + ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships" + + // View members in Google Chat conversations. + ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly" + + // View, compose, send, update, and delete messages, and add, view, and + // delete reactions to messages. + ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages" + + // View, add, and delete reactions to messages in Google Chat + ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions" + + // View reactions to messages in Google Chat + ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly" + + // View messages and reactions in Google Chat + ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly" + + // Create conversations and spaces and see or edit metadata (including + // history settings and access settings) in Google Chat + ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces" + + // View chat and spaces in Google Chat + ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly" +) + // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.readonly", + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly", + ) + // 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)) @@ -124,6 +174,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Operations = NewOperationsService(s) + s.Subscriptions = NewSubscriptionsService(s) return s, nil } @@ -131,6 +183,10 @@ type Service struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + + Operations *OperationsService + + Subscriptions *SubscriptionsService } func (s *Service) userAgent() string { @@ -139,3 +195,1607 @@ func (s *Service) userAgent() string { } return googleapi.UserAgent + " " + s.UserAgent } + +func NewOperationsService(s *Service) *OperationsService { + rs := &OperationsService{s: s} + return rs +} + +type OperationsService struct { + s *Service +} + +func NewSubscriptionsService(s *Service) *SubscriptionsService { + rs := &SubscriptionsService{s: s} + return rs +} + +type SubscriptionsService struct { + s *Service +} + +// ListSubscriptionsResponse: The response message for +// SubscriptionsService.ListSubscriptions. +type ListSubscriptionsResponse struct { + // 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"` + + // Subscriptions: List of subscriptions. + Subscriptions []*Subscription `json:"subscriptions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubscriptionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NotificationEndpoint: The endpoint where the subscription delivers +// events. +type NotificationEndpoint struct { + // PubsubTopic: Immutable. The Cloud Pub/Sub topic that receives events + // for the subscription. Format: `projects/{project}/topics/{topic}` You + // must create the topic in the same Google Cloud project where you + // create this subscription. When the topic receives events, the events + // are encoded as Cloud Pub/Sub messages. For details, see the Google + // Cloud Pub/Sub Protocol Binding for CloudEvents + // (https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). + PubsubTopic string `json:"pubsubTopic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PubsubTopic") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PubsubTopic") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NotificationEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PayloadOptions: Options about what data to include in the event +// payload. Only supported for Google Chat events. +type PayloadOptions struct { + // FieldMask: Optional. If `include_resource` is set to `true`, the list + // of fields to include in the event payload. Separate fields with a + // comma. For example, to include a Google Chat message's sender and + // create time, enter `message.sender,message.createTime`. If omitted, + // the payload includes all fields for the resource. If you specify a + // field that doesn't exist for the resource, the system ignores the + // field. + FieldMask string `json:"fieldMask,omitempty"` + + // IncludeResource: Optional. Whether the event payload includes data + // about the resource that changed. For example, for an event where a + // Google Chat message was created, whether the payload contains data + // about the `Message` + // (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) + // resource. If false, the event payload only includes the name of the + // changed resource. + IncludeResource bool `json:"includeResource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldMask") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldMask") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PayloadOptions) MarshalJSON() ([]byte, error) { + type NoMethod PayloadOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReactivateSubscriptionRequest: The request message for +// SubscriptionsService.ReactivateSubscription. +type ReactivateSubscriptionRequest struct { +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Subscription: Developer Preview +// (https://developers.google.com/workspace/preview). A subscription to +// receive events about a Google Workspace resource. To learn more about +// subscriptions, see the Google Workspace Events API overview +// (https://developers.google.com/workspace/events). +type Subscription struct { + // Authority: Output only. The user who authorized the creation of the + // subscription. Format: `users/{user}` For Google Workspace users, the + // `{user}` value is the `user.id` + // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) + // field from the Directory API. + Authority string `json:"authority,omitempty"` + + // CreateTime: Output only. The time when the subscription is created. + CreateTime string `json:"createTime,omitempty"` + + // Etag: Optional. This checksum is computed by the server based on the + // value of other fields, and might be sent on update requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // EventTypes: Required. Immutable. Unordered list. Input for creating a + // subscription. Otherwise, output only. One or more types of events to + // receive about the target resource. Formatted according to the + // CloudEvents specification. The supported event types depend on the + // target resource of your subscription. For details, see Supported + // Google Workspace events + // (https://developers.google.com/workspace/events/guides#supported-events). + // By default, you also receive events about the lifecycle of your + // subscription + // (https://developers.google.com/workspace/events/guides/events-lifecycle). + // You don't need to specify lifecycle events for this field. If you + // specify an event type that doesn't exist for the target resource, the + // request returns an HTTP `400 Bad Request` status code. + EventTypes []string `json:"eventTypes,omitempty"` + + // ExpireTime: Non-empty default. The timestamp in UTC when the + // subscription expires. Always displayed on output, regardless of what + // was used on input. + ExpireTime string `json:"expireTime,omitempty"` + + // Name: Optional. Immutable. Identifier. Resource name of the + // subscription. Format: `subscriptions/{subscription}` + Name string `json:"name,omitempty"` + + // NotificationEndpoint: Required. Immutable. The endpoint where the + // subscription delivers events, such as a Pub/Sub topic. + NotificationEndpoint *NotificationEndpoint `json:"notificationEndpoint,omitempty"` + + // PayloadOptions: Optional. Options about what data to include in the + // event payload. Only supported for Google Chat events. + PayloadOptions *PayloadOptions `json:"payloadOptions,omitempty"` + + // Reconciling: Output only. If `true`, the subscription is in the + // process of being updated. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. The state of the subscription. Determines whether + // the subscription can receive events and deliver them to the + // notification endpoint. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - The subscription is active and can receive and deliver + // events to its notification endpoint. + // "SUSPENDED" - The subscription is unable to receive events due to + // an error. To identify the error, see the `suspension_reason` field. + // "DELETED" - The subscription is deleted. + State string `json:"state,omitempty"` + + // SuspensionReason: Output only. The error that suspended the + // subscription. To reactivate the subscription, resolve the error and + // call the `ReactivateSubscription` method. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "USER_SCOPE_REVOKED" - The authorizing user has revoked the grant + // of one or more OAuth scopes. To learn more about authorization for + // Google Workspace, see [Configure the OAuth consent + // screen](https://developers.google.com/workspace/guides/configure-oauth + // -consent#choose-scopes). + // "RESOURCE_DELETED" - The target resource for the subscription no + // longer exists. + // "USER_AUTHORIZATION_FAILURE" - The user that authorized the + // creation of the subscription no longer has access to the + // subscription's target resource. + // "ENDPOINT_PERMISSION_DENIED" - The Google Workspace application + // doesn't have access to deliver events to your subscription's + // notification endpoint. + // "ENDPOINT_NOT_FOUND" - The subscription's notification endpoint + // doesn't exist, or the endpoint can't be found in the Google Cloud + // project where you created the subscription. + // "ENDPOINT_RESOURCE_EXHAUSTED" - The subscription's notification + // endpoint failed to receive events due to insufficient quota or + // reaching rate limiting. + // "OTHER" - An unidentified error has occurred. + SuspensionReason string `json:"suspensionReason,omitempty"` + + // TargetResource: Required. Immutable. The Google Workspace resource + // that's monitored for events, formatted as the full resource name + // (https://google.aip.dev/122#full-resource-names). To learn about + // target resources and the events that they support, see Supported + // Google Workspace events + // (https://developers.google.com/workspace/events#supported-events). A + // user can only authorize your app to create one subscription for a + // given target resource. If your app tries to create another + // subscription with the same user credentials, the request returns an + // `ALREADY_EXISTS` error. + TargetResource string `json:"targetResource,omitempty"` + + // Ttl: Input only. The time-to-live (TTL) or duration for the + // subscription. If unspecified or set to `0`, uses the maximum possible + // duration. + Ttl string `json:"ttl,omitempty"` + + // Uid: Output only. System-assigned unique identifier for the + // subscription. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The last time that the subscription is + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Authority") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Authority") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subscription) MarshalJSON() ([]byte, error) { + type NoMethod Subscription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workspaceevents.operations.get": + +type OperationsGetCall 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 *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "workspaceevents.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.create": + +type SubscriptionsCreateCall struct { + s *Service + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a Google +// Workspace subscription. To learn how to use this method, see Create a +// Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/create-subscription). +func (r *SubscriptionsService) Create(subscription *Subscription) *SubscriptionsCreateCall { + c := &SubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.subscription = subscription + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't create the +// subscription. +func (c *SubscriptionsCreateCall) ValidateOnly(validateOnly bool) *SubscriptionsCreateCall { + 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 information. +func (c *SubscriptionsCreateCall) Fields(s ...googleapi.Field) *SubscriptionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).", + // "flatPath": "v1/subscriptions", + // "httpMethod": "POST", + // "id": "workspaceevents.subscriptions.create", + // "parameterOrder": [], + // "parameters": { + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't create the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/subscriptions", + // "request": { + // "$ref": "Subscription" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.delete": + +type SubscriptionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Developer Preview +// (https://developers.google.com/workspace/preview): Deletes a Google +// Workspace subscription. To learn how to use this method, see Delete a +// Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/delete-subscription). +// +// - name: Resource name of the subscription to delete. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Delete(name string) *SubscriptionsDeleteCall { + c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// `true` and the subscription isn't found, the request succeeds but +// doesn't delete the subscription. +func (c *SubscriptionsDeleteCall) AllowMissing(allowMissing bool) *SubscriptionsDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": Etag of the subscription. If +// present, it must match with the server's etag. Otherwise, request +// fails with the status `ABORTED`. +func (c *SubscriptionsDeleteCall) Etag(etag string) *SubscriptionsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't delete the +// subscription. +func (c *SubscriptionsDeleteCall) ValidateOnly(validateOnly bool) *SubscriptionsDeleteCall { + 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 information. +func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/events/guides/delete-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "DELETE", + // "id": "workspaceevents.subscriptions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set to `true` and the subscription isn't found, the request succeeds but doesn't delete the subscription.", + // "location": "query", + // "type": "boolean" + // }, + // "etag": { + // "description": "Optional. Etag of the subscription. If present, it must match with the server's etag. Otherwise, request fails with the status `ABORTED`.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Resource name of the subscription to delete. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't delete the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.get": + +type SubscriptionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Developer Preview +// (https://developers.google.com/workspace/preview): Gets details about +// a Google Workspace subscription. To learn how to use this method, see +// Get details about a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/get-subscription). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Get(name string) *SubscriptionsGetCall { + c := &SubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsGetCall) Fields(s ...googleapi.Field) *SubscriptionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SubscriptionsGetCall) IfNoneMatch(entityTag string) *SubscriptionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.get" call. +// Exactly one of *Subscription or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Subscription.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Subscription{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.google.com/workspace/events/guides/get-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "GET", + // "id": "workspaceevents.subscriptions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Subscription" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.list": + +type SubscriptionsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Developer Preview +// (https://developers.google.com/workspace/preview): Lists Google +// Workspace subscriptions. To learn how to use this method, see List +// Google Workspace subscriptions +// (https://developers.google.com/workspace/events/guides/list-subscriptions). +func (r *SubscriptionsService) List() *SubscriptionsListCall { + c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": Required. A query +// filter. You can filter subscriptions by event type (`event_types`) +// and target resource (`target_resource`). You must specify at least +// one event type in your query. To filter for multiple event types, use +// the `OR` operator. To filter by both event type and target resource, +// use the `AND` operator and specify the full resource name, such as +// `//chat.googleapis.com/spaces/{space}`. For example, the following +// queries are valid: ``` +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" +// event_types:"google.workspace.chat.message.v1.created" AND +// target_resource="//chat.googleapis.com/spaces/{space}" ( +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" ) AND +// target_resource="//chat.googleapis.com/spaces/{space}" ``` The server +// rejects invalid queries with an `INVALID_ARGUMENT` error. +func (c *SubscriptionsListCall) Filter(filter string) *SubscriptionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of subscriptions to return. The service might return fewer than this +// value. If unspecified or set to `0`, up to 50 subscriptions are +// returned. The maximum value is 100. If you specify a value more than +// 100, the system only returns 100 subscriptions. +func (c *SubscriptionsListCall) PageSize(pageSize int64) *SubscriptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous list subscriptions call. Provide this +// parameter to retrieve the subsequent page. When paginating, the +// filter value should match the call that provided the page token. +// Passing a different value might lead to unexpected results. +func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.list" call. +// Exactly one of *ListSubscriptionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListSubscriptionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSubscriptionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).", + // "flatPath": "v1/subscriptions", + // "httpMethod": "GET", + // "id": "workspaceevents.subscriptions.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: ``` event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" event_types:\"google.workspace.chat.message.v1.created\" AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ( event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" ) AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ``` The server rejects invalid queries with an `INVALID_ARGUMENT` error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/subscriptions", + // "response": { + // "$ref": "ListSubscriptionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// 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 *SubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workspaceevents.subscriptions.patch": + +type SubscriptionsPatchCall struct { + s *Service + name string + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Developer Preview +// (https://developers.google.com/workspace/preview): Updates or renews +// a Google Workspace subscription. To learn how to use this method, see +// Update or renew a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/update-subscription). +// +// - name: Optional. Immutable. Identifier. Resource name of the +// subscription. Format: `subscriptions/{subscription}`. +func (r *SubscriptionsService) Patch(name string, subscription *Subscription) *SubscriptionsPatchCall { + c := &SubscriptionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscription = subscription + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// field to update. You can update one of the following fields in a +// subscription: * `expire_time`: The timestamp when the subscription +// expires. * `ttl`: The time-to-live (TTL) or duration of the +// subscription. +func (c *SubscriptionsPatchCall) UpdateMask(updateMask string) *SubscriptionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to +// `true`, validates and previews the request, but doesn't update the +// subscription. +func (c *SubscriptionsPatchCall) ValidateOnly(validateOnly bool) *SubscriptionsPatchCall { + 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 information. +func (c *SubscriptionsPatchCall) Fields(s ...googleapi.Field) *SubscriptionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsPatchCall) Context(ctx context.Context) *SubscriptionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.google.com/workspace/events/guides/update-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}", + // "httpMethod": "PATCH", + // "id": "workspaceevents.subscriptions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Required. The field to update. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set to `true`, validates and previews the request, but doesn't update the subscription.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Subscription" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "workspaceevents.subscriptions.reactivate": + +type SubscriptionsReactivateCall struct { + s *Service + name string + reactivatesubscriptionrequest *ReactivateSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reactivate: Developer Preview +// (https://developers.google.com/workspace/preview): Reactivates a +// suspended Google Workspace subscription. This method resets your +// subscription's `State` field to `ACTIVE`. Before you use this method, +// you must fix the error that suspended the subscription. To learn how +// to use this method, see Reactivate a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/reactivate-subscription). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Reactivate(name string, reactivatesubscriptionrequest *ReactivateSubscriptionRequest) *SubscriptionsReactivateCall { + c := &SubscriptionsReactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.reactivatesubscriptionrequest = reactivatesubscriptionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubscriptionsReactivateCall) Fields(s ...googleapi.Field) *SubscriptionsReactivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubscriptionsReactivateCall) Context(ctx context.Context) *SubscriptionsReactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubscriptionsReactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsReactivateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reactivatesubscriptionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reactivate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.reactivate" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsReactivateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fix the error that suspended the subscription. To learn how to use this method, see [Reactivate a Google Workspace subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).", + // "flatPath": "v1/subscriptions/{subscriptionsId}:reactivate", + // "httpMethod": "POST", + // "id": "workspaceevents.subscriptions.reactivate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", + // "location": "path", + // "pattern": "^subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:reactivate", + // "request": { + // "$ref": "ReactivateSubscriptionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly", + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index e9496a63d29..88ea1861743 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -3999,7 +3999,7 @@ } } }, - "revision": "20240211", + "revision": "20240213", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -5473,6 +5473,10 @@ "description": "Information specific to a store on a merchandising platform linked to a YouTube channel.", "id": "ChannelToStoreLinkDetails", "properties": { + "billingDetails": { + "$ref": "ChannelToStoreLinkDetailsBillingDetails", + "description": "Information specific to billing (read-only)." + }, "merchantId": { "description": "Google Merchant Center id of the store.", "format": "uint64", @@ -5489,6 +5493,29 @@ }, "type": "object" }, + "ChannelToStoreLinkDetailsBillingDetails": { + "description": "Information specific to billing.", + "id": "ChannelToStoreLinkDetailsBillingDetails", + "properties": { + "billingStatus": { + "description": "The current billing profile status.", + "enum": [ + "billingStatusUnspecified", + "billingStatusPending", + "billingStatusActive", + "billingStatusInactive" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ChannelTopicDetails": { "description": "Freebase topic information related to the channel.", "id": "ChannelTopicDetails", @@ -8738,11 +8765,11 @@ "type": "object" }, "LiveChatMessageSnippet": { - "description": "Next ID: 33", + "description": "Next ID: 34", "id": "LiveChatMessageSnippet", "properties": { "authorChannelId": { - "description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message membershipGiftingEvent - the user that made the purchase giftMembershipReceivedEvent - the user that received the gift membership messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase", + "description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message membershipGiftingEvent - the user that made the purchase giftMembershipReceivedEvent - the user that received the gift membership messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase pollEvent - the user that created the poll", "type": "string" }, "displayMessage": { @@ -8783,6 +8810,10 @@ "$ref": "LiveChatNewSponsorDetails", "description": "Details about the New Member Announcement event, this is only set if the type is 'newSponsorEvent'. Please note that \"member\" is the new term for \"sponsor\"." }, + "pollDetails": { + "$ref": "LiveChatPollDetails", + "description": "Details about the poll event, this is only set if the type is 'pollEvent'." + }, "publishedAt": { "description": "The date and time when the message was orignally published.", "format": "date-time", @@ -8818,7 +8849,8 @@ "messageRetractedEvent", "userBannedEvent", "superChatEvent", - "superStickerEvent" + "superStickerEvent", + "pollEvent" ], "enumDescriptions": [ "", @@ -8836,6 +8868,7 @@ "", "", "", + "", "" ], "type": "string" @@ -8946,6 +8979,57 @@ }, "type": "object" }, + "LiveChatPollDetails": { + "id": "LiveChatPollDetails", + "properties": { + "metadata": { + "$ref": "LiveChatPollDetailsPollMetadata" + }, + "status": { + "enum": [ + "unknown", + "active", + "closed" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "LiveChatPollDetailsPollMetadata": { + "id": "LiveChatPollDetailsPollMetadata", + "properties": { + "options": { + "description": "The options will be returned in the order that is displayed in 1P", + "items": { + "$ref": "LiveChatPollDetailsPollMetadataPollOption" + }, + "type": "array" + }, + "questionText": { + "type": "string" + } + }, + "type": "object" + }, + "LiveChatPollDetailsPollMetadataPollOption": { + "id": "LiveChatPollDetailsPollMetadataPollOption", + "properties": { + "optionText": { + "type": "string" + }, + "tally": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "LiveChatSuperChatDetails": { "id": "LiveChatSuperChatDetails", "properties": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index ae064efe639..2109d898f82 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -2606,6 +2606,9 @@ func (s *ChannelStatus) MarshalJSON() ([]byte, error) { // ChannelToStoreLinkDetails: Information specific to a store on a // merchandising platform linked to a YouTube channel. type ChannelToStoreLinkDetails struct { + // BillingDetails: Information specific to billing (read-only). + BillingDetails *ChannelToStoreLinkDetailsBillingDetails `json:"billingDetails,omitempty"` + // MerchantId: Google Merchant Center id of the store. MerchantId uint64 `json:"merchantId,omitempty,string"` @@ -2615,7 +2618,7 @@ type ChannelToStoreLinkDetails struct { // StoreUrl: Landing page of the store. StoreUrl string `json:"storeUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "MerchantId") to + // ForceSendFields is a list of field names (e.g. "BillingDetails") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2623,12 +2626,13 @@ type ChannelToStoreLinkDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MerchantId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BillingDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2638,6 +2642,41 @@ func (s *ChannelToStoreLinkDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ChannelToStoreLinkDetailsBillingDetails: Information specific to +// billing. +type ChannelToStoreLinkDetailsBillingDetails struct { + // BillingStatus: The current billing profile status. + // + // Possible values: + // "billingStatusUnspecified" + // "billingStatusPending" + // "billingStatusActive" + // "billingStatusInactive" + BillingStatus string `json:"billingStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BillingStatus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BillingStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChannelToStoreLinkDetailsBillingDetails) MarshalJSON() ([]byte, error) { + type NoMethod ChannelToStoreLinkDetailsBillingDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ChannelTopicDetails: Freebase topic information related to the // channel. type ChannelTopicDetails struct { @@ -5846,7 +5885,7 @@ func (s *LiveChatMessageRetractedDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LiveChatMessageSnippet: Next ID: 33 +// LiveChatMessageSnippet: Next ID: 34 type LiveChatMessageSnippet struct { // AuthorChannelId: The ID of the user that authored this message, this // field is not always filled. textMessageEvent - the user that wrote @@ -5859,7 +5898,7 @@ type LiveChatMessageSnippet struct { // messageRetractedEvent - the author that retracted their message // userBannedEvent - the moderator that took the action superChatEvent - // the user that made the purchase superStickerEvent - the user that - // made the purchase + // made the purchase pollEvent - the user that created the poll AuthorChannelId string `json:"authorChannelId,omitempty"` // DisplayMessage: Contains a string that can be displayed to the user. @@ -5899,6 +5938,10 @@ type LiveChatMessageSnippet struct { // "member" is the new term for "sponsor". NewSponsorDetails *LiveChatNewSponsorDetails `json:"newSponsorDetails,omitempty"` + // PollDetails: Details about the poll event, this is only set if the + // type is 'pollEvent'. + PollDetails *LiveChatPollDetails `json:"pollDetails,omitempty"` + // PublishedAt: The date and time when the message was orignally // published. PublishedAt string `json:"publishedAt,omitempty"` @@ -5935,6 +5978,7 @@ type LiveChatMessageSnippet struct { // "userBannedEvent" // "superChatEvent" // "superStickerEvent" + // "pollEvent" Type string `json:"type,omitempty"` UserBannedDetails *LiveChatUserBannedMessageDetails `json:"userBannedDetails,omitempty"` @@ -6130,6 +6174,96 @@ func (s *LiveChatNewSponsorDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type LiveChatPollDetails struct { + Metadata *LiveChatPollDetailsPollMetadata `json:"metadata,omitempty"` + + // Possible values: + // "unknown" + // "active" + // "closed" + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Metadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Metadata") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LiveChatPollDetails) MarshalJSON() ([]byte, error) { + type NoMethod LiveChatPollDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type LiveChatPollDetailsPollMetadata struct { + // Options: The options will be returned in the order that is displayed + // in 1P + Options []*LiveChatPollDetailsPollMetadataPollOption `json:"options,omitempty"` + + QuestionText string `json:"questionText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Options") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Options") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LiveChatPollDetailsPollMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LiveChatPollDetailsPollMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type LiveChatPollDetailsPollMetadataPollOption struct { + OptionText string `json:"optionText,omitempty"` + + Tally int64 `json:"tally,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "OptionText") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OptionText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LiveChatPollDetailsPollMetadataPollOption) MarshalJSON() ([]byte, error) { + type NoMethod LiveChatPollDetailsPollMetadataPollOption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type LiveChatSuperChatDetails struct { // AmountDisplayString: A rendered string that displays the fund amount // and currency to the user.