diff --git a/CHANGES.md b/CHANGES.md index 2bba5ffe5dd..222aee2133f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,13 @@ # Changes +## [0.74.0](https://github.com/googleapis/google-api-go-client/compare/v0.73.0...v0.74.0) (2022-03-30) + + +### Features + +* **all:** auto-regenerate discovery clients, refs [#1495](https://github.com/googleapis/google-api-go-client/issues/1495) [#1492](https://github.com/googleapis/google-api-go-client/issues/1492) [#1490](https://github.com/googleapis/google-api-go-client/issues/1490) [#1489](https://github.com/googleapis/google-api-go-client/issues/1489) [#1488](https://github.com/googleapis/google-api-go-client/issues/1488) [#1486](https://github.com/googleapis/google-api-go-client/issues/1486) [#1483](https://github.com/googleapis/google-api-go-client/issues/1483) [#1480](https://github.com/googleapis/google-api-go-client/issues/1480) +* re-enable playintegrity api generation ([#1482](https://github.com/googleapis/google-api-go-client/issues/1482)) ([d1de029](https://github.com/googleapis/google-api-go-client/commit/d1de029b37b7170628ca308874aad0c5b62bb6ff)), refs [#1479](https://github.com/googleapis/google-api-go-client/issues/1479) + ## [0.73.0](https://github.com/googleapis/google-api-go-client/compare/v0.72.0...v0.73.0) (2022-03-15) diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index 8f62b6513f5..0874c6bc733 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -829,7 +829,7 @@ } } }, - "revision": "20220304", + "revision": "20220317", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -920,14 +920,16 @@ "CUSTOMER_INITIATED_SUPPORT", "GOOGLE_INITIATED_SERVICE", "GOOGLE_INITIATED_REVIEW", - "THIRD_PARTY_DATA_REQUEST" + "THIRD_PARTY_DATA_REQUEST", + "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" ], "enumDescriptions": [ "Default value for proto, shouldn't be used.", "Customer made a request or raised an issue that required the principal to access customer data. `detail` is of the form (\"#####\" is the issue ID): * \"Feedback Report: #####\" * \"Case Number: #####\" * \"Case ID: #####\" * \"E-PIN Reference: #####\" * \"Google-#####\" * \"T-#####\"", - "The principal accessed customer data in order to diagnose or resolve a suspected issue in services or a known outage. Often this access is used to confirm that customers are not affected by a suspected service issue or to remediate a reversible system issue.", + "The principal accessed customer data in order to diagnose or resolve a suspected issue in services. Often this access is used to confirm that customers are not affected by a suspected service issue or to remediate a reversible system issue.", "Google initiated service for security, fraud, abuse, or compliance purposes.", - "The principal was compelled to access customer data in order to respond to a legal third party data request or process, including legal processes from customers themselves." + "The principal was compelled to access customer data in order to respond to a legal third party data request or process, including legal processes from customers themselves.", + "The principal accessed customer data in order to diagnose or resolve a suspected issue in services or a known outage." ], "type": "string" } @@ -1039,7 +1041,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index 5e7d3acc628..7af0fbce6ac 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -393,15 +393,17 @@ type AccessReason struct { // * "Case Number: #####" * "Case ID: #####" * "E-PIN Reference: #####" // * "Google-#####" * "T-#####" // "GOOGLE_INITIATED_SERVICE" - The principal accessed customer data - // in order to diagnose or resolve a suspected issue in services or a - // known outage. Often this access is used to confirm that customers are - // not affected by a suspected service issue or to remediate a - // reversible system issue. + // in order to diagnose or resolve a suspected issue in services. Often + // this access is used to confirm that customers are not affected by a + // suspected service issue or to remediate a reversible system issue. // "GOOGLE_INITIATED_REVIEW" - Google initiated service for security, // fraud, abuse, or compliance purposes. // "THIRD_PARTY_DATA_REQUEST" - The principal was compelled to access // customer data in order to respond to a legal third party data request // or process, including legal processes from customers themselves. + // "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" - The principal accessed + // customer data in order to diagnose or resolve a suspected issue in + // services or a known outage. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -608,8 +610,7 @@ func (s *DismissDecision) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 6cb155f1a64..89b0389614b 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20211203", + "revision": "20220318", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1479,7 +1479,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index bc7973181dd..78336e9c291 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -976,8 +976,7 @@ func (s *EgressTo) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json index 4a70f47e393..6638f357f2b 100644 --- a/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json +++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json @@ -2568,7 +2568,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://adexchangebuyer.googleapis.com/", "schemas": { "AbsoluteDateRange": { @@ -4164,7 +4164,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go index 7186c3b2fe6..af4f8b42028 100644 --- a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go +++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go @@ -2573,8 +2573,7 @@ func (s *Disapproval) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/adsense/v2/adsense-api.json b/adsense/v2/adsense-api.json index e130a359baf..bd12726ca3e 100644 --- a/adsense/v2/adsense-api.json +++ b/adsense/v2/adsense-api.json @@ -864,7 +864,7 @@ "Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.", "Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.", "Number of ad views per impression.", - "Total earnings.", + "Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.", "Number of results pages." ], "location": "query", @@ -1172,7 +1172,7 @@ "Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.", "Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.", "Number of ad views per impression.", - "Total earnings.", + "Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.", "Number of results pages." ], "location": "query", @@ -1567,7 +1567,7 @@ } } }, - "revision": "20220301", + "revision": "20220319", "rootUrl": "https://adsense.googleapis.com/", "schemas": { "Account": { @@ -1661,11 +1661,11 @@ "description": "Settings specific to content ads (AFC)." }, "displayName": { - "description": "Display name of the ad unit, as provided when the ad unit was created.", + "description": "Required. Display name of the ad unit, as provided when the ad unit was created.", "type": "string" }, "name": { - "description": "Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}", + "description": "Required. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}", "type": "string" }, "reportingDimensionId": { diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index cc278c425c9..5c4d3be5973 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -401,11 +401,11 @@ type AdUnit struct { // ContentAdsSettings: Settings specific to content ads (AFC). ContentAdsSettings *ContentAdsSettings `json:"contentAdsSettings,omitempty"` - // DisplayName: Display name of the ad unit, as provided when the ad - // unit was created. + // DisplayName: Required. Display name of the ad unit, as provided when + // the ad unit was created. DisplayName string `json:"displayName,omitempty"` - // Name: Resource name of the ad unit. Format: + // Name: Required. Resource name of the ad unit. Format: // accounts/{account}/adclients/{adclient}/adunits/{adunit} Name string `json:"name,omitempty"` @@ -4457,7 +4457,9 @@ func (c *AccountsReportsGenerateCall) Limit(limit int64) *AccountsReportsGenerat // clicks on an ad. CPC is calculated by dividing the estimated revenue // by the number of clicks received. // "ADS_PER_IMPRESSION" - Number of ad views per impression. -// "TOTAL_EARNINGS" - Total earnings. +// "TOTAL_EARNINGS" - Total earnings are the gross estimated earnings +// from revenue shared traffic before any parent and child account +// revenue share is applied. // "WEBSEARCH_RESULT_PAGES" - Number of results pages. func (c *AccountsReportsGenerateCall) Metrics(metrics ...string) *AccountsReportsGenerateCall { c.urlParams_.SetMulti("metrics", append([]string{}, metrics...)) @@ -4864,7 +4866,7 @@ func (c *AccountsReportsGenerateCall) Do(opts ...googleapi.CallOption) (*ReportR // "Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.", // "Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.", // "Number of ad views per impression.", - // "Total earnings.", + // "Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.", // "Number of results pages." // ], // "location": "query", @@ -5209,7 +5211,9 @@ func (c *AccountsReportsGenerateCsvCall) Limit(limit int64) *AccountsReportsGene // clicks on an ad. CPC is calculated by dividing the estimated revenue // by the number of clicks received. // "ADS_PER_IMPRESSION" - Number of ad views per impression. -// "TOTAL_EARNINGS" - Total earnings. +// "TOTAL_EARNINGS" - Total earnings are the gross estimated earnings +// from revenue shared traffic before any parent and child account +// revenue share is applied. // "WEBSEARCH_RESULT_PAGES" - Number of results pages. func (c *AccountsReportsGenerateCsvCall) Metrics(metrics ...string) *AccountsReportsGenerateCsvCall { c.urlParams_.SetMulti("metrics", append([]string{}, metrics...)) @@ -5616,7 +5620,7 @@ func (c *AccountsReportsGenerateCsvCall) Do(opts ...googleapi.CallOption) (*Http // "Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.", // "Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.", // "Number of ad views per impression.", - // "Total earnings.", + // "Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.", // "Number of results pages." // ], // "location": "query", diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index 92a3be1bcc2..227bc9db25a 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20220307", + "revision": "20220321", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AccountSuspensionDetails": { @@ -1086,7 +1086,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index 55096c7b740..1414c39444f 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -1208,8 +1208,7 @@ func (s *DomainWideTakeoutInitiated) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 237e71f5bbb..04639a93298 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -2556,7 +2556,7 @@ } } }, - "revision": "20220312", + "revision": "20220322", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccount": { @@ -3933,7 +3933,23 @@ "type": "string" }, "parent": { - "description": "Immutable. Resource name of this property's logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account} Example: \"accounts/100\"", + "description": "Immutable. Resource name of this property's logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account}, properties/{property} Example: \"accounts/100\", \"properties/101\"", + "type": "string" + }, + "propertyType": { + "description": "Immutable. The property type for this Property resource. When creating a property, if the type is \"PROPERTY_TYPE_UNSPECIFIED\", then \"ORDINARY_PROPERTY\" will be implied. \"SUBPROPERTY\" and \"ROLLUP_PROPERTY\" types cannot yet be created via Google Analytics Admin API.", + "enum": [ + "PROPERTY_TYPE_UNSPECIFIED", + "PROPERTY_TYPE_ORDINARY", + "PROPERTY_TYPE_SUBPROPERTY", + "PROPERTY_TYPE_ROLLUP" + ], + "enumDescriptions": [ + "Unknown or unspecified property type", + "Ordinary GA4 property", + "GA4 subproperty", + "GA4 rollup property" + ], "type": "string" }, "serviceLevel": { @@ -3972,9 +3988,29 @@ "description": "Display name for the property referred to in this property summary.", "type": "string" }, + "parent": { + "description": "Resource name of this property's logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account}, properties/{property} Example: \"accounts/100\", \"properties/200\"", + "type": "string" + }, "property": { "description": "Resource name of property referred to by this property summary Format: properties/{property_id} Example: \"properties/1000\"", "type": "string" + }, + "propertyType": { + "description": "The property's property type.", + "enum": [ + "PROPERTY_TYPE_UNSPECIFIED", + "PROPERTY_TYPE_ORDINARY", + "PROPERTY_TYPE_SUBPROPERTY", + "PROPERTY_TYPE_ROLLUP" + ], + "enumDescriptions": [ + "Unknown or unspecified property type", + "Ordinary GA4 property", + "GA4 subproperty", + "GA4 rollup property" + ], + "type": "string" } }, "type": "object" @@ -4153,7 +4189,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index eeffe8c41a3..fcf0b6b3f57 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -2634,9 +2634,23 @@ type GoogleAnalyticsAdminV1alphaProperty struct { // Parent: Immutable. Resource name of this property's logical parent. // Note: The Property-Moving UI can be used to change the parent. - // Format: accounts/{account} Example: "accounts/100" + // Format: accounts/{account}, properties/{property} Example: + // "accounts/100", "properties/101" Parent string `json:"parent,omitempty"` + // PropertyType: Immutable. The property type for this Property + // resource. When creating a property, if the type is + // "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be + // created via Google Analytics Admin API. + // + // Possible values: + // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type + // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property + // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty + // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + PropertyType string `json:"propertyType,omitempty"` + // ServiceLevel: Output only. The Google Analytics service level that // applies to this property. // @@ -2695,10 +2709,25 @@ type GoogleAnalyticsAdminV1alphaPropertySummary struct { // property summary. DisplayName string `json:"displayName,omitempty"` + // Parent: Resource name of this property's logical parent. Note: The + // Property-Moving UI can be used to change the parent. Format: + // accounts/{account}, properties/{property} Example: "accounts/100", + // "properties/200" + Parent string `json:"parent,omitempty"` + // Property: Resource name of property referred to by this property // summary Format: properties/{property_id} Example: "properties/1000" Property string `json:"property,omitempty"` + // PropertyType: The property's property type. + // + // Possible values: + // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type + // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property + // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty + // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + PropertyType string `json:"propertyType,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 @@ -2996,8 +3025,7 @@ func (s *GoogleAnalyticsAdminV1alphaUserLink) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 293373d5833..f1a9e39b5d5 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20220104", + "revision": "20220322", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -1139,7 +1139,7 @@ "type": "object" }, "OrderBy": { - "description": "The sort options.", + "description": "Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.", "id": "OrderBy", "properties": { "desc": { diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index ba03b8a41b5..bbcb59db653 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -1673,7 +1673,9 @@ func (s *NumericValue) UnmarshalJSON(data []byte) error { return nil } -// OrderBy: The sort options. +// OrderBy: Order bys define how rows will be sorted in the response. +// For example, ordering rows by descending event count is one ordering, +// and ordering rows by the event name string is a different ordering. type OrderBy struct { // Desc: If true, sorts by descending order. Desc bool `json:"desc,omitempty"` diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 60e12af88df..8b1cd0f4884 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -825,7 +825,7 @@ } } }, - "revision": "20220207", + "revision": "20220319", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { @@ -1339,7 +1339,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index 156861e171d..0e93f01473c 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -1183,8 +1183,7 @@ func (s *Dpc) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 109372c40f7..856c42ef168 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1004,7 +1004,7 @@ } } }, - "revision": "20220307", + "revision": "20220314", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdvancedSecurityOverrides": { @@ -1383,6 +1383,20 @@ }, "type": "array" }, + "alwaysOnVpnLockdownExemption": { + "description": "Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.", + "enum": [ + "ALWAYS_ON_VPN_LOCKDOWN_EXEMPTION_UNSPECIFIED", + "VPN_LOCKDOWN_ENFORCED", + "VPN_LOCKDOWN_EXEMPTION" + ], + "enumDescriptions": [ + "Unspecified. Defaults to VPN_LOCKDOWN_ENFORCED.", + "The app respects the always-on VPN lockdown setting.", + "The app is exempt from the always-on VPN lockdown setting." + ], + "type": "string" + }, "autoUpdateMode": { "description": "Controls the auto-update mode for the app.", "enum": [ @@ -3316,20 +3330,6 @@ "The timeout period is set to 24 hours." ], "type": "string" - }, - "unifiedLockSettings": { - "description": "Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This has no effect on other devices. This can be set only if password_scope is set to SCOPE_PROFILE, the policy will be rejected otherwise. If user has not set a separate work lock and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a NonComplianceDetail is reported with nonComplianceReason set to USER_ACTION.", - "enum": [ - "UNIFIED_LOCK_SETTINGS_UNSPECIFIED", - "ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK", - "REQUIRE_SEPARATE_WORK_LOCK" - ], - "enumDescriptions": [ - "Unspecified. Defaults to ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK.", - "A common lock for the device and the work profile is allowed.", - "A separate lock for the work profile is required." - ], - "type": "string" } }, "type": "object" @@ -3838,7 +3838,7 @@ }, "passwordRequirements": { "$ref": "PasswordRequirements", - "description": "Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be used here" + "description": "Password requirements. The field password_requirements.require_password_unlock must not be set. DEPRECATED - Use passwordPolicies.Note:Complexity-based values of PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and COMPLEXITY_HIGH, cannot be used here." }, "permissionGrants": { "description": "Explicit permission or group grants or denials for all apps. These values override the default_permission_policy.", diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index db3fedcfaf6..34aed525434 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -702,6 +702,29 @@ type ApplicationPolicy struct { // available in AppTrackInfo. AccessibleTrackIds []string `json:"accessibleTrackIds,omitempty"` + // AlwaysOnVpnLockdownExemption: Specifies whether the app is allowed + // networking when the VPN is not connected and + // alwaysOnVpnPackage.lockdownEnabled is enabled. If set to + // VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set + // to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only + // supported on devices running Android 10 and above. If this is not + // supported by the device, the device will contain a + // NonComplianceDetail with non_compliance_reason set to API_LEVEL and a + // fieldPath. If this is not applicable to the app, the device will + // contain a NonComplianceDetail with non_compliance_reason set to + // UNSUPPORTED and a fieldPath. The fieldPath is set to + // applications[i].alwaysOnVpnLockdownExemption, where i is the index of + // the package in the applications policy. + // + // Possible values: + // "ALWAYS_ON_VPN_LOCKDOWN_EXEMPTION_UNSPECIFIED" - Unspecified. + // Defaults to VPN_LOCKDOWN_ENFORCED. + // "VPN_LOCKDOWN_ENFORCED" - The app respects the always-on VPN + // lockdown setting. + // "VPN_LOCKDOWN_EXEMPTION" - The app is exempt from the always-on VPN + // lockdown setting. + AlwaysOnVpnLockdownExemption string `json:"alwaysOnVpnLockdownExemption,omitempty"` + // AutoUpdateMode: Controls the auto-update mode for the app. // // Possible values: @@ -3349,24 +3372,6 @@ type PasswordRequirements struct { // "REQUIRE_EVERY_DAY" - The timeout period is set to 24 hours. RequirePasswordUnlock string `json:"requirePasswordUnlock,omitempty"` - // UnifiedLockSettings: Controls whether a unified lock is allowed for - // the device and the work profile, on devices running Android 9 and - // above with a work profile. This has no effect on other devices. This - // can be set only if password_scope is set to SCOPE_PROFILE, the policy - // will be rejected otherwise. If user has not set a separate work lock - // and this field is set to REQUIRE_SEPARATE_WORK_LOCK, a - // NonComplianceDetail is reported with nonComplianceReason set to - // USER_ACTION. - // - // Possible values: - // "UNIFIED_LOCK_SETTINGS_UNSPECIFIED" - Unspecified. Defaults to - // ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK. - // "ALLOW_UNIFIED_WORK_AND_PERSONAL_LOCK" - A common lock for the - // device and the work profile is allowed. - // "REQUIRE_SEPARATE_WORK_LOCK" - A separate lock for the work profile - // is required. - UnifiedLockSettings string `json:"unifiedLockSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. // "MaximumFailedPasswordsForWipe") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -3944,8 +3949,7 @@ type Policy struct { // password_requirements.require_password_unlock must not be set. // DEPRECATED - Use passwordPolicies.Note:Complexity-based values of // PasswordQuality, that is, COMPLEXITY_LOW, COMPLEXITY_MEDIUM, and - // COMPLEXITY_HIGH, cannot be used here. unified_lock_settings cannot be - // used here + // COMPLEXITY_HIGH, cannot be used here. PasswordRequirements *PasswordRequirements `json:"passwordRequirements,omitempty"` // PermissionGrants: Explicit permission or group grants or denials for diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 7ff1d35054d..78fcdeb325e 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -104,6 +104,113 @@ }, "protocol": "rest", "resources": { + "applications": { + "resources": { + "deviceTierConfigs": { + "methods": { + "create": { + "description": "Creates a new device tier config for an app.", + "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + "httpMethod": "POST", + "id": "androidpublisher.applications.deviceTierConfigs.create", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "allowUnknownDevices": { + "description": "Whether the service should accept device IDs that are unknown to Play's device catalog.", + "location": "query", + "type": "boolean" + }, + "packageName": { + "description": "Package name of the app.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + "request": { + "$ref": "DeviceTierConfig" + }, + "response": { + "$ref": "DeviceTierConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "get": { + "description": "Returns a particular device tier config.", + "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}", + "httpMethod": "GET", + "id": "androidpublisher.applications.deviceTierConfigs.get", + "parameterOrder": [ + "packageName", + "deviceTierConfigId" + ], + "parameters": { + "deviceTierConfigId": { + "description": "Required. Id of an existing device tier config.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "packageName": { + "description": "Package name of the app.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}", + "response": { + "$ref": "DeviceTierConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "list": { + "description": "Returns created device tier configs, ordered by descending creation time.", + "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + "httpMethod": "GET", + "id": "androidpublisher.applications.deviceTierConfigs.list", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "packageName": { + "description": "Package name of the app.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of device tier configs to return. The service may return fewer than this value. If unspecified, at most 10 device tier configs will be returned. The maximum value for this field is 100; values above 100 will be coerced to 100. Device tier configs will be ordered by descending creation time.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListDeviceTierConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + "response": { + "$ref": "ListDeviceTierConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + } + } + } + } + }, "edits": { "methods": { "commit": { @@ -1454,7 +1561,7 @@ "testers": { "methods": { "get": { - "description": "Gets testers.", + "description": "Gets testers. Note: Testers resource does not support email lists.", "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", "httpMethod": "GET", "id": "androidpublisher.edits.testers.get", @@ -1492,7 +1599,7 @@ ] }, "patch": { - "description": "Patches testers.", + "description": "Patches testers. Note: Testers resource does not support email lists.", "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", "httpMethod": "PATCH", "id": "androidpublisher.edits.testers.patch", @@ -1533,7 +1640,7 @@ ] }, "update": { - "description": "Updates testers.", + "description": "Updates testers. Note: Testers resource does not support email lists.", "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", "httpMethod": "PUT", "id": "androidpublisher.edits.testers.update", @@ -3040,7 +3147,7 @@ } } }, - "revision": "20220302", + "revision": "20220329", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Apk": { @@ -3335,6 +3442,39 @@ }, "type": "object" }, + "DeviceGroup": { + "description": "LINT.IfChange A group of devices. A group is defined by a set of device selectors. A device belongs to the group if it matches any selector (logical OR).", + "id": "DeviceGroup", + "properties": { + "deviceSelectors": { + "description": "Device selectors for this group. A device matching any of the selectors is included in this group.", + "items": { + "$ref": "DeviceSelector" + }, + "type": "array" + }, + "name": { + "description": "The name of the group.", + "type": "string" + } + }, + "type": "object" + }, + "DeviceId": { + "description": "Identifier of a device.", + "id": "DeviceId", + "properties": { + "buildBrand": { + "description": "Value of Build.BRAND.", + "type": "string" + }, + "buildDevice": { + "description": "Value of Build.DEVICE.", + "type": "string" + } + }, + "type": "object" + }, "DeviceMetadata": { "description": "Characteristics of the user's device.", "id": "DeviceMetadata", @@ -3391,6 +3531,62 @@ }, "type": "object" }, + "DeviceRam": { + "description": "Conditions about a device's RAM capabilities.", + "id": "DeviceRam", + "properties": { + "maxBytes": { + "description": "Maximum RAM in bytes (bound excluded).", + "format": "int64", + "type": "string" + }, + "minBytes": { + "description": "Minimum RAM in bytes (bound included).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "DeviceSelector": { + "description": "Selector for a device group. A selector consists of a set of conditions on the device that should all match (logical AND) to determine a device group eligibility. For instance, if a selector specifies RAM conditions, device model inclusion and device model exclusion, a device is considered to match if: device matches RAM conditions AND device matches one of the included device models AND device doesn't match excluded device models", + "id": "DeviceSelector", + "properties": { + "deviceRam": { + "$ref": "DeviceRam", + "description": "Conditions on the device's RAM." + }, + "excludedDeviceIds": { + "description": "Device models excluded by this selector, even if they match all other conditions.", + "items": { + "$ref": "DeviceId" + }, + "type": "array" + }, + "forbiddenSystemFeatures": { + "description": "A device that has any of these system features is excluded by this selector, even if it matches all other conditions.", + "items": { + "$ref": "SystemFeature" + }, + "type": "array" + }, + "includedDeviceIds": { + "description": "Device models included by this selector.", + "items": { + "$ref": "DeviceId" + }, + "type": "array" + }, + "requiredSystemFeatures": { + "description": "A device needs to have all these system features to be included by the selector.", + "items": { + "$ref": "SystemFeature" + }, + "type": "array" + } + }, + "type": "object" + }, "DeviceSpec": { "description": "The device spec used to generate a system APK.", "id": "DeviceSpec", @@ -3417,6 +3613,63 @@ }, "type": "object" }, + "DeviceTier": { + "description": "A single device tier. Devices matching any of the device groups in device_group_names are considered to match the tier.", + "id": "DeviceTier", + "properties": { + "deviceGroupNames": { + "description": "Groups of devices included in this tier. These groups must be defined explicitly under device_groups in this configuration.", + "items": { + "type": "string" + }, + "type": "array" + }, + "level": { + "description": "The priority level of the tier. Tiers are evaluated in descending order of level: the highest level tier has the highest priority. The highest tier matching a given device is selected for that device. You should use a contiguous range of levels for your tiers in a tier set; tier levels in a tier set must be unique. For instance, if your tier set has 4 tiers (including the global fallback), you should define tiers 1, 2 and 3 in this configuration. Note: tier 0 is implicitly defined as a global fallback and selected for devices that don't match any of the tiers explicitly defined here. You mustn't define level 0 explicitly in this configuration.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DeviceTierConfig": { + "description": "LINT.IfChange Configuration describing device targeting criteria for the content of an app.", + "id": "DeviceTierConfig", + "properties": { + "deviceGroups": { + "description": "Definition of device groups for the app.", + "items": { + "$ref": "DeviceGroup" + }, + "type": "array" + }, + "deviceTierConfigId": { + "description": "Output only. The device tier config ID.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "deviceTierSet": { + "$ref": "DeviceTierSet", + "description": "Definition of the set of device tiers for the app." + } + }, + "type": "object" + }, + "DeviceTierSet": { + "description": "A set of device tiers. A tier set determines what variation of app content gets served to a specific device, for device-targeted content. You should assign a priority level to each tier, which determines the ordering by which they are evaluated by Play. See the documentation of DeviceTier.level for more details.", + "id": "DeviceTierSet", + "properties": { + "deviceTiers": { + "description": "Device tiers belonging to the set.", + "items": { + "$ref": "DeviceTier" + }, + "type": "array" + } + }, + "type": "object" + }, "ExpansionFile": { "description": "An expansion file. The resource for ExpansionFilesService.", "id": "ExpansionFile", @@ -3940,6 +4193,24 @@ }, "type": "object" }, + "ListDeviceTierConfigsResponse": { + "description": "Response listing existing device tier configs.", + "id": "ListDeviceTierConfigsResponse", + "properties": { + "deviceTierConfigs": { + "description": "Device tier configs created by the developer.", + "items": { + "$ref": "DeviceTierConfig" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "ListUsersResponse": { "description": "A response containing one or more users with access to an account.", "id": "ListUsersResponse", @@ -4554,8 +4825,19 @@ }, "type": "object" }, + "SystemFeature": { + "description": "Representation of a system feature.", + "id": "SystemFeature", + "properties": { + "name": { + "description": "The name of the feature.", + "type": "string" + } + }, + "type": "object" + }, "Testers": { - "description": "The testers of an app. The resource for TestersService.", + "description": "The testers of an app. The resource for TestersService. Note: while it is possible in the Play Console UI to add testers via email lists, email lists are not supported by this resource.", "id": "Testers", "properties": { "googleGroups": { diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 56de6e67222..7eb67986518 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -117,6 +117,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Applications = NewApplicationsService(s) s.Edits = NewEditsService(s) s.Generatedapks = NewGeneratedapksService(s) s.Grants = NewGrantsService(s) @@ -136,6 +137,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Applications *ApplicationsService + Edits *EditsService Generatedapks *GeneratedapksService @@ -166,6 +169,27 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewApplicationsService(s *Service) *ApplicationsService { + rs := &ApplicationsService{s: s} + rs.DeviceTierConfigs = NewApplicationsDeviceTierConfigsService(s) + return rs +} + +type ApplicationsService struct { + s *Service + + DeviceTierConfigs *ApplicationsDeviceTierConfigsService +} + +func NewApplicationsDeviceTierConfigsService(s *Service) *ApplicationsDeviceTierConfigsService { + rs := &ApplicationsDeviceTierConfigsService{s: s} + return rs +} + +type ApplicationsDeviceTierConfigsService struct { + s *Service +} + func NewEditsService(s *Service) *EditsService { rs := &EditsService{s: s} rs.Apks = NewEditsApksService(s) @@ -1063,6 +1087,72 @@ func (s *DeveloperComment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceGroup: LINT.IfChange A group of devices. A group is defined by +// a set of device selectors. A device belongs to the group if it +// matches any selector (logical OR). +type DeviceGroup struct { + // DeviceSelectors: Device selectors for this group. A device matching + // any of the selectors is included in this group. + DeviceSelectors []*DeviceSelector `json:"deviceSelectors,omitempty"` + + // Name: The name of the group. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceSelectors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceSelectors") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceGroup) MarshalJSON() ([]byte, error) { + type NoMethod DeviceGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceId: Identifier of a device. +type DeviceId struct { + // BuildBrand: Value of Build.BRAND. + BuildBrand string `json:"buildBrand,omitempty"` + + // BuildDevice: Value of Build.DEVICE. + BuildDevice string `json:"buildDevice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BuildBrand") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildBrand") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceId) MarshalJSON() ([]byte, error) { + type NoMethod DeviceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeviceMetadata: Characteristics of the user's device. type DeviceMetadata struct { // CpuMake: Device CPU make, e.g. "Qualcomm" @@ -1122,6 +1212,87 @@ func (s *DeviceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceRam: Conditions about a device's RAM capabilities. +type DeviceRam struct { + // MaxBytes: Maximum RAM in bytes (bound excluded). + MaxBytes int64 `json:"maxBytes,omitempty,string"` + + // MinBytes: Minimum RAM in bytes (bound included). + MinBytes int64 `json:"minBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxBytes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxBytes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceRam) MarshalJSON() ([]byte, error) { + type NoMethod DeviceRam + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceSelector: Selector for a device group. A selector consists of a +// set of conditions on the device that should all match (logical AND) +// to determine a device group eligibility. For instance, if a selector +// specifies RAM conditions, device model inclusion and device model +// exclusion, a device is considered to match if: device matches RAM +// conditions AND device matches one of the included device models AND +// device doesn't match excluded device models +type DeviceSelector struct { + // DeviceRam: Conditions on the device's RAM. + DeviceRam *DeviceRam `json:"deviceRam,omitempty"` + + // ExcludedDeviceIds: Device models excluded by this selector, even if + // they match all other conditions. + ExcludedDeviceIds []*DeviceId `json:"excludedDeviceIds,omitempty"` + + // ForbiddenSystemFeatures: A device that has any of these system + // features is excluded by this selector, even if it matches all other + // conditions. + ForbiddenSystemFeatures []*SystemFeature `json:"forbiddenSystemFeatures,omitempty"` + + // IncludedDeviceIds: Device models included by this selector. + IncludedDeviceIds []*DeviceId `json:"includedDeviceIds,omitempty"` + + // RequiredSystemFeatures: A device needs to have all these system + // features to be included by the selector. + RequiredSystemFeatures []*SystemFeature `json:"requiredSystemFeatures,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceRam") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceRam") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceSelector) MarshalJSON() ([]byte, error) { + type NoMethod DeviceSelector + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeviceSpec: The device spec used to generate a system APK. type DeviceSpec struct { // ScreenDensity: Screen dpi. @@ -1159,6 +1330,121 @@ func (s *DeviceSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceTier: A single device tier. Devices matching any of the device +// groups in device_group_names are considered to match the tier. +type DeviceTier struct { + // DeviceGroupNames: Groups of devices included in this tier. These + // groups must be defined explicitly under device_groups in this + // configuration. + DeviceGroupNames []string `json:"deviceGroupNames,omitempty"` + + // Level: The priority level of the tier. Tiers are evaluated in + // descending order of level: the highest level tier has the highest + // priority. The highest tier matching a given device is selected for + // that device. You should use a contiguous range of levels for your + // tiers in a tier set; tier levels in a tier set must be unique. For + // instance, if your tier set has 4 tiers (including the global + // fallback), you should define tiers 1, 2 and 3 in this configuration. + // Note: tier 0 is implicitly defined as a global fallback and selected + // for devices that don't match any of the tiers explicitly defined + // here. You mustn't define level 0 explicitly in this configuration. + Level int64 `json:"level,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceGroupNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceGroupNames") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceTier) MarshalJSON() ([]byte, error) { + type NoMethod DeviceTier + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceTierConfig: LINT.IfChange Configuration describing device +// targeting criteria for the content of an app. +type DeviceTierConfig struct { + // DeviceGroups: Definition of device groups for the app. + DeviceGroups []*DeviceGroup `json:"deviceGroups,omitempty"` + + // DeviceTierConfigId: Output only. The device tier config ID. + DeviceTierConfigId int64 `json:"deviceTierConfigId,omitempty,string"` + + // DeviceTierSet: Definition of the set of device tiers for the app. + DeviceTierSet *DeviceTierSet `json:"deviceTierSet,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceGroups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceGroups") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceTierConfig) MarshalJSON() ([]byte, error) { + type NoMethod DeviceTierConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceTierSet: A set of device tiers. A tier set determines what +// variation of app content gets served to a specific device, for +// device-targeted content. You should assign a priority level to each +// tier, which determines the ordering by which they are evaluated by +// Play. See the documentation of DeviceTier.level for more details. +type DeviceTierSet struct { + // DeviceTiers: Device tiers belonging to the set. + DeviceTiers []*DeviceTier `json:"deviceTiers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceTiers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceTiers") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceTierSet) MarshalJSON() ([]byte, error) { + type NoMethod DeviceTierSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExpansionFile: An expansion file. The resource for // ExpansionFilesService. type ExpansionFile struct { @@ -1994,6 +2280,45 @@ func (s *IntroductoryPriceInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListDeviceTierConfigsResponse: Response listing existing device tier +// configs. +type ListDeviceTierConfigsResponse struct { + // DeviceTierConfigs: Device tier configs created by the developer. + DeviceTierConfigs []*DeviceTierConfig `json:"deviceTierConfigs,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceTierConfigs") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceTierConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceTierConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDeviceTierConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListUsersResponse: A response containing one or more users with // access to an account. type ListUsersResponse struct { @@ -3134,7 +3459,37 @@ func (s *SystemApksListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SystemFeature: Representation of a system feature. +type SystemFeature struct { + // Name: The name of the feature. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *SystemFeature) MarshalJSON() ([]byte, error) { + type NoMethod SystemFeature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Testers: The testers of an app. The resource for TestersService. +// Note: while it is possible in the Play Console UI to add testers via +// email lists, email lists are not supported by this resource. type Testers struct { // GoogleGroups: All testing Google Groups, as email addresses. GoogleGroups []string `json:"googleGroups,omitempty"` @@ -3801,6 +4156,514 @@ func (s *VoidedPurchasesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "androidpublisher.applications.deviceTierConfigs.create": + +type ApplicationsDeviceTierConfigsCreateCall struct { + s *Service + packageName string + devicetierconfig *DeviceTierConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new device tier config for an app. +// +// - packageName: Package name of the app. +func (r *ApplicationsDeviceTierConfigsService) Create(packageName string, devicetierconfig *DeviceTierConfig) *ApplicationsDeviceTierConfigsCreateCall { + c := &ApplicationsDeviceTierConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.packageName = packageName + c.devicetierconfig = devicetierconfig + return c +} + +// AllowUnknownDevices sets the optional parameter +// "allowUnknownDevices": Whether the service should accept device IDs +// that are unknown to Play's device catalog. +func (c *ApplicationsDeviceTierConfigsCreateCall) AllowUnknownDevices(allowUnknownDevices bool) *ApplicationsDeviceTierConfigsCreateCall { + c.urlParams_.Set("allowUnknownDevices", fmt.Sprint(allowUnknownDevices)) + 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 *ApplicationsDeviceTierConfigsCreateCall) Fields(s ...googleapi.Field) *ApplicationsDeviceTierConfigsCreateCall { + 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 *ApplicationsDeviceTierConfigsCreateCall) Context(ctx context.Context) *ApplicationsDeviceTierConfigsCreateCall { + 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 *ApplicationsDeviceTierConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ApplicationsDeviceTierConfigsCreateCall) 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.devicetierconfig) + 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, "androidpublisher/v3/applications/{packageName}/deviceTierConfigs") + 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{ + "packageName": c.packageName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "androidpublisher.applications.deviceTierConfigs.create" call. +// Exactly one of *DeviceTierConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DeviceTierConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ApplicationsDeviceTierConfigsCreateCall) Do(opts ...googleapi.CallOption) (*DeviceTierConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceTierConfig{ + 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 device tier config for an app.", + // "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + // "httpMethod": "POST", + // "id": "androidpublisher.applications.deviceTierConfigs.create", + // "parameterOrder": [ + // "packageName" + // ], + // "parameters": { + // "allowUnknownDevices": { + // "description": "Whether the service should accept device IDs that are unknown to Play's device catalog.", + // "location": "query", + // "type": "boolean" + // }, + // "packageName": { + // "description": "Package name of the app.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + // "request": { + // "$ref": "DeviceTierConfig" + // }, + // "response": { + // "$ref": "DeviceTierConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "androidpublisher.applications.deviceTierConfigs.get": + +type ApplicationsDeviceTierConfigsGetCall struct { + s *Service + packageName string + deviceTierConfigId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a particular device tier config. +// +// - deviceTierConfigId: Id of an existing device tier config. +// - packageName: Package name of the app. +func (r *ApplicationsDeviceTierConfigsService) Get(packageName string, deviceTierConfigId int64) *ApplicationsDeviceTierConfigsGetCall { + c := &ApplicationsDeviceTierConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.packageName = packageName + c.deviceTierConfigId = deviceTierConfigId + 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 *ApplicationsDeviceTierConfigsGetCall) Fields(s ...googleapi.Field) *ApplicationsDeviceTierConfigsGetCall { + 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 *ApplicationsDeviceTierConfigsGetCall) IfNoneMatch(entityTag string) *ApplicationsDeviceTierConfigsGetCall { + 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 *ApplicationsDeviceTierConfigsGetCall) Context(ctx context.Context) *ApplicationsDeviceTierConfigsGetCall { + 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 *ApplicationsDeviceTierConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ApplicationsDeviceTierConfigsGetCall) 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, "androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}") + 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{ + "packageName": c.packageName, + "deviceTierConfigId": strconv.FormatInt(c.deviceTierConfigId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "androidpublisher.applications.deviceTierConfigs.get" call. +// Exactly one of *DeviceTierConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DeviceTierConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ApplicationsDeviceTierConfigsGetCall) Do(opts ...googleapi.CallOption) (*DeviceTierConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceTierConfig{ + 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 a particular device tier config.", + // "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}", + // "httpMethod": "GET", + // "id": "androidpublisher.applications.deviceTierConfigs.get", + // "parameterOrder": [ + // "packageName", + // "deviceTierConfigId" + // ], + // "parameters": { + // "deviceTierConfigId": { + // "description": "Required. Id of an existing device tier config.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "packageName": { + // "description": "Package name of the app.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}", + // "response": { + // "$ref": "DeviceTierConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "androidpublisher.applications.deviceTierConfigs.list": + +type ApplicationsDeviceTierConfigsListCall struct { + s *Service + packageName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns created device tier configs, ordered by descending +// creation time. +// +// - packageName: Package name of the app. +func (r *ApplicationsDeviceTierConfigsService) List(packageName string) *ApplicationsDeviceTierConfigsListCall { + c := &ApplicationsDeviceTierConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.packageName = packageName + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of device tier configs to return. The service may return fewer than +// this value. If unspecified, at most 10 device tier configs will be +// returned. The maximum value for this field is 100; values above 100 +// will be coerced to 100. Device tier configs will be ordered by +// descending creation time. +func (c *ApplicationsDeviceTierConfigsListCall) PageSize(pageSize int64) *ApplicationsDeviceTierConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDeviceTierConfigs` call. Provide this +// to retrieve the subsequent page. +func (c *ApplicationsDeviceTierConfigsListCall) PageToken(pageToken string) *ApplicationsDeviceTierConfigsListCall { + 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 *ApplicationsDeviceTierConfigsListCall) Fields(s ...googleapi.Field) *ApplicationsDeviceTierConfigsListCall { + 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 *ApplicationsDeviceTierConfigsListCall) IfNoneMatch(entityTag string) *ApplicationsDeviceTierConfigsListCall { + 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 *ApplicationsDeviceTierConfigsListCall) Context(ctx context.Context) *ApplicationsDeviceTierConfigsListCall { + 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 *ApplicationsDeviceTierConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ApplicationsDeviceTierConfigsListCall) 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, "androidpublisher/v3/applications/{packageName}/deviceTierConfigs") + 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{ + "packageName": c.packageName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "androidpublisher.applications.deviceTierConfigs.list" call. +// Exactly one of *ListDeviceTierConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDeviceTierConfigsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ApplicationsDeviceTierConfigsListCall) Do(opts ...googleapi.CallOption) (*ListDeviceTierConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceTierConfigsResponse{ + 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 created device tier configs, ordered by descending creation time.", + // "flatPath": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + // "httpMethod": "GET", + // "id": "androidpublisher.applications.deviceTierConfigs.list", + // "parameterOrder": [ + // "packageName" + // ], + // "parameters": { + // "packageName": { + // "description": "Package name of the app.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of device tier configs to return. The service may return fewer than this value. If unspecified, at most 10 device tier configs will be returned. The maximum value for this field is 100; values above 100 will be coerced to 100. Device tier configs will be ordered by descending creation time.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListDeviceTierConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "androidpublisher/v3/applications/{packageName}/deviceTierConfigs", + // "response": { + // "$ref": "ListDeviceTierConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// 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 *ApplicationsDeviceTierConfigsListCall) Pages(ctx context.Context, f func(*ListDeviceTierConfigsResponse) 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 "androidpublisher.edits.commit": type EditsCommitCall struct { @@ -8917,7 +9780,8 @@ type EditsTestersGetCall struct { header_ http.Header } -// Get: Gets testers. +// Get: Gets testers. Note: Testers resource does not support email +// lists. // // - editId: Identifier of the edit. // - packageName: Package name of the app. @@ -9031,7 +9895,7 @@ func (c *EditsTestersGetCall) Do(opts ...googleapi.CallOption) (*Testers, error) } return ret, nil // { - // "description": "Gets testers.", + // "description": "Gets testers. Note: Testers resource does not support email lists.", // "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", // "httpMethod": "GET", // "id": "androidpublisher.edits.testers.get", @@ -9084,7 +9948,8 @@ type EditsTestersPatchCall struct { header_ http.Header } -// Patch: Patches testers. +// Patch: Patches testers. Note: Testers resource does not support email +// lists. // // - editId: Identifier of the edit. // - packageName: Package name of the app. @@ -9191,7 +10056,7 @@ func (c *EditsTestersPatchCall) Do(opts ...googleapi.CallOption) (*Testers, erro } return ret, nil // { - // "description": "Patches testers.", + // "description": "Patches testers. Note: Testers resource does not support email lists.", // "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", // "httpMethod": "PATCH", // "id": "androidpublisher.edits.testers.patch", @@ -9247,7 +10112,8 @@ type EditsTestersUpdateCall struct { header_ http.Header } -// Update: Updates testers. +// Update: Updates testers. Note: Testers resource does not support +// email lists. // // - editId: Identifier of the edit. // - packageName: Package name of the app. @@ -9354,7 +10220,7 @@ func (c *EditsTestersUpdateCall) Do(opts ...googleapi.CallOption) (*Testers, err } return ret, nil // { - // "description": "Updates testers.", + // "description": "Updates testers. Note: Testers resource does not support email lists.", // "flatPath": "androidpublisher/v3/applications/{packageName}/edits/{editId}/testers/{track}", // "httpMethod": "PUT", // "id": "androidpublisher.edits.testers.update", diff --git a/api-list.json b/api-list.json index 7e75312994c..42085478027 100644 --- a/api-list.json +++ b/api-list.json @@ -532,7 +532,7 @@ "name": "authorizedbuyersmarketplace", "version": "v1", "title": "Authorized Buyers Marketplace API", - "description": "The Authorized Buyers Marketplace API allows buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", + "description": "The Authorized Buyers Marketplace API lets buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", "discoveryRestUrl": "https://authorizedbuyersmarketplace.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/apigateway/v1/apigateway-api.json b/apigateway/v1/apigateway-api.json index 4a100753e04..6beccd6708e 100644 --- a/apigateway/v1/apigateway-api.json +++ b/apigateway/v1/apigateway-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20211110", + "revision": "20220323", "rootUrl": "https://apigateway.googleapis.com/", "schemas": { "ApigatewayApi": { @@ -1793,7 +1793,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/apigateway/v1/apigateway-gen.go b/apigateway/v1/apigateway-gen.go index 1d535099d50..258ad611ac9 100644 --- a/apigateway/v1/apigateway-gen.go +++ b/apigateway/v1/apigateway-gen.go @@ -1428,8 +1428,7 @@ func (s *ApigatewayTestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index e7faac22cc7..3618d149e9a 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -7588,7 +7588,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -9669,6 +9669,25 @@ "serviceAttachment": { "description": "Format: projects/*/regions/*/serviceAttachments/*", "type": "string" + }, + "state": { + "description": "Output only. State of the endpoint attachment. Values other than `ACTIVE` mean the resource is not ready to use.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "UPDATING" + ], + "enumDescriptions": [ + "Resource is in an unspecified state.", + "Resource is being created.", + "Resource is provisioned and ready to use.", + "The resource is being deleted.", + "The resource is being updated." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -9947,6 +9966,11 @@ "description": "Required. ID of the attached environment.", "type": "string" }, + "environmentGroupId": { + "description": "Output only. ID of the environment group.", + "readOnly": true, + "type": "string" + }, "name": { "description": "ID of the environment group attachment.", "type": "string" @@ -13162,7 +13186,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 7cf41b26b26..eac1a1f8c99 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -4003,6 +4003,17 @@ type GoogleCloudApigeeV1EndpointAttachment struct { // ServiceAttachment: Format: projects/*/regions/*/serviceAttachments/* ServiceAttachment string `json:"serviceAttachment,omitempty"` + // State: Output only. State of the endpoint attachment. Values other + // than `ACTIVE` mean the resource is not ready to use. + // + // Possible values: + // "STATE_UNSPECIFIED" - Resource is in an unspecified state. + // "CREATING" - Resource is being created. + // "ACTIVE" - Resource is provisioned and ready to use. + // "DELETING" - The resource is being deleted. + // "UPDATING" - The resource is being updated. + State string `json:"state,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4335,6 +4346,9 @@ type GoogleCloudApigeeV1EnvironmentGroupAttachment struct { // Environment: Required. ID of the attached environment. Environment string `json:"environment,omitempty"` + // EnvironmentGroupId: Output only. ID of the environment group. + EnvironmentGroupId string `json:"environmentGroupId,omitempty"` + // Name: ID of the environment group attachment. Name string `json:"name,omitempty"` @@ -10022,8 +10036,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/apikeys/v2/apikeys-api.json b/apikeys/v2/apikeys-api.json index 5a87005f8cd..151c59bea43 100644 --- a/apikeys/v2/apikeys-api.json +++ b/apikeys/v2/apikeys-api.json @@ -429,7 +429,7 @@ } } }, - "revision": "20220118", + "revision": "20220321", "rootUrl": "https://apikeys.googleapis.com/", "schemas": { "Operation": { @@ -595,6 +595,13 @@ "description": "The representation of a key managed by the API Keys API.", "id": "V2Key", "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.", + "type": "object" + }, "createTime": { "description": "Output only. A timestamp identifying the time this key was originally created.", "format": "google-datetime", diff --git a/apikeys/v2/apikeys-gen.go b/apikeys/v2/apikeys-gen.go index 825302bd4ec..b429cff8fe3 100644 --- a/apikeys/v2/apikeys-gen.go +++ b/apikeys/v2/apikeys-gen.go @@ -544,6 +544,12 @@ func (s *V2IosKeyRestrictions) MarshalJSON() ([]byte, error) { // V2Key: The representation of a key managed by the API Keys API. type V2Key struct { + // Annotations: Annotations is an unstructured key-value map stored with + // a policy that may be set by external tools to store and retrieve + // arbitrary metadata. They are not queryable and should be preserved + // when modifying objects. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: Output only. A timestamp identifying the time this key // was originally created. CreateTime string `json:"createTime,omitempty"` @@ -588,7 +594,7 @@ type V2Key struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -596,10 +602,10 @@ type V2Key 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. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if 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/area120tables/v1alpha1/area120tables-api.json b/area120tables/v1alpha1/area120tables-api.json index 7a9cda2d973..7e51c22104c 100644 --- a/area120tables/v1alpha1/area120tables-api.json +++ b/area120tables/v1alpha1/area120tables-api.json @@ -586,7 +586,7 @@ } } }, - "revision": "20211015", + "revision": "20220321", "rootUrl": "https://area120tables.googleapis.com/", "schemas": { "BatchCreateRowsRequest": { @@ -744,7 +744,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/area120tables/v1alpha1/area120tables-gen.go b/area120tables/v1alpha1/area120tables-gen.go index e4441f86ac8..588e29002e6 100644 --- a/area120tables/v1alpha1/area120tables-gen.go +++ b/area120tables/v1alpha1/area120tables-gen.go @@ -492,8 +492,7 @@ func (s *DateDetails) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index ad737fcdada..dec639c6ea4 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -173,6 +173,76 @@ }, "resources": { "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "artifactregistry.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", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "artifactregistry.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", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + }, "resources": { "operations": { "methods": { @@ -1137,7 +1207,7 @@ } } }, - "revision": "20220307", + "revision": "20220311", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { @@ -1389,6 +1459,24 @@ }, "type": "object" }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, "ListPackagesResponse": { "description": "The response from listing packages.", "id": "ListPackagesResponse", @@ -1461,6 +1549,40 @@ }, "type": "object" }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, "MavenRepositoryConfig": { "description": "MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type.", "id": "MavenRepositoryConfig", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index e6c39374141..e6559e1027b 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -773,6 +773,43 @@ func (s *ListFilesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListPackagesResponse: The response from listing packages. type ListPackagesResponse struct { // NextPageToken: The token to retrieve the next page of packages, or @@ -917,6 +954,56 @@ func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MavenRepositoryConfig: MavenRepositoryConfig is maven related // repository details. Provides additional configuration details for // repositories of the maven format type. @@ -1914,6 +2001,363 @@ func (c *ProjectsUpdateProjectSettingsCall) Do(opts ...googleapi.CallOption) (*P } +// method id "artifactregistry.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "artifactregistry.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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "artifactregistry.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", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "artifactregistry.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "artifactregistry.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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "artifactregistry.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", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// 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 "artifactregistry.projects.locations.operations.get": type ProjectsLocationsOperationsGetCall struct { diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 082acd03e64..ebd0187ef80 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -351,7 +351,7 @@ } } }, - "revision": "20220224", + "revision": "20220317", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -1403,7 +1403,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 934a9f5e61d..f23c58a2915 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -1703,8 +1703,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index 45a406d5aec..35e63641e23 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "batchPath": "batch", "canonicalName": "Authorized Buyers Marketplace", - "description": "The Authorized Buyers Marketplace API allows buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", + "description": "The Authorized Buyers Marketplace API lets buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/", "fullyEncodeReservedExpansion": true, @@ -507,7 +507,7 @@ "type": "string" }, "updateMask": { - "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1058,7 +1058,7 @@ "type": "string" }, "updateMask": { - "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1197,7 +1197,7 @@ ] }, "patch": { - "description": "Updates the given deal at the buyer known revision number. If the server revision has advanced since the passed-in proposal.proposal_revision an ABORTED error message will be returned. The revision number is incremented by the server whenever the proposal or its constituent deals are updated. Note: The revision number is kept at a proposal level. The buyer of the API is expected to keep track of the revision number after the last update operation and send it in as part of the next update request. This way, if there are further changes on the server (e.g., seller making new updates), then the server can detect conflicts and reject the proposed changes.", + "description": "Updates the given deal at the buyer known revision number. If the server revision has advanced since the passed-in proposal.proposal_revision an ABORTED error message will be returned. The revision number is incremented by the server whenever the proposal or its constituent deals are updated. Note: The revision number is kept at a proposal level. The buyer of the API is expected to keep track of the revision number after the last update operation and send it in as part of the next update request. This way, if there are further changes on the server (for example, seller making new updates), then the server can detect conflicts and reject the proposed changes.", "flatPath": "v1/buyers/{buyersId}/proposals/{proposalsId}/deals/{dealsId}", "httpMethod": "PATCH", "id": "authorizedbuyersmarketplace.buyers.proposals.deals.patch", @@ -1213,7 +1213,7 @@ "type": "string" }, "updateMask": { - "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1307,7 +1307,7 @@ } } }, - "revision": "20220212", + "revision": "20220322", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -1357,7 +1357,7 @@ "Ad slot with size specified by height and width in pixels.", "Special size to describe an interstitial ad slot.", "Native (mobile) ads rendered by the publisher.", - "Fluid size (i.e., responsive size) can be resized automatically with the change of outside environment." + "Fluid size (responsive size) can be resized automatically with the change of outside environment." ], "type": "string" }, @@ -1839,7 +1839,7 @@ "type": "string" }, "flightStartTime": { - "description": "Proposed flight start time of the deal. This will generally be stored in the granularity of one second since deal serving starts at seconds boundary. Any time specified with more granularity (e.g., in milliseconds) will be truncated towards the start of time in seconds.", + "description": "Proposed flight start time of the deal. This will generally be stored in the granularity of one second since deal serving starts at seconds boundary. Any time specified with more granularity (for example, in milliseconds) will be truncated towards the start of time in seconds.", "format": "google-datetime", "type": "string" }, @@ -1921,7 +1921,7 @@ "id": "DeliveryControl", "properties": { "companionDeliveryType": { - "description": "Output only. Specifies roadblocking in a master companion lineitem.", + "description": "Output only. Specifies roadblocking in a main companion lineitem.", "enum": [ "COMPANION_DELIVERY_TYPE_UNSPECIFIED", "DELIVERY_OPTIONAL", @@ -1951,7 +1951,7 @@ "Creatives are displayed roughly the same number of times over the duration of the deal.", "Creatives are served roughly proportionally to their performance.", "Creatives are served roughly proportionally to their weights.", - "Creatives are served exactly in sequential order, aka Storyboarding." + "Creatives are served exactly in sequential order, also known as Storyboarding." ], "readOnly": true, "type": "string" @@ -1997,7 +1997,7 @@ "Any number of creatives from a deal can serve together per ad request.", "As many creatives from a deal as can fit on a page will serve. This could mean anywhere from one to all of a deal's creatives given the size constraints of ad slots on a page.", "All or none of the creatives from a deal will serve.", - "A master/companion creative set roadblocking type." + "A main/companion creative set roadblocking type." ], "readOnly": true, "type": "string" @@ -2006,13 +2006,13 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" }, "FinalizedDeal": { - "description": "A finalized deal is a snapshot of the deal when both buyer and seller accept the deal. The buyer or seller can update the deal after it's been finalized and renegotiate on the deal targeting, terms and other fields, while at the same time the finalized snapshot of the deal can still be retrieved via this API. The finalized deal contains a copy of the deal as it existed when most recently finalized, as well as fields related to deal serving such as pause/resume status, RTB metrics, etc.", + "description": "A finalized deal is a snapshot of the deal when both buyer and seller accept the deal. The buyer or seller can update the deal after it's been finalized and renegotiate on the deal targeting, terms and other fields, while at the same time the finalized snapshot of the deal can still be retrieved using this API. The finalized deal contains a copy of the deal as it existed when most recently finalized, as well as fields related to deal serving such as pause/resume status, RTB metrics, and more.", "id": "FinalizedDeal", "properties": { "deal": { @@ -2287,17 +2287,17 @@ }, "placementTargeting": { "$ref": "PlacementTargeting", - "description": "Output only. Placement targeting information, e.g., URL, mobile applications.", + "description": "Output only. Placement targeting information, for example, URL, mobile applications.", "readOnly": true }, "technologyTargeting": { "$ref": "TechnologyTargeting", - "description": "Output only. Technology targeting information, e.g., operating system, device category.", + "description": "Output only. Technology targeting information, for example, operating system, device category.", "readOnly": true }, "userListTargeting": { "$ref": "CriteriaTargeting", - "description": "Buyer user list targeting information. User lists can be uploaded via https://developers.google.com/authorized-buyers/rtb/bulk-uploader." + "description": "Buyer user list targeting information. User lists can be uploaded using https://developers.google.com/authorized-buyers/rtb/bulk-uploader." }, "videoTargeting": { "$ref": "VideoTargeting", @@ -2398,7 +2398,7 @@ "type": "object" }, "PlacementTargeting": { - "description": "Represents targeting about where the ads can appear, e.g., certain sites or mobile applications. Different placement targeting types will be logically OR'ed.", + "description": "Represents targeting about where the ads can appear, for example, certain sites or mobile applications. Different placement targeting types will be logically OR'ed.", "id": "PlacementTargeting", "properties": { "mobileApplicationTargeting": { @@ -2742,7 +2742,7 @@ "type": "string" }, "topHeadlines": { - "description": "Up to three key metrics and rankings. For example \"#1 Mobile News Site for 20 Straight Months\".", + "description": "Up to three key metrics and rankings. For example, \"#1 Mobile News Site for 20 Straight Months\".", "items": { "type": "string" }, @@ -3019,7 +3019,7 @@ "description": "Required. The deal to update. The deal's `name` field is used to identify the deal to be updated. Note: proposal_revision will have to be provided within the resource or else an error will be thrown. Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}" }, "updateMask": { - "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", "format": "google-fieldmask", "type": "string" } @@ -3027,7 +3027,7 @@ "type": "object" }, "UriTargeting": { - "description": "Represents a list of targeted and excluded URLs (e.g., google.com). For Private Auction Deals, URLs are either included or excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't apply.", + "description": "Represents a list of targeted and excluded URLs (for example, google.com). For Private Auction Deals, URLs are either included or excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't apply.", "id": "UriTargeting", "properties": { "excludedUris": { diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index f6390c744e8..d9b051b8197 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -309,8 +309,8 @@ type AdSize struct { // pixels. // "INTERSTITIAL" - Special size to describe an interstitial ad slot. // "NATIVE" - Native (mobile) ads rendered by the publisher. - // "FLUID" - Fluid size (i.e., responsive size) can be resized - // automatically with the change of outside environment. + // "FLUID" - Fluid size (responsive size) can be resized automatically + // with the change of outside environment. Type string `json:"type,omitempty"` // Width: The width of the ad slot in pixels. This field will be present @@ -984,8 +984,8 @@ type Deal struct { // FlightStartTime: Proposed flight start time of the deal. This will // generally be stored in the granularity of one second since deal // serving starts at seconds boundary. Any time specified with more - // granularity (e.g., in milliseconds) will be truncated towards the - // start of time in seconds. + // granularity (for example, in milliseconds) will be truncated towards + // the start of time in seconds. FlightStartTime string `json:"flightStartTime,omitempty"` // Name: Immutable. The unique identifier of the deal. Auto-generated by @@ -1102,8 +1102,8 @@ func (s *DealPausingInfo) MarshalJSON() ([]byte, error) { // DeliveryControl: Message contains details about how the deal will be // paced. type DeliveryControl struct { - // CompanionDeliveryType: Output only. Specifies roadblocking in a - // master companion lineitem. + // CompanionDeliveryType: Output only. Specifies roadblocking in a main + // companion lineitem. // // Possible values: // "COMPANION_DELIVERY_TYPE_UNSPECIFIED" - A placeholder for an @@ -1132,7 +1132,7 @@ type DeliveryControl struct { // "ROTATION_MANUAL" - Creatives are served roughly proportionally to // their weights. // "ROTATION_SEQUENTIAL" - Creatives are served exactly in sequential - // order, aka Storyboarding. + // order, also known as Storyboarding. CreativeRotationType string `json:"creativeRotationType,omitempty"` // DeliveryRateType: Output only. Specifies how the impression delivery @@ -1166,7 +1166,7 @@ type DeliveryControl struct { // deal's creatives given the size constraints of ad slots on a page. // "ALL_ROADBLOCK" - All or none of the creatives from a deal will // serve. - // "CREATIVE_SET" - A master/companion creative set roadblocking type. + // "CREATIVE_SET" - A main/companion creative set roadblocking type. RoadblockingType string `json:"roadblockingType,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1198,8 +1198,7 @@ func (s *DeliveryControl) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1210,10 +1209,10 @@ type Empty struct { // buyer and seller accept the deal. The buyer or seller can update the // deal after it's been finalized and renegotiate on the deal targeting, // terms and other fields, while at the same time the finalized snapshot -// of the deal can still be retrieved via this API. The finalized deal +// of the deal can still be retrieved using this API. The finalized deal // contains a copy of the deal as it existed when most recently // finalized, as well as fields related to deal serving such as -// pause/resume status, RTB metrics, etc. +// pause/resume status, RTB metrics, and more. type FinalizedDeal struct { // Deal: A copy of the Deal made upon finalization. During // renegotiation, this will reflect the last finalized deal before @@ -1673,16 +1672,16 @@ type MarketplaceTargeting struct { // included/excluded. InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"` - // PlacementTargeting: Output only. Placement targeting information, - // e.g., URL, mobile applications. + // PlacementTargeting: Output only. Placement targeting information, for + // example, URL, mobile applications. PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"` // TechnologyTargeting: Output only. Technology targeting information, - // e.g., operating system, device category. + // for example, operating system, device category. TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"` // UserListTargeting: Buyer user list targeting information. User lists - // can be uploaded via + // can be uploaded using // https://developers.google.com/authorized-buyers/rtb/bulk-uploader. UserListTargeting *CriteriaTargeting `json:"userListTargeting,omitempty"` @@ -1891,7 +1890,7 @@ func (s *PauseFinalizedDealRequest) MarshalJSON() ([]byte, error) { } // PlacementTargeting: Represents targeting about where the ads can -// appear, e.g., certain sites or mobile applications. Different +// appear, for example, certain sites or mobile applications. Different // placement targeting types will be logically OR'ed. type PlacementTargeting struct { // MobileApplicationTargeting: Mobile application targeting information @@ -2327,7 +2326,7 @@ type PublisherProfile struct { // SamplePageUrl: URL to a sample content page. SamplePageUrl string `json:"samplePageUrl,omitempty"` - // TopHeadlines: Up to three key metrics and rankings. For example "#1 + // TopHeadlines: Up to three key metrics and rankings. For example, "#1 // Mobile News Site for 20 Straight Months". TopHeadlines []string `json:"topHeadlines,omitempty"` @@ -2769,9 +2768,9 @@ type UpdateDealRequest struct { // the service will update all fields populated in the update request // excluding the output only fields and primitive fields with default // value. Note that explicit field mask is required in order to reset a - // primitive field back to its default value, e.g. false for boolean - // fields, 0 for integer fields. A special field mask consisting of a - // single path "*" can be used to indicate full replacement(the + // primitive field back to its default value, for example, false for + // boolean fields, 0 for integer fields. A special field mask consisting + // of a single path "*" can be used to indicate full replacement(the // equivalent of PUT method), updatable fields unset or unspecified in // the input will be cleared or set to default value. Output only fields // will be ignored regardless of the value of updateMask. @@ -2800,10 +2799,10 @@ func (s *UpdateDealRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UriTargeting: Represents a list of targeted and excluded URLs (e.g., -// google.com). For Private Auction Deals, URLs are either included or -// excluded. For Programmatic Guaranteed and Preferred Deals, this -// doesn't apply. +// UriTargeting: Represents a list of targeted and excluded URLs (for +// example, google.com). For Private Auction Deals, URLs are either +// included or excluded. For Programmatic Guaranteed and Preferred +// Deals, this doesn't apply. type UriTargeting struct { // ExcludedUris: A list of URLs to be excluded. ExcludedUris []string `json:"excludedUris,omitempty"` @@ -4863,12 +4862,12 @@ func (r *BuyersClientsService) Patch(name string, client *Client) *BuyersClients // fields populated in the update request excluding the output only // fields and primitive fields with default value. Note that explicit // field mask is required in order to reset a primitive field back to -// its default value, e.g. false for boolean fields, 0 for integer -// fields. A special field mask consisting of a single path "*" can be -// used to indicate full replacement(the equivalent of PUT method), -// updatable fields unset or unspecified in the input will be cleared or -// set to default value. Output only fields will be ignored regardless -// of the value of updateMask. +// its default value, for example, false for boolean fields, 0 for +// integer fields. A special field mask consisting of a single path "*" +// can be used to indicate full replacement(the equivalent of PUT +// method), updatable fields unset or unspecified in the input will be +// cleared or set to default value. Output only fields will be ignored +// regardless of the value of updateMask. func (c *BuyersClientsPatchCall) UpdateMask(updateMask string) *BuyersClientsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4981,7 +4980,7 @@ func (c *BuyersClientsPatchCall) Do(opts ...googleapi.CallOption) (*Client, erro // "type": "string" // }, // "updateMask": { - // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -7737,12 +7736,12 @@ func (r *BuyersProposalsService) Patch(nameid string, proposal *Proposal) *Buyer // fields populated in the update request excluding the output only // fields and primitive fields with default value. Note that explicit // field mask is required in order to reset a primitive field back to -// its default value, e.g. false for boolean fields, 0 for integer -// fields. A special field mask consisting of a single path "*" can be -// used to indicate full replacement(the equivalent of PUT method), -// updatable fields unset or unspecified in the input will be cleared or -// set to default value. Output only fields will be ignored regardless -// of the value of updateMask. +// its default value, for example, false for boolean fields, 0 for +// integer fields. A special field mask consisting of a single path "*" +// can be used to indicate full replacement(the equivalent of PUT +// method), updatable fields unset or unspecified in the input will be +// cleared or set to default value. Output only fields will be ignored +// regardless of the value of updateMask. func (c *BuyersProposalsPatchCall) UpdateMask(updateMask string) *BuyersProposalsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -7855,7 +7854,7 @@ func (c *BuyersProposalsPatchCall) Do(opts ...googleapi.CallOption) (*Proposal, // "type": "string" // }, // "updateMask": { - // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -8531,8 +8530,9 @@ type BuyersProposalsDealsPatchCall struct { // number is kept at a proposal level. The buyer of the API is expected // to keep track of the revision number after the last update operation // and send it in as part of the next update request. This way, if there -// are further changes on the server (e.g., seller making new updates), -// then the server can detect conflicts and reject the proposed changes. +// are further changes on the server (for example, seller making new +// updates), then the server can detect conflicts and reject the +// proposed changes. // // - name: Immutable. The unique identifier of the deal. Auto-generated // by the server when a deal is created. Format: @@ -8549,12 +8549,12 @@ func (r *BuyersProposalsDealsService) Patch(nameid string, deal *Deal) *BuyersPr // fields populated in the update request excluding the output only // fields and primitive fields with default value. Note that explicit // field mask is required in order to reset a primitive field back to -// its default value, e.g. false for boolean fields, 0 for integer -// fields. A special field mask consisting of a single path "*" can be -// used to indicate full replacement(the equivalent of PUT method), -// updatable fields unset or unspecified in the input will be cleared or -// set to default value. Output only fields will be ignored regardless -// of the value of updateMask. +// its default value, for example, false for boolean fields, 0 for +// integer fields. A special field mask consisting of a single path "*" +// can be used to indicate full replacement(the equivalent of PUT +// method), updatable fields unset or unspecified in the input will be +// cleared or set to default value. Output only fields will be ignored +// regardless of the value of updateMask. func (c *BuyersProposalsDealsPatchCall) UpdateMask(updateMask string) *BuyersProposalsDealsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -8651,7 +8651,7 @@ func (c *BuyersProposalsDealsPatchCall) Do(opts ...googleapi.CallOption) (*Deal, } return ret, nil // { - // "description": "Updates the given deal at the buyer known revision number. If the server revision has advanced since the passed-in proposal.proposal_revision an ABORTED error message will be returned. The revision number is incremented by the server whenever the proposal or its constituent deals are updated. Note: The revision number is kept at a proposal level. The buyer of the API is expected to keep track of the revision number after the last update operation and send it in as part of the next update request. This way, if there are further changes on the server (e.g., seller making new updates), then the server can detect conflicts and reject the proposed changes.", + // "description": "Updates the given deal at the buyer known revision number. If the server revision has advanced since the passed-in proposal.proposal_revision an ABORTED error message will be returned. The revision number is incremented by the server whenever the proposal or its constituent deals are updated. Note: The revision number is kept at a proposal level. The buyer of the API is expected to keep track of the revision number after the last update operation and send it in as part of the next update request. This way, if there are further changes on the server (for example, seller making new updates), then the server can detect conflicts and reject the proposed changes.", // "flatPath": "v1/buyers/{buyersId}/proposals/{proposalsId}/deals/{dealsId}", // "httpMethod": "PATCH", // "id": "authorizedbuyersmarketplace.buyers.proposals.deals.patch", @@ -8667,7 +8667,7 @@ func (c *BuyersProposalsDealsPatchCall) Do(opts ...googleapi.CallOption) (*Deal, // "type": "string" // }, // "updateMask": { - // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, e.g. false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + // "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/baremetalsolution/v1/baremetalsolution-api.json b/baremetalsolution/v1/baremetalsolution-api.json index 87381f72568..240f392acf9 100644 --- a/baremetalsolution/v1/baremetalsolution-api.json +++ b/baremetalsolution/v1/baremetalsolution-api.json @@ -268,7 +268,7 @@ } } }, - "revision": "20220118", + "revision": "20220322", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -278,7 +278,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/baremetalsolution/v1/baremetalsolution-gen.go b/baremetalsolution/v1/baremetalsolution-gen.go index 4f7e5021e05..db741009284 100644 --- a/baremetalsolution/v1/baremetalsolution-gen.go +++ b/baremetalsolution/v1/baremetalsolution-gen.go @@ -191,8 +191,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/baremetalsolution/v1alpha1/baremetalsolution-gen.go b/baremetalsolution/v1alpha1/baremetalsolution-gen.go index 6d93889e7d1..511d81501b1 100644 --- a/baremetalsolution/v1alpha1/baremetalsolution-gen.go +++ b/baremetalsolution/v1alpha1/baremetalsolution-gen.go @@ -87,7 +87,7 @@ const ( // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { - scopesOption := option.WithScopes( + scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index e7a7f1f9b09..639314d4538 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -465,6 +465,110 @@ } } }, + "nfsShares": { + "methods": { + "get": { + "description": "Get details of a single NFS share.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.nfsShares.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "NfsShare" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List NFS shares.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.nfsShares.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server might 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 from the server.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListNfsSharesRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/nfsShares", + "response": { + "$ref": "ListNfsSharesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update details of a single NFS share.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + "httpMethod": "PATCH", + "id": "baremetalsolution.projects.locations.nfsShares.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The name of the NFS share.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update. The only currently supported fields are: `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "NfsShare" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "provisioningConfigs": { "methods": { "create": { @@ -476,6 +580,11 @@ "parent" ], "parameters": { + "email": { + "description": "Optional. Email provided to send a confirmation with provisioning config to.", + "location": "query", + "type": "string" + }, "parent": { "description": "Required. The parent project and location containing the ProvisioningConfig.", "location": "path", @@ -529,6 +638,11 @@ "name" ], "parameters": { + "email": { + "description": "Optional. Email provided to send a confirmation with provisioning config to.", + "location": "query", + "type": "string" + }, "name": { "description": "Output only. The name of the provisioning config.", "location": "path", @@ -1108,11 +1222,56 @@ } } }, - "revision": "20220307", + "revision": "20220322", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { + "AllowedClient": { + "description": "Represents an 'access point' for the share.", + "id": "AllowedClient", + "properties": { + "allowDev": { + "description": "Allow dev flag. Which controls whether to allow creation of devices.", + "type": "boolean" + }, + "allowSuid": { + "description": "Allow the setuid flag.", + "type": "boolean" + }, + "allowedClientsCidr": { + "description": "The subnet of IP addresses permitted to access the share.", + "type": "string" + }, + "mountPermissions": { + "description": "Mount permissions.", + "enum": [ + "MOUNT_PERMISSIONS_UNSPECIFIED", + "READ", + "READ_WRITE" + ], + "enumDescriptions": [ + "Permissions were not specified.", + "NFS share can be mount with read-only permissions.", + "NFS share can be mount with read-write permissions." + ], + "type": "string" + }, + "network": { + "description": "The network the access point sits on.", + "type": "string" + }, + "noRootSquash": { + "description": "Disable root squashing, which is a feature of NFS. Root squash is a special mapping of the remote superuser (root) identity when using identity authentication.", + "type": "boolean" + }, + "shareIp": { + "description": "The IP address of the share on this network.", + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1198,6 +1357,10 @@ "description": "Configuration parameters for a new instance.", "id": "InstanceConfig", "properties": { + "accountNetworksEnabled": { + "description": "If true networks can be from different projects of the same vendor account.", + "type": "boolean" + }, "clientNetwork": { "$ref": "NetworkAddress", "description": "Client network address." @@ -1381,6 +1544,31 @@ }, "type": "object" }, + "ListNfsSharesResponse": { + "description": "Response message containing the list of NFS shares.", + "id": "ListNfsSharesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results from the server.", + "type": "string" + }, + "nfsShares": { + "description": "The list of NFS shares.", + "items": { + "$ref": "NfsShare" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListProvisioningQuotasResponse": { "description": "Response message for the list of provisioning quotas.", "id": "ListProvisioningQuotasResponse", @@ -1848,6 +2036,53 @@ }, "type": "object" }, + "NfsShare": { + "description": "An NFS share.", + "id": "NfsShare", + "properties": { + "allowedClients": { + "description": "List of allowed access points.", + "items": { + "$ref": "AllowedClient" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Output only. The name of the NFS share.", + "readOnly": true, + "type": "string" + }, + "nfsShareId": { + "description": "Output only. An identifier for the NFS share, generated by the backend.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the NFS share.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONED" + ], + "enumDescriptions": [ + "The share is in an unknown state.", + "The share has been provisioned." + ], + "type": "string" + }, + "volume": { + "description": "The volume containing the share.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -1893,7 +2128,7 @@ "type": "string" }, "email": { - "description": "Optional. Email provided to send a confirmation with provisioning config to.", + "description": "Email provided to send a confirmation with provisioning config to. Deprecated in favour of email field in request messages.", "type": "string" }, "handoverServiceAccount": { @@ -1999,6 +2234,21 @@ "description": "Output only. The name of the provisioning quota.", "readOnly": true, "type": "string" + }, + "networkBandwidth": { + "description": "Network bandwidth, Gbps", + "format": "int64", + "type": "string" + }, + "serverCount": { + "description": "Server count.", + "format": "int64", + "type": "string" + }, + "storageGib": { + "description": "Storage size (GB).", + "format": "int64", + "type": "string" } }, "type": "object" diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index 139d4fbb6d4..b2f4910c462 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -153,6 +153,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Instances = NewProjectsLocationsInstancesService(s) rs.Networks = NewProjectsLocationsNetworksService(s) + rs.NfsShares = NewProjectsLocationsNfsSharesService(s) rs.ProvisioningConfigs = NewProjectsLocationsProvisioningConfigsService(s) rs.ProvisioningQuotas = NewProjectsLocationsProvisioningQuotasService(s) rs.SnapshotSchedulePolicies = NewProjectsLocationsSnapshotSchedulePoliciesService(s) @@ -167,6 +168,8 @@ type ProjectsLocationsService struct { Networks *ProjectsLocationsNetworksService + NfsShares *ProjectsLocationsNfsSharesService + ProvisioningConfigs *ProjectsLocationsProvisioningConfigsService ProvisioningQuotas *ProjectsLocationsProvisioningQuotasService @@ -194,6 +197,15 @@ type ProjectsLocationsNetworksService struct { s *Service } +func NewProjectsLocationsNfsSharesService(s *Service) *ProjectsLocationsNfsSharesService { + rs := &ProjectsLocationsNfsSharesService{s: s} + return rs +} + +type ProjectsLocationsNfsSharesService struct { + s *Service +} + func NewProjectsLocationsProvisioningConfigsService(s *Service) *ProjectsLocationsProvisioningConfigsService { rs := &ProjectsLocationsProvisioningConfigsService{s: s} return rs @@ -254,12 +266,66 @@ type ProjectsLocationsVolumesSnapshotsService struct { s *Service } +// AllowedClient: Represents an 'access point' for the share. +type AllowedClient struct { + // AllowDev: Allow dev flag. Which controls whether to allow creation of + // devices. + AllowDev bool `json:"allowDev,omitempty"` + + // AllowSuid: Allow the setuid flag. + AllowSuid bool `json:"allowSuid,omitempty"` + + // AllowedClientsCidr: The subnet of IP addresses permitted to access + // the share. + AllowedClientsCidr string `json:"allowedClientsCidr,omitempty"` + + // MountPermissions: Mount permissions. + // + // Possible values: + // "MOUNT_PERMISSIONS_UNSPECIFIED" - Permissions were not specified. + // "READ" - NFS share can be mount with read-only permissions. + // "READ_WRITE" - NFS share can be mount with read-write permissions. + MountPermissions string `json:"mountPermissions,omitempty"` + + // Network: The network the access point sits on. + Network string `json:"network,omitempty"` + + // NoRootSquash: Disable root squashing, which is a feature of NFS. Root + // squash is a special mapping of the remote superuser (root) identity + // when using identity authentication. + NoRootSquash bool `json:"noRootSquash,omitempty"` + + // ShareIp: The IP address of the share on this network. + ShareIp string `json:"shareIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowDev") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowDev") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AllowedClient) MarshalJSON() ([]byte, error) { + type NoMethod AllowedClient + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For // instance: service Foo { rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -343,6 +409,10 @@ func (s *Instance) MarshalJSON() ([]byte, error) { // InstanceConfig: Configuration parameters for a new instance. type InstanceConfig struct { + // AccountNetworksEnabled: If true networks can be from different + // projects of the same vendor account. + AccountNetworksEnabled bool `json:"accountNetworksEnabled,omitempty"` + // ClientNetwork: Client network address. ClientNetwork *NetworkAddress `json:"clientNetwork,omitempty"` @@ -372,20 +442,22 @@ type InstanceConfig struct { // additional information for the BMS Ops team . UserNote string `json:"userNote,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientNetwork") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent 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. + // "AccountNetworksEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientNetwork") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AccountNetworksEnabled") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -651,6 +723,45 @@ func (s *ListNetworksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListNfsSharesResponse: Response message containing the list of NFS +// shares. +type ListNfsSharesResponse struct { + // NextPageToken: A token identifying a page of results from the server. + NextPageToken string `json:"nextPageToken,omitempty"` + + // NfsShares: The list of NFS shares. + NfsShares []*NfsShare `json:"nfsShares,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 *ListNfsSharesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNfsSharesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListProvisioningQuotasResponse: Response message for the list of // provisioning quotas. type ListProvisioningQuotasResponse struct { @@ -1243,6 +1354,59 @@ func (s *NfsExport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NfsShare: An NFS share. +type NfsShare struct { + // AllowedClients: List of allowed access points. + AllowedClients []*AllowedClient `json:"allowedClients,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the NFS share. + Name string `json:"name,omitempty"` + + // NfsShareId: Output only. An identifier for the NFS share, generated + // by the backend. + NfsShareId string `json:"nfsShareId,omitempty"` + + // State: The state of the NFS share. + // + // Possible values: + // "STATE_UNSPECIFIED" - The share is in an unknown state. + // "PROVISIONED" - The share has been provisioned. + State string `json:"state,omitempty"` + + // Volume: The volume containing the share. + Volume string `json:"volume,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AllowedClients") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedClients") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NfsShare) MarshalJSON() ([]byte, error) { + type NoMethod NfsShare + 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 { @@ -1311,8 +1475,8 @@ type ProvisioningConfig struct { // provisioning config. CloudConsoleUri string `json:"cloudConsoleUri,omitempty"` - // Email: Optional. Email provided to send a confirmation with - // provisioning config to. + // Email: Email provided to send a confirmation with provisioning config + // to. Deprecated in favour of email field in request messages. Email string `json:"email,omitempty"` // HandoverServiceAccount: A service account to enable customers to @@ -1404,6 +1568,15 @@ type ProvisioningQuota struct { // Name: Output only. The name of the provisioning quota. Name string `json:"name,omitempty"` + // NetworkBandwidth: Network bandwidth, Gbps + NetworkBandwidth int64 `json:"networkBandwidth,omitempty,string"` + + // ServerCount: Server count. + ServerCount int64 `json:"serverCount,omitempty,string"` + + // StorageGib: Storage size (GB). + StorageGib int64 `json:"storageGib,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "AssetType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3832,89 +4005,95 @@ func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (* } -// method id "baremetalsolution.projects.locations.provisioningConfigs.create": +// method id "baremetalsolution.projects.locations.nfsShares.get": -type ProjectsLocationsProvisioningConfigsCreateCall struct { - s *Service - parent string - provisioningconfig *ProvisioningConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNfsSharesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Create new ProvisioningConfig. +// Get: Get details of a single NFS share. // -// - parent: The parent project and location containing the -// ProvisioningConfig. -func (r *ProjectsLocationsProvisioningConfigsService) Create(parent string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsCreateCall { - c := &ProjectsLocationsProvisioningConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.provisioningconfig = provisioningconfig +// - name: Name of the resource. +func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsNfsSharesGetCall { + c := &ProjectsLocationsNfsSharesGetCall{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 *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsCreateCall { +func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesGetCall { 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 *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesGetCall { + 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 *ProjectsLocationsProvisioningConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsCreateCall { +func (c *ProjectsLocationsNfsSharesGetCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesGetCall { 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 *ProjectsLocationsProvisioningConfigsCreateCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesGetCall) 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.provisioningconfig) - 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, "v2/{+parent}/provisioningConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.provisioningConfigs.create" call. -// Exactly one of *ProvisioningConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProvisioningConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { +// Do executes the "baremetalsolution.projects.locations.nfsShares.get" call. +// Exactly one of *NfsShare or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NfsShare.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*NfsShare, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3933,7 +4112,7 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ProvisioningConfig{ + ret := &NfsShare{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3945,28 +4124,25 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Create new ProvisioningConfig.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs", - // "httpMethod": "POST", - // "id": "baremetalsolution.projects.locations.provisioningConfigs.create", + // "description": "Get details of a single NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent project and location containing the ProvisioningConfig.", + // "name": { + // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/provisioningConfigs", - // "request": { - // "$ref": "ProvisioningConfig" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "ProvisioningConfig" + // "$ref": "NfsShare" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3975,30 +4151,51 @@ func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.Ca } -// method id "baremetalsolution.projects.locations.provisioningConfigs.get": +// method id "baremetalsolution.projects.locations.nfsShares.list": -type ProjectsLocationsProvisioningConfigsGetCall struct { +type ProjectsLocationsNfsSharesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get ProvisioningConfig by name. +// List: List NFS shares. // -// - name: Name of the ProvisioningConfig. -func (r *ProjectsLocationsProvisioningConfigsService) Get(name string) *ProjectsLocationsProvisioningConfigsGetCall { - c := &ProjectsLocationsProvisioningConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent value for ListNfsSharesRequest. +func (r *ProjectsLocationsNfsSharesService) List(parent string) *ProjectsLocationsNfsSharesListCall { + c := &ProjectsLocationsNfsSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsNfsSharesListCall) Filter(filter string) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. +func (c *ProjectsLocationsNfsSharesListCall) PageSize(pageSize int64) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsNfsSharesListCall) PageToken(pageToken string) *ProjectsLocationsNfsSharesListCall { + 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 *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsNfsSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4008,7 +4205,7 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsNfsSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4016,21 +4213,21 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag stri // 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 *ProjectsLocationsProvisioningConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsGetCall { +func (c *ProjectsLocationsNfsSharesListCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesListCall { 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 *ProjectsLocationsProvisioningConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsNfsSharesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNfsSharesListCall) 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_ { @@ -4043,7 +4240,7 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4051,13 +4248,506 @@ func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*ht } 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 "baremetalsolution.projects.locations.provisioningConfigs.get" call. -// Exactly one of *ProvisioningConfig or error will be non-nil. Any +// Do executes the "baremetalsolution.projects.locations.nfsShares.list" call. +// Exactly one of *ListNfsSharesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNfsSharesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (*ListNfsSharesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListNfsSharesResponse{ + 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 NFS shares.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server might 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 from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListNfsSharesRequest.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/nfsShares", + // "response": { + // "$ref": "ListNfsSharesResponse" + // }, + // "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 *ProjectsLocationsNfsSharesListCall) Pages(ctx context.Context, f func(*ListNfsSharesResponse) 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 "baremetalsolution.projects.locations.nfsShares.patch": + +type ProjectsLocationsNfsSharesPatchCall struct { + s *Service + name string + nfsshare *NfsShare + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update details of a single NFS share. +// +// - name: Output only. The name of the NFS share. +func (r *ProjectsLocationsNfsSharesService) Patch(name string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesPatchCall { + c := &ProjectsLocationsNfsSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.nfsshare = nfsshare + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The only currently supported fields are: `labels` +func (c *ProjectsLocationsNfsSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNfsSharesPatchCall { + 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 *ProjectsLocationsNfsSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesPatchCall { + 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 *ProjectsLocationsNfsSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesPatchCall { + 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 *ProjectsLocationsNfsSharesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNfsSharesPatchCall) 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.nfsshare) + 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, "v2/{+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 "baremetalsolution.projects.locations.nfsShares.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 *ProjectsLocationsNfsSharesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Update details of a single NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.nfsShares.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The name of the NFS share.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. The only currently supported fields are: `labels`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "NfsShare" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.provisioningConfigs.create": + +type ProjectsLocationsProvisioningConfigsCreateCall struct { + s *Service + parent string + provisioningconfig *ProvisioningConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create new ProvisioningConfig. +// +// - parent: The parent project and location containing the +// ProvisioningConfig. +func (r *ProjectsLocationsProvisioningConfigsService) Create(parent string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsCreateCall { + c := &ProjectsLocationsProvisioningConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.provisioningconfig = provisioningconfig + return c +} + +// Email sets the optional parameter "email": Email provided to send a +// confirmation with provisioning config to. +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Email(email string) *ProjectsLocationsProvisioningConfigsCreateCall { + c.urlParams_.Set("email", email) + 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 *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsCreateCall { + 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 *ProjectsLocationsProvisioningConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsCreateCall { + 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 *ProjectsLocationsProvisioningConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProvisioningConfigsCreateCall) 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.provisioningconfig) + 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, "v2/{+parent}/provisioningConfigs") + 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 "baremetalsolution.projects.locations.provisioningConfigs.create" call. +// Exactly one of *ProvisioningConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ProvisioningConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ProvisioningConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create new ProvisioningConfig.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "email": { + // "description": "Optional. Email provided to send a confirmation with provisioning config to.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent project and location containing the ProvisioningConfig.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/provisioningConfigs", + // "request": { + // "$ref": "ProvisioningConfig" + // }, + // "response": { + // "$ref": "ProvisioningConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.provisioningConfigs.get": + +type ProjectsLocationsProvisioningConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get ProvisioningConfig by name. +// +// - name: Name of the ProvisioningConfig. +func (r *ProjectsLocationsProvisioningConfigsService) Get(name string) *ProjectsLocationsProvisioningConfigsGetCall { + c := &ProjectsLocationsProvisioningConfigsGetCall{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 *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsGetCall { + 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 *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningConfigsGetCall { + 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 *ProjectsLocationsProvisioningConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsGetCall { + 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 *ProjectsLocationsProvisioningConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "baremetalsolution.projects.locations.provisioningConfigs.get" call. +// Exactly one of *ProvisioningConfig or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *ProvisioningConfig.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use @@ -4142,6 +4832,13 @@ func (r *ProjectsLocationsProvisioningConfigsService) Patch(name string, provisi return c } +// Email sets the optional parameter "email": Email provided to send a +// confirmation with provisioning config to. +func (c *ProjectsLocationsProvisioningConfigsPatchCall) Email(email string) *ProjectsLocationsProvisioningConfigsPatchCall { + c.urlParams_.Set("email", email) + return c +} + // UpdateMask sets the optional parameter "updateMask": Required. The // list of fields to update. func (c *ProjectsLocationsProvisioningConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProvisioningConfigsPatchCall { @@ -4248,6 +4945,11 @@ func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.Cal // "name" // ], // "parameters": { + // "email": { + // "description": "Optional. Email provided to send a confirmation with provisioning config to.", + // "location": "query", + // "type": "string" + // }, // "name": { // "description": "Output only. The name of the provisioning config.", // "location": "path", diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 62e610dcc4b..d4b7deb074f 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1693,7 +1693,7 @@ } } }, - "revision": "20220226", + "revision": "20220313", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -4423,6 +4423,10 @@ "format": "double", "type": "number" }, + "copy": { + "$ref": "JobStatistics5", + "description": "[Output-only] Statistics for a copy job." + }, "creationTime": { "description": "[Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.", "format": "int64", @@ -4732,6 +4736,22 @@ }, "type": "object" }, + "JobStatistics5": { + "id": "JobStatistics5", + "properties": { + "copied_logical_bytes": { + "description": "[Output-only] Number of logical bytes copied to the destination table.", + "format": "int64", + "type": "string" + }, + "copied_rows": { + "description": "[Output-only] Number of rows copied to the destination table.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "JobStatus": { "id": "JobStatus", "properties": { @@ -7198,6 +7218,14 @@ "trainingOptions": { "$ref": "TrainingOptions", "description": "Options that were used for this training run, includes user specified and default options that were used." + }, + "vertexAiModelId": { + "description": "The model id in Vertex AI Model Registry for this training run", + "type": "string" + }, + "vertexAiModelVersion": { + "description": "The model version in Vertex AI Model Registry for this training run", + "type": "string" } }, "type": "object" diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index ebe3389c22e..710e6ae286d 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -4861,6 +4861,9 @@ type JobStatistics struct { // 1.0) for LOAD and EXTRACT jobs. CompletionRatio float64 `json:"completionRatio,omitempty"` + // Copy: [Output-only] Statistics for a copy job. + Copy *JobStatistics5 `json:"copy,omitempty"` + // CreationTime: [Output-only] Creation time of this job, in // milliseconds since the epoch. This field will be present on all jobs. CreationTime int64 `json:"creationTime,omitempty,string"` @@ -5286,6 +5289,39 @@ func (s *JobStatistics4) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type JobStatistics5 struct { + // CopiedLogicalBytes: [Output-only] Number of logical bytes copied to + // the destination table. + CopiedLogicalBytes int64 `json:"copied_logical_bytes,omitempty,string"` + + // CopiedRows: [Output-only] Number of rows copied to the destination + // table. + CopiedRows int64 `json:"copied_rows,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CopiedLogicalBytes") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CopiedLogicalBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *JobStatistics5) MarshalJSON() ([]byte, error) { + type NoMethod JobStatistics5 + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type JobStatus struct { // ErrorResult: [Output-only] Final error result of the job. If present, // indicates that the job has completed and was unsuccessful. @@ -8858,6 +8894,14 @@ type TrainingRun struct { // includes user specified and default options that were used. TrainingOptions *TrainingOptions `json:"trainingOptions,omitempty"` + // VertexAiModelId: The model id in Vertex AI Model Registry for this + // training run + VertexAiModelId string `json:"vertexAiModelId,omitempty"` + + // VertexAiModelVersion: The model version in Vertex AI Model Registry + // for this training run + VertexAiModelVersion string `json:"vertexAiModelVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. // "ClassLevelGlobalExplanations") to unconditionally include in API // requests. By default, fields with empty or default values are omitted diff --git a/bigqueryconnection/v1beta1/bigqueryconnection-api.json b/bigqueryconnection/v1beta1/bigqueryconnection-api.json index 38df378f9e0..489589405b0 100644 --- a/bigqueryconnection/v1beta1/bigqueryconnection-api.json +++ b/bigqueryconnection/v1beta1/bigqueryconnection-api.json @@ -395,7 +395,7 @@ } } }, - "revision": "20211130", + "revision": "20220319", "rootUrl": "https://bigqueryconnection.googleapis.com/", "schemas": { "AuditConfig": { @@ -568,7 +568,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/bigqueryconnection/v1beta1/bigqueryconnection-gen.go b/bigqueryconnection/v1beta1/bigqueryconnection-gen.go index d6e39d91a51..359e4c478ee 100644 --- a/bigqueryconnection/v1beta1/bigqueryconnection-gen.go +++ b/bigqueryconnection/v1beta1/bigqueryconnection-gen.go @@ -510,8 +510,7 @@ func (s *ConnectionCredential) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index 72d787f7d8c..328a6ecc0fc 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1340,7 +1340,7 @@ } } }, - "revision": "20220225", + "revision": "20220319", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1590,7 +1590,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index 7eb9ac79f4d..1313687917c 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -578,8 +578,7 @@ func (s *EmailPreferences) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/bigqueryreservation/v1/bigqueryreservation-api.json b/bigqueryreservation/v1/bigqueryreservation-api.json index 7315db5c458..e1921e0e83e 100644 --- a/bigqueryreservation/v1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1/bigqueryreservation-api.json @@ -788,7 +788,7 @@ } } }, - "revision": "20220226", + "revision": "20220319", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { @@ -952,7 +952,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/bigqueryreservation/v1/bigqueryreservation-gen.go b/bigqueryreservation/v1/bigqueryreservation-gen.go index c2078448426..4cf7405ba37 100644 --- a/bigqueryreservation/v1/bigqueryreservation-gen.go +++ b/bigqueryreservation/v1/bigqueryreservation-gen.go @@ -435,8 +435,7 @@ func (s *CapacityCommitment) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/bigqueryreservation/v1beta1/bigqueryreservation-api.json b/bigqueryreservation/v1beta1/bigqueryreservation-api.json index caf57f33fb0..505ac6635ea 100644 --- a/bigqueryreservation/v1beta1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1beta1/bigqueryreservation-api.json @@ -786,7 +786,7 @@ } } }, - "revision": "20220226", + "revision": "20220319", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { @@ -950,7 +950,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/bigqueryreservation/v1beta1/bigqueryreservation-gen.go b/bigqueryreservation/v1beta1/bigqueryreservation-gen.go index 98a1c8aa9a7..639e59e9ba8 100644 --- a/bigqueryreservation/v1beta1/bigqueryreservation-gen.go +++ b/bigqueryreservation/v1beta1/bigqueryreservation-gen.go @@ -435,8 +435,7 @@ func (s *CapacityCommitment) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index f7be36cd4d4..640e81a9569 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1803,7 +1803,7 @@ } } }, - "revision": "20220211", + "revision": "20220313", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -1903,7 +1903,7 @@ "id": "AutoscalingTargets", "properties": { "cpuUtilizationPercent": { - "description": "The cpu utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization), and is limited between 10 and 80.", + "description": "The cpu utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization), and is limited between 10 and 80, otherwise it will return INVALID_ARGUMENT error.", "format": "int32", "type": "integer" } diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 37486d30cb6..86d72e6c061 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -479,7 +479,7 @@ type AutoscalingTargets struct { // CpuUtilizationPercent: The cpu utilization that the Autoscaler should // be trying to achieve. This number is on a scale from 0 (no // utilization) to 100 (total utilization), and is limited between 10 - // and 80. + // and 80, otherwise it will return INVALID_ARGUMENT error. CpuUtilizationPercent int64 `json:"cpuUtilizationPercent,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/billingbudgets/v1/billingbudgets-api.json b/billingbudgets/v1/billingbudgets-api.json index 1e57d72c07d..56b4db19f08 100644 --- a/billingbudgets/v1/billingbudgets-api.json +++ b/billingbudgets/v1/billingbudgets-api.json @@ -270,7 +270,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1Budget": { @@ -500,7 +500,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/billingbudgets/v1/billingbudgets-gen.go b/billingbudgets/v1/billingbudgets-gen.go index 3860c7f5263..dadd2d5f1f7 100644 --- a/billingbudgets/v1/billingbudgets-gen.go +++ b/billingbudgets/v1/billingbudgets-gen.go @@ -620,8 +620,7 @@ func (s *GoogleCloudBillingBudgetsV1ThresholdRule) UnmarshalJSON(data []byte) er // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/billingbudgets/v1beta1/billingbudgets-api.json b/billingbudgets/v1beta1/billingbudgets-api.json index 3235cda4510..26600401902 100644 --- a/billingbudgets/v1beta1/billingbudgets-api.json +++ b/billingbudgets/v1beta1/billingbudgets-api.json @@ -264,7 +264,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1beta1AllUpdatesRule": { @@ -521,7 +521,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/billingbudgets/v1beta1/billingbudgets-gen.go b/billingbudgets/v1beta1/billingbudgets-gen.go index debf52b738c..0b3229d6b78 100644 --- a/billingbudgets/v1beta1/billingbudgets-gen.go +++ b/billingbudgets/v1beta1/billingbudgets-gen.go @@ -670,8 +670,7 @@ func (s *GoogleCloudBillingBudgetsV1beta1UpdateBudgetRequest) MarshalJSON() ([]b // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index ba37dc3bd74..8bcca307865 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -551,7 +551,7 @@ } } }, - "revision": "20220225", + "revision": "20220318", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -710,7 +710,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index 55d9aa363d0..59a1849c001 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -514,8 +514,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/binaryauthorization/v1beta1/binaryauthorization-api.json b/binaryauthorization/v1beta1/binaryauthorization-api.json index 8d6b3f11106..c31a470a6c4 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-api.json +++ b/binaryauthorization/v1beta1/binaryauthorization-api.json @@ -551,7 +551,7 @@ } } }, - "revision": "20220225", + "revision": "20220318", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -710,7 +710,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/binaryauthorization/v1beta1/binaryauthorization-gen.go b/binaryauthorization/v1beta1/binaryauthorization-gen.go index 88d5a2f7bfc..f67d191380d 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-gen.go +++ b/binaryauthorization/v1beta1/binaryauthorization-gen.go @@ -516,8 +516,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/books/v1/books-api.json b/books/v1/books-api.json index 8b091324d5a..5a23ef48bda 100644 --- a/books/v1/books-api.json +++ b/books/v1/books-api.json @@ -2671,7 +2671,7 @@ } } }, - "revision": "20201021", + "revision": "20220318", "rootUrl": "https://books.googleapis.com/", "schemas": { "Annotation": { @@ -3470,7 +3470,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/books/v1/books-gen.go b/books/v1/books-gen.go index d264c213388..3d345c308b5 100644 --- a/books/v1/books-gen.go +++ b/books/v1/books-gen.go @@ -1923,8 +1923,7 @@ func (s *DownloadAccesses) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index fee49682a8d..e2bfdd47f51 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -642,7 +642,7 @@ } } }, - "revision": "20220308", + "revision": "20220319", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -1213,7 +1213,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -2753,7 +2753,7 @@ "type": "string" }, "isAnonymous": { - "description": "True when the user is deleted or the user's profile is not visible.", + "description": "When `true`, the user is deleted or their profile is not visible.", "type": "boolean" }, "name": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 23b44e5a1e5..90aa92d352d 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -1240,8 +1240,7 @@ func (s *DynamiteIntegrationLogEntry) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -3615,8 +3614,8 @@ type User struct { // DomainId: Unique identifier of the user's Google Workspace domain. DomainId string `json:"domainId,omitempty"` - // IsAnonymous: True when the user is deleted or the user's profile is - // not visible. + // IsAnonymous: When `true`, the user is deleted or their profile is not + // visible. IsAnonymous bool `json:"isAnonymous,omitempty"` // Name: Resource name for a Google Chat user. Represents a person diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index b1db628a6ce..9029a5571ff 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -444,7 +444,7 @@ ], "parameters": { "filter": { - "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number ", + "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number - device_id ", "location": "query", "type": "string" }, @@ -488,7 +488,7 @@ } } }, - "revision": "20220228", + "revision": "20220326", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index a32f97d4e36..e89838c8ef8 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -3354,7 +3354,7 @@ func (r *CustomersTelemetryDevicesService) List(parent string) *CustomersTelemet // Filter sets the optional parameter "filter": Only include resources // that match the filter. Supported filter fields: - org_unit_id - -// serial_number +// serial_number - device_id func (c *CustomersTelemetryDevicesListCall) Filter(filter string) *CustomersTelemetryDevicesListCall { c.urlParams_.Set("filter", filter) return c @@ -3491,7 +3491,7 @@ func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*G // ], // "parameters": { // "filter": { - // "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number ", + // "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number - device_id ", // "location": "query", // "type": "string" // }, diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index d9fe458fe1b..d7063bd9fd1 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -324,7 +324,7 @@ } } }, - "revision": "20220228", + "revision": "20220321", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle": { @@ -597,6 +597,14 @@ }, "readOnly": true, "type": "array" + }, + "requiredItems": { + "description": "Output only. Provides a list of fields that are required to be set if this field has a certain value.", + "items": { + "$ref": "GoogleChromePolicyV1PolicySchemaRequiredItems" + }, + "readOnly": true, + "type": "array" } }, "type": "object" @@ -645,6 +653,27 @@ }, "type": "object" }, + "GoogleChromePolicyV1PolicySchemaRequiredItems": { + "description": "The fields that will become required based on the value of this field.", + "id": "GoogleChromePolicyV1PolicySchemaRequiredItems", + "properties": { + "fieldConditions": { + "description": "The value(s) of the field that provoke required field enforcement. An empty field_conditions implies that any value assigned to this field will provoke required field enforcement.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredFields": { + "description": "The fields that are required as a consequence of the field conditions.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleChromePolicyV1PolicyTargetKey": { "description": "The key used to identify the target on which the policy will be applied.", "id": "GoogleChromePolicyV1PolicyTargetKey", @@ -774,7 +803,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index cc1d78401e5..6e62b05770b 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -619,6 +619,10 @@ type GoogleChromePolicyV1PolicySchemaFieldDescription struct { // defines multiple fields. NestedFieldDescriptions []*GoogleChromePolicyV1PolicySchemaFieldDescription `json:"nestedFieldDescriptions,omitempty"` + // RequiredItems: Output only. Provides a list of fields that are + // required to be set if this field has a certain value. + RequiredItems []*GoogleChromePolicyV1PolicySchemaRequiredItems `json:"requiredItems,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 @@ -721,6 +725,42 @@ func (s *GoogleChromePolicyV1PolicySchemaNoticeDescription) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromePolicyV1PolicySchemaRequiredItems: The fields that will +// become required based on the value of this field. +type GoogleChromePolicyV1PolicySchemaRequiredItems struct { + // FieldConditions: The value(s) of the field that provoke required + // field enforcement. An empty field_conditions implies that any value + // assigned to this field will provoke required field enforcement. + FieldConditions []string `json:"fieldConditions,omitempty"` + + // RequiredFields: The fields that are required as a consequence of the + // field conditions. + RequiredFields []string `json:"requiredFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldConditions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldConditions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromePolicyV1PolicySchemaRequiredItems) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromePolicyV1PolicySchemaRequiredItems + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromePolicyV1PolicyTargetKey: The key used to identify the // target on which the policy will be applied. type GoogleChromePolicyV1PolicyTargetKey struct { @@ -999,8 +1039,7 @@ func (s *GoogleChromePolicyV1UploadPolicyFileResponse) MarshalJSON() ([]byte, er // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/classroom/v1/classroom-api.json b/classroom/v1/classroom-api.json index c9b7f07cba8..aff4b4e0fd0 100644 --- a/classroom/v1/classroom-api.json +++ b/classroom/v1/classroom-api.json @@ -297,7 +297,7 @@ ] }, "patch": { - "description": "Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable", + "description": "Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * InactiveCourseOwner", "flatPath": "v1/courses/{id}", "httpMethod": "PATCH", "id": "classroom.courses.patch", @@ -1471,7 +1471,7 @@ "students": { "methods": { "create": { - "description": "Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.", + "description": "Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a student or teacher in the course.", "flatPath": "v1/courses/{courseId}/students", "httpMethod": "POST", "id": "classroom.courses.students.create", @@ -1612,7 +1612,7 @@ "teachers": { "methods": { "create": { - "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", + "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", "flatPath": "v1/courses/{courseId}/teachers", "httpMethod": "POST", "id": "classroom.courses.teachers.create", @@ -2400,7 +2400,7 @@ } } }, - "revision": "20220302", + "revision": "20220323", "rootUrl": "https://classroom.googleapis.com/", "schemas": { "Announcement": { @@ -3029,7 +3029,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 0143416c8e6..d9210c7fe04 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -1369,8 +1369,7 @@ func (s *DriveFolder) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -3939,7 +3938,7 @@ type CoursesPatchCall struct { // errors. * `NOT_FOUND` if no course exists with the requested ID. * // `INVALID_ARGUMENT` if invalid fields are specified in the update mask // or if no update mask is supplied. * `FAILED_PRECONDITION` for the -// following request errors: * CourseNotModifiable +// following request errors: * CourseNotModifiable * InactiveCourseOwner // // - id: Identifier of the course to update. This identifier can be // either the Classroom-assigned identifier or an alias. @@ -4055,7 +4054,7 @@ func (c *CoursesPatchCall) Do(opts ...googleapi.CallOption) (*Course, error) { } return ret, nil // { - // "description": "Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable", + // "description": "Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable * InactiveCourseOwner", // "flatPath": "v1/courses/{id}", // "httpMethod": "PATCH", // "id": "classroom.courses.patch", @@ -9209,8 +9208,9 @@ type CoursesStudentsCreateCall struct { // requested course ID does not exist. * `FAILED_PRECONDITION` if the // requested user's account is disabled, for the following request // errors: * CourseMemberLimitReached * CourseNotModifiable * -// UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is -// already a student or teacher in the course. +// UserGroupsMembershipLimitReached * InactiveCourseOwner * +// `ALREADY_EXISTS` if the user is already a student or teacher in the +// course. // // - courseId: Identifier of the course to create the student in. This // identifier can be either the Classroom-assigned identifier or an @@ -9323,7 +9323,7 @@ func (c *CoursesStudentsCreateCall) Do(opts ...googleapi.CallOption) (*Student, } return ret, nil // { - // "description": "Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a student or teacher in the course.", + // "description": "Adds a user as a student of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create students in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a student or teacher in the course.", // "flatPath": "v1/courses/{courseId}/students", // "httpMethod": "POST", // "id": "classroom.courses.students.create", @@ -9900,8 +9900,8 @@ type CoursesTeachersCreateCall struct { // disabled, for the following request errors: * // CourseMemberLimitReached * CourseNotModifiable * // CourseTeacherLimitReached * UserGroupsMembershipLimitReached * -// `ALREADY_EXISTS` if the user is already a teacher or student in the -// course. +// InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a +// teacher or student in the course. // // - courseId: Identifier of the course. This identifier can be either // the Classroom-assigned identifier or an alias. @@ -10003,7 +10003,7 @@ func (c *CoursesTeachersCreateCall) Do(opts ...googleapi.CallOption) (*Teacher, } return ret, nil // { - // "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", + // "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", // "flatPath": "v1/courses/{courseId}/teachers", // "httpMethod": "POST", // "id": "classroom.courses.teachers.create", diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index e0454308510..497dd21fd04 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220304", + "revision": "20220318", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -1323,7 +1323,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index cd44ac07a9a..98623153cc1 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -1072,8 +1072,7 @@ func (s *EffectiveIamPolicy) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 684d0d0d679..33579f85b81 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -591,34 +591,6 @@ "resources": { "bitbucketServerConfigs": { "methods": { - "addBitbucketServerConnectedRepository": { - "description": "Add a Bitbucket Server repository to a given BitbucketServerConfig's connected repositories. This API is experimental.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/bitbucketServerConfigs/{bitbucketServerConfigsId}:addBitbucketServerConnectedRepository", - "httpMethod": "POST", - "id": "cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository", - "parameterOrder": [ - "config" - ], - "parameters": { - "config": { - "description": "Required. The name of the `BitbucketServerConfig` to add a connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/bitbucketServerConfigs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+config}:addBitbucketServerConnectedRepository", - "request": { - "$ref": "AddBitbucketServerConnectedRepositoryRequest" - }, - "response": { - "$ref": "AddBitbucketServerConnectedRepositoryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "create": { "description": "Creates a new `BitbucketServerConfig`. This API is experimental.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/bitbucketServerConfigs", @@ -1625,7 +1597,7 @@ "type": "string" }, "name": { - "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.", + "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$", "required": true, @@ -2039,35 +2011,9 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { - "AddBitbucketServerConnectedRepositoryRequest": { - "description": "RPC request object accepted by the AddBitbucketServerConnectedRepository RPC method.", - "id": "AddBitbucketServerConnectedRepositoryRequest", - "properties": { - "connectedRepository": { - "$ref": "BitbucketServerRepositoryId", - "description": "The connected repository to add." - } - }, - "type": "object" - }, - "AddBitbucketServerConnectedRepositoryResponse": { - "description": "RPC request object returned by the AddBitbucketServerConnectedRepository RPC method.", - "id": "AddBitbucketServerConnectedRepositoryResponse", - "properties": { - "config": { - "description": "The name of the `BitbucketServerConfig` that added connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}`", - "type": "string" - }, - "connectedRepository": { - "$ref": "BitbucketServerRepositoryId", - "description": "The connected repository." - } - }, - "type": "object" - }, "ApprovalConfig": { "description": "ApprovalConfig describes configuration for manual approval of a build.", "id": "ApprovalConfig", @@ -3251,7 +3197,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -3340,7 +3286,7 @@ "type": "string" }, "uri": { - "description": "The URI of the repo (optional). If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.", + "description": "The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.", "type": "string" } }, @@ -3496,7 +3442,7 @@ "type": "string" }, "uri": { - "description": "The URI of the repo (required).", + "description": "The URI of the repo. Either uri or repository can be specified and is required.", "type": "string" } }, diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index a5613d87351..cac623b6aeb 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -326,75 +326,6 @@ type V1Service struct { s *Service } -// AddBitbucketServerConnectedRepositoryRequest: RPC request object -// accepted by the AddBitbucketServerConnectedRepository RPC method. -type AddBitbucketServerConnectedRepositoryRequest struct { - // ConnectedRepository: The connected repository to add. - ConnectedRepository *BitbucketServerRepositoryId `json:"connectedRepository,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConnectedRepository") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConnectedRepository") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AddBitbucketServerConnectedRepositoryRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddBitbucketServerConnectedRepositoryRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddBitbucketServerConnectedRepositoryResponse: RPC request object -// returned by the AddBitbucketServerConnectedRepository RPC method. -type AddBitbucketServerConnectedRepositoryResponse struct { - // Config: The name of the `BitbucketServerConfig` that added connected - // repository. Format: - // `projects/{project}/locations/{location}/bitbucketServerConfigs/{confi - // g}` - Config string `json:"config,omitempty"` - - // ConnectedRepository: The connected repository. - ConnectedRepository *BitbucketServerRepositoryId `json:"connectedRepository,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 - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // 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 - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddBitbucketServerConnectedRepositoryResponse) MarshalJSON() ([]byte, error) { - type NoMethod AddBitbucketServerConnectedRepositoryResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ApprovalConfig: ApprovalConfig describes configuration for manual // approval of a build. type ApprovalConfig struct { @@ -2114,8 +2045,7 @@ func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2231,9 +2161,9 @@ type GitFileSource struct { // revision from which to read the specified path. Revision string `json:"revision,omitempty"` - // Uri: The URI of the repo (optional). If unspecified, the repo from - // which the trigger invocation originated is assumed to be the repo - // from which to read the specified path. + // Uri: The URI of the repo. Either uri or repository can be specified. + // If unspecified, the repo from which the trigger invocation originated + // is assumed to be the repo from which to read the specified path. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2474,7 +2404,8 @@ type GitRepoSource struct { // "BITBUCKET_SERVER" - A Bitbucket Server-hosted repo. RepoType string `json:"repoType,omitempty"` - // Uri: The URI of the repo (required). + // Uri: The URI of the repo. Either uri or repository can be specified + // and is required. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -6941,155 +6872,6 @@ func (c *ProjectsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOpti } -// method id "cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository": - -type ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall struct { - s *Service - config string - addbitbucketserverconnectedrepositoryrequest *AddBitbucketServerConnectedRepositoryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddBitbucketServerConnectedRepository: Add a Bitbucket Server -// repository to a given BitbucketServerConfig's connected repositories. -// This API is experimental. -// -// - config: The name of the `BitbucketServerConfig` to add a connected -// repository. Format: -// `projects/{project}/locations/{location}/bitbucketServerConfigs/{con -// fig}`. -func (r *ProjectsLocationsBitbucketServerConfigsService) AddBitbucketServerConnectedRepository(config string, addbitbucketserverconnectedrepositoryrequest *AddBitbucketServerConnectedRepositoryRequest) *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall { - c := &ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.config = config - c.addbitbucketserverconnectedrepositoryrequest = addbitbucketserverconnectedrepositoryrequest - 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 *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall { - 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 *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall { - 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 *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall) 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.addbitbucketserverconnectedrepositoryrequest) - 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/{+config}:addBitbucketServerConnectedRepository") - 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{ - "config": c.config, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository" call. -// Exactly one of *AddBitbucketServerConnectedRepositoryResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *AddBitbucketServerConnectedRepositoryResponse.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsBitbucketServerConfigsAddBitbucketServerConnectedRepositoryCall) Do(opts ...googleapi.CallOption) (*AddBitbucketServerConnectedRepositoryResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddBitbucketServerConnectedRepositoryResponse{ - 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": "Add a Bitbucket Server repository to a given BitbucketServerConfig's connected repositories. This API is experimental.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/bitbucketServerConfigs/{bitbucketServerConfigsId}:addBitbucketServerConnectedRepository", - // "httpMethod": "POST", - // "id": "cloudbuild.projects.locations.bitbucketServerConfigs.addBitbucketServerConnectedRepository", - // "parameterOrder": [ - // "config" - // ], - // "parameters": { - // "config": { - // "description": "Required. The name of the `BitbucketServerConfig` to add a connected repository. Format: `projects/{project}/locations/{location}/bitbucketServerConfigs/{config}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/bitbucketServerConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+config}:addBitbucketServerConnectedRepository", - // "request": { - // "$ref": "AddBitbucketServerConnectedRepositoryRequest" - // }, - // "response": { - // "$ref": "AddBitbucketServerConnectedRepositoryResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "cloudbuild.projects.locations.bitbucketServerConfigs.create": type ProjectsLocationsBitbucketServerConfigsCreateCall struct { @@ -11858,8 +11640,7 @@ type ProjectsLocationsWorkerPoolsDeleteCall struct { // Delete: Deletes a `WorkerPool`. // // - name: The name of the `WorkerPool` to delete. Format: -// `projects/{project}/locations/{workerPool}/workerPools/{workerPool}` -// . +// `projects/{project}/locations/{location}/workerPools/{workerPool}`. func (r *ProjectsLocationsWorkerPoolsService) Delete(name string) *ProjectsLocationsWorkerPoolsDeleteCall { c := &ProjectsLocationsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -11994,7 +11775,7 @@ func (c *ProjectsLocationsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "name": { - // "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.", + // "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$", // "required": true, diff --git a/cloudbuild/v1alpha1/cloudbuild-api.json b/cloudbuild/v1alpha1/cloudbuild-api.json index 97eede179e8..d7e6b4b63e7 100644 --- a/cloudbuild/v1alpha1/cloudbuild-api.json +++ b/cloudbuild/v1alpha1/cloudbuild-api.json @@ -306,7 +306,7 @@ } } }, - "revision": "20220218", + "revision": "20220322", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -1170,7 +1170,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudbuild/v1alpha1/cloudbuild-gen.go b/cloudbuild/v1alpha1/cloudbuild-gen.go index d45c634123b..85a6e770d65 100644 --- a/cloudbuild/v1alpha1/cloudbuild-gen.go +++ b/cloudbuild/v1alpha1/cloudbuild-gen.go @@ -1387,8 +1387,7 @@ func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudbuild/v1alpha2/cloudbuild-api.json b/cloudbuild/v1alpha2/cloudbuild-api.json index 87ab1d51596..cb9505495df 100644 --- a/cloudbuild/v1alpha2/cloudbuild-api.json +++ b/cloudbuild/v1alpha2/cloudbuild-api.json @@ -317,7 +317,7 @@ } } }, - "revision": "20220218", + "revision": "20220322", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -1181,7 +1181,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudbuild/v1alpha2/cloudbuild-gen.go b/cloudbuild/v1alpha2/cloudbuild-gen.go index 232bed767b2..b831aaaad73 100644 --- a/cloudbuild/v1alpha2/cloudbuild-gen.go +++ b/cloudbuild/v1alpha2/cloudbuild-gen.go @@ -1387,8 +1387,7 @@ func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudbuild/v1beta1/cloudbuild-api.json b/cloudbuild/v1beta1/cloudbuild-api.json index 515ea9144e7..08001cea753 100644 --- a/cloudbuild/v1beta1/cloudbuild-api.json +++ b/cloudbuild/v1beta1/cloudbuild-api.json @@ -322,7 +322,7 @@ } } }, - "revision": "20220218", + "revision": "20220322", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -1186,7 +1186,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudbuild/v1beta1/cloudbuild-gen.go b/cloudbuild/v1beta1/cloudbuild-gen.go index 559f274fa13..8c7a5adf2fe 100644 --- a/cloudbuild/v1beta1/cloudbuild-gen.go +++ b/cloudbuild/v1beta1/cloudbuild-gen.go @@ -1387,8 +1387,7 @@ func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 244ae76d600..ab33b073c9c 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -1599,7 +1599,7 @@ } } }, - "revision": "20220218", + "revision": "20220324", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2200,7 +2200,7 @@ "type": "string" }, "purchaseOrderId": { - "description": "Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.", + "description": "Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. This is only supported for Google Workspace entitlements.", "type": "string" }, "suspensionReasons": { @@ -3534,7 +3534,7 @@ "type": "string" }, "purchaseOrderId": { - "description": "Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.", + "description": "Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. This is only supported for Google Workspace entitlements.", "type": "string" }, "suspensionReasons": { @@ -3930,7 +3930,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 94c2f4897fe..23e6e2d98d3 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -1204,7 +1204,7 @@ type GoogleCloudChannelV1Entitlement struct { // for resellers to use for their company tracking usage. If a // purchaseOrderId value is given, it appears in the API responses and // shows up in the invoice. The property accepts up to 80 plain text - // characters. + // characters. This is only supported for Google Workspace entitlements. PurchaseOrderId string `json:"purchaseOrderId,omitempty"` // SuspensionReasons: Output only. Enumerable of all current suspension @@ -3500,7 +3500,7 @@ type GoogleCloudChannelV1alpha1Entitlement struct { // for resellers to use for their company tracking usage. If a // purchaseOrderId value is given, it appears in the API responses and // shows up in the invoice. The property accepts up to 80 plain text - // characters. + // characters. This is only supported for Google Workspace entitlements. PurchaseOrderId string `json:"purchaseOrderId,omitempty"` // SuspensionReasons: Output only. Enumerable of all current suspension @@ -4105,8 +4105,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/clouddebugger/v2/clouddebugger-api.json b/clouddebugger/v2/clouddebugger-api.json index 0da7f82172a..01cda3257cc 100644 --- a/clouddebugger/v2/clouddebugger-api.json +++ b/clouddebugger/v2/clouddebugger-api.json @@ -448,7 +448,7 @@ } } }, - "revision": "20210813", + "revision": "20220318", "rootUrl": "https://clouddebugger.googleapis.com/", "schemas": { "AliasContext": { @@ -739,7 +739,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/clouddebugger/v2/clouddebugger-gen.go b/clouddebugger/v2/clouddebugger-gen.go index 2f989e86cf6..e97970582cf 100644 --- a/clouddebugger/v2/clouddebugger-gen.go +++ b/clouddebugger/v2/clouddebugger-gen.go @@ -611,8 +611,7 @@ func (s *Debuggee) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index d7618bfe5d5..bd7a19283b6 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -363,7 +363,7 @@ ], "parameters": { "filter": { - "description": "Filter builds to be returned. See https://google.aip.dev/160 for more details.", + "description": "Filter pipelines to be returned. See https://google.aip.dev/160 for more details.", "location": "query", "type": "string" }, @@ -586,7 +586,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + "description": "Optional. Filter releases to be returned. See https://google.aip.dev/160 for more details.", "location": "query", "type": "string" }, @@ -732,7 +732,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + "description": "Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more details.", "location": "query", "type": "string" }, @@ -1053,7 +1053,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + "description": "Optional. Filter targets to be returned. See https://google.aip.dev/160 for more details.", "location": "query", "type": "string" }, @@ -1201,7 +1201,7 @@ } } }, - "revision": "20220309", + "revision": "20220314", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AnthosCluster": { diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index d2ded271e67..62e4d9990a2 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -3463,7 +3463,7 @@ func (r *ProjectsLocationsDeliveryPipelinesService) List(parent string) *Project return c } -// Filter sets the optional parameter "filter": Filter builds to be +// Filter sets the optional parameter "filter": Filter pipelines to be // returned. See https://google.aip.dev/160 for more details. func (c *ProjectsLocationsDeliveryPipelinesListCall) Filter(filter string) *ProjectsLocationsDeliveryPipelinesListCall { c.urlParams_.Set("filter", filter) @@ -3603,7 +3603,7 @@ func (c *ProjectsLocationsDeliveryPipelinesListCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "filter": { - // "description": "Filter builds to be returned. See https://google.aip.dev/160 for more details.", + // "description": "Filter pipelines to be returned. See https://google.aip.dev/160 for more details.", // "location": "query", // "type": "string" // }, @@ -4528,7 +4528,7 @@ func (r *ProjectsLocationsDeliveryPipelinesReleasesService) List(parent string) return c } -// Filter sets the optional parameter "filter": Filter builds to be +// Filter sets the optional parameter "filter": Filter releases to be // returned. See https://google.aip.dev/160 for more details. func (c *ProjectsLocationsDeliveryPipelinesReleasesListCall) Filter(filter string) *ProjectsLocationsDeliveryPipelinesReleasesListCall { c.urlParams_.Set("filter", filter) @@ -4669,7 +4669,7 @@ func (c *ProjectsLocationsDeliveryPipelinesReleasesListCall) Do(opts ...googleap // ], // "parameters": { // "filter": { - // "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + // "description": "Optional. Filter releases to be returned. See https://google.aip.dev/160 for more details.", // "location": "query", // "type": "string" // }, @@ -5234,7 +5234,7 @@ func (r *ProjectsLocationsDeliveryPipelinesReleasesRolloutsService) List(parent return c } -// Filter sets the optional parameter "filter": Filter builds to be +// Filter sets the optional parameter "filter": Filter rollouts to be // returned. See https://google.aip.dev/160 for more details. func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsListCall) Filter(filter string) *ProjectsLocationsDeliveryPipelinesReleasesRolloutsListCall { c.urlParams_.Set("filter", filter) @@ -5375,7 +5375,7 @@ func (c *ProjectsLocationsDeliveryPipelinesReleasesRolloutsListCall) Do(opts ... // ], // "parameters": { // "filter": { - // "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + // "description": "Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more details.", // "location": "query", // "type": "string" // }, @@ -6812,7 +6812,7 @@ func (r *ProjectsLocationsTargetsService) List(parent string) *ProjectsLocations return c } -// Filter sets the optional parameter "filter": Filter builds to be +// Filter sets the optional parameter "filter": Filter targets to be // returned. See https://google.aip.dev/160 for more details. func (c *ProjectsLocationsTargetsListCall) Filter(filter string) *ProjectsLocationsTargetsListCall { c.urlParams_.Set("filter", filter) @@ -6952,7 +6952,7 @@ func (c *ProjectsLocationsTargetsListCall) Do(opts ...googleapi.CallOption) (*Li // ], // "parameters": { // "filter": { - // "description": "Optional. Filter builds to be returned. See https://google.aip.dev/160 for more details.", + // "description": "Optional. Filter targets to be returned. See https://google.aip.dev/160 for more details.", // "location": "query", // "type": "string" // }, diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 16a3f0c2476..7c751bf3268 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -546,7 +546,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -945,7 +945,12 @@ "GenerateUploadUrlRequest": { "description": "Request of `GenerateSourceUploadUrl` method.", "id": "GenerateUploadUrlRequest", - "properties": {}, + "properties": { + "kmsKeyName": { + "description": "Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in staging Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to a staging Cloud Storage bucket in an internal regional project. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. The Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). GCF will delegate access to the Google Storage service account in the internal project.", + "type": "string" + } + }, "type": "object" }, "GenerateUploadUrlResponse": { diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index b9fe07d76f2..b9627dc43ac 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -911,6 +911,44 @@ func (s *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) { // GenerateUploadUrlRequest: Request of `GenerateSourceUploadUrl` // method. type GenerateUploadUrlRequest struct { + // KmsKeyName: Resource name of a KMS crypto key (managed by the user) + // used to encrypt/decrypt function source code objects in staging Cloud + // Storage buckets. When you generate an upload url and upload your + // source code, it gets copied to a staging Cloud Storage bucket in an + // internal regional project. The source code is then copied to a + // versioned directory in the sources bucket in the consumer project + // during the function deployment. It must match the pattern + // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKey + // s/{crypto_key}`. The Google Cloud Functions service account + // (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) + // must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + // (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + // Key/KeyRing/Project/Organization (least access preferred). GCF will + // delegate access to the Google Storage service account in the internal + // project. + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateUploadUrlRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateUploadUrlRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GenerateUploadUrlResponse: Response of `GenerateSourceUploadUrl` diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 9878b99e314..8a854b6c2eb 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -696,6 +696,10 @@ "description": "Required. The name of a CloudEvents attribute.", "type": "string" }, + "operator": { + "description": "Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`.", + "type": "string" + }, "value": { "description": "Required. The value for the attribute.", "type": "string" @@ -1560,6 +1564,11 @@ "format": "int32", "type": "integer" }, + "revision": { + "description": "Output only. The name of service revision.", + "readOnly": true, + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 2fffef4b5f4..06f5ae04d62 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -449,6 +449,12 @@ type EventFilter struct { // Attribute: Required. The name of a CloudEvents attribute. Attribute string `json:"attribute,omitempty"` + // Operator: Optional. The operator used for matching the events with + // the value of the filter. If not specified, only events that have an + // exact key-value pair specified in the filter are matched. The only + // allowed value is `match-path-pattern`. + Operator string `json:"operator,omitempty"` + // Value: Required. The value for the attribute. Value string `json:"value,omitempty"` @@ -1678,6 +1684,9 @@ type ServiceConfig struct { // idle instance would have been stopped in the default case. MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + // Revision: Output only. The name of service revision. + Revision string `json:"revision,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index cbcff9b4a86..3008bd1fdfe 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220218", + "revision": "20220317", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -696,6 +696,10 @@ "description": "Required. The name of a CloudEvents attribute.", "type": "string" }, + "operator": { + "description": "Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`.", + "type": "string" + }, "value": { "description": "Required. The value for the attribute.", "type": "string" @@ -1560,6 +1564,11 @@ "format": "int32", "type": "integer" }, + "revision": { + "description": "Output only. The name of service revision.", + "readOnly": true, + "type": "string" + }, "service": { "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", "readOnly": true, diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 35d07903e98..3d0f9a8a98a 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -449,6 +449,12 @@ type EventFilter struct { // Attribute: Required. The name of a CloudEvents attribute. Attribute string `json:"attribute,omitempty"` + // Operator: Optional. The operator used for matching the events with + // the value of the filter. If not specified, only events that have an + // exact key-value pair specified in the filter are matched. The only + // allowed value is `match-path-pattern`. + Operator string `json:"operator,omitempty"` + // Value: Required. The value for the attribute. Value string `json:"value,omitempty"` @@ -1678,6 +1684,9 @@ type ServiceConfig struct { // idle instance would have been stopped in the default case. MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + // Revision: Output only. The name of service revision. + Revision string `json:"revision,omitempty"` + // Service: Output only. Name of the service associated with a Function. // The format of this field is // `projects/{project}/locations/{region}/services/{service}` diff --git a/cloudresourcemanager/v1/cloudresourcemanager-api.json b/cloudresourcemanager/v1/cloudresourcemanager-api.json index 844ec6a6641..573d4b7f574 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1171,7 +1171,7 @@ } } }, - "revision": "20220109", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1490,7 +1490,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1/cloudresourcemanager-gen.go index f17c900935a..e87bbc4b1aa 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -781,8 +781,7 @@ type DeleteTagValueMetadata struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index d6e89369124..80359a2d9b4 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -566,7 +566,7 @@ } } }, - "revision": "20211107", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -806,7 +806,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index 84dd8e4a6e7..c4c3740f8fa 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -578,8 +578,7 @@ type DeleteTagValueMetadata struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index 8cddfa2f05a..9111749f236 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1612,7 +1612,7 @@ } } }, - "revision": "20220306", + "revision": "20220320", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1841,7 +1841,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 6cbde50dca2..c2978b1cc81 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -622,8 +622,7 @@ type DeleteTagValueMetadata struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudscheduler/v1/cloudscheduler-api.json b/cloudscheduler/v1/cloudscheduler-api.json index e13bd4836fa..b99f93367d2 100644 --- a/cloudscheduler/v1/cloudscheduler-api.json +++ b/cloudscheduler/v1/cloudscheduler-api.json @@ -418,7 +418,7 @@ } } }, - "revision": "20220212", + "revision": "20220321", "rootUrl": "https://cloudscheduler.googleapis.com/", "schemas": { "AppEngineHttpTarget": { @@ -496,7 +496,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudscheduler/v1/cloudscheduler-gen.go b/cloudscheduler/v1/cloudscheduler-gen.go index e79a8973bcc..d3c98b450b0 100644 --- a/cloudscheduler/v1/cloudscheduler-gen.go +++ b/cloudscheduler/v1/cloudscheduler-gen.go @@ -343,8 +343,7 @@ func (s *AppEngineRouting) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudscheduler/v1beta1/cloudscheduler-api.json b/cloudscheduler/v1beta1/cloudscheduler-api.json index 6463b7340c7..b55244397a0 100644 --- a/cloudscheduler/v1beta1/cloudscheduler-api.json +++ b/cloudscheduler/v1beta1/cloudscheduler-api.json @@ -433,7 +433,7 @@ } } }, - "revision": "20220212", + "revision": "20220321", "rootUrl": "https://cloudscheduler.googleapis.com/", "schemas": { "AppEngineHttpTarget": { @@ -511,7 +511,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudscheduler/v1beta1/cloudscheduler-gen.go b/cloudscheduler/v1beta1/cloudscheduler-gen.go index a94d42b6a22..e98c1f3b8cd 100644 --- a/cloudscheduler/v1beta1/cloudscheduler-gen.go +++ b/cloudscheduler/v1beta1/cloudscheduler-gen.go @@ -343,8 +343,7 @@ func (s *AppEngineRouting) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index 7512b85087e..47bcf74ce26 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -1994,7 +1994,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "AclInfo": { @@ -2729,6 +2729,18 @@ "description": "This is the proto for holding space level scoring information. This data is used for logging in query-api server and for testing purposes.", "id": "DynamiteSpacesScoringInfo", "properties": { + "affinityScore": { + "format": "double", + "type": "number" + }, + "commonContactCountAffinityScore": { + "format": "double", + "type": "number" + }, + "contactsIntersectionCount": { + "format": "double", + "type": "number" + }, "finalScore": { "format": "double", "type": "number" @@ -2737,14 +2749,42 @@ "format": "double", "type": "number" }, + "joinedSpacesAffinityScore": { + "format": "double", + "type": "number" + }, + "lastMessagePostedTimestampMicros": { + "format": "int64", + "type": "string" + }, + "memberMetadataCount": { + "format": "double", + "type": "number" + }, "messageScore": { "format": "double", "type": "number" }, + "numAucContacts": { + "format": "int64", + "type": "string" + }, + "smallContactListAffinityScore": { + "format": "double", + "type": "number" + }, + "smallUnjoinedSpacesAffinityScore": { + "format": "double", + "type": "number" + }, "spaceAgeInDays": { "format": "double", "type": "number" }, + "spaceCreationTimestampMicros": { + "format": "int64", + "type": "string" + }, "topicalityScore": { "format": "double", "type": "number" @@ -4775,15 +4815,14 @@ "id": "RestrictItem", "properties": { "driveFollowUpRestrict": { - "$ref": "DriveFollowUpRestrict", - "description": "LINT.ThenChange(//depot/google3/java/com/google/apps/search/quality/itemsuggest/utils/SubtypeRerankingUtils.java)" + "$ref": "DriveFollowUpRestrict" }, "driveLocationRestrict": { "$ref": "DriveLocationRestrict" }, "driveMimeTypeRestrict": { "$ref": "DriveMimeTypeRestrict", - "description": "LINT.IfChange Drive Types." + "description": "Drive Types." }, "driveTimeSpanRestrict": { "$ref": "DriveTimeSpanRestrict" @@ -5465,7 +5504,7 @@ "$ref": "GroupId" }, "isExternal": { - "description": "Whether this is an external space outside of user's organization", + "description": "Whether this is a space that enables guest access", "type": "boolean" }, "name": { @@ -5825,6 +5864,10 @@ "description": "Primary key for User resource.", "id": "UserId", "properties": { + "actingUserId": { + "description": "Optional. Opaque, server-assigned ID of the user profile associated with App/user acting on behalf of the human user. This is currently only set when a 3P application is acting on the user's behalf.", + "type": "string" + }, "id": { "description": "Opaque, server-assigned ID of the User.", "type": "string" diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index da93de1d564..92ee36e648f 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -1848,17 +1848,37 @@ func (s *DriveTimeSpanRestrict) MarshalJSON() ([]byte, error) { // scoring information. This data is used for logging in query-api // server and for testing purposes. type DynamiteSpacesScoringInfo struct { + AffinityScore float64 `json:"affinityScore,omitempty"` + + CommonContactCountAffinityScore float64 `json:"commonContactCountAffinityScore,omitempty"` + + ContactsIntersectionCount float64 `json:"contactsIntersectionCount,omitempty"` + FinalScore float64 `json:"finalScore,omitempty"` FreshnessScore float64 `json:"freshnessScore,omitempty"` + JoinedSpacesAffinityScore float64 `json:"joinedSpacesAffinityScore,omitempty"` + + LastMessagePostedTimestampMicros int64 `json:"lastMessagePostedTimestampMicros,omitempty,string"` + + MemberMetadataCount float64 `json:"memberMetadataCount,omitempty"` + MessageScore float64 `json:"messageScore,omitempty"` + NumAucContacts int64 `json:"numAucContacts,omitempty,string"` + + SmallContactListAffinityScore float64 `json:"smallContactListAffinityScore,omitempty"` + + SmallUnjoinedSpacesAffinityScore float64 `json:"smallUnjoinedSpacesAffinityScore,omitempty"` + SpaceAgeInDays float64 `json:"spaceAgeInDays,omitempty"` + SpaceCreationTimestampMicros int64 `json:"spaceCreationTimestampMicros,omitempty,string"` + TopicalityScore float64 `json:"topicalityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "FinalScore") to + // ForceSendFields is a list of field names (e.g. "AffinityScore") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1866,10 +1886,10 @@ type DynamiteSpacesScoringInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FinalScore") to include in - // API requests with the JSON null value. By default, fields with 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. "AffinityScore") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1884,20 +1904,34 @@ func (s *DynamiteSpacesScoringInfo) MarshalJSON() ([]byte, error) { func (s *DynamiteSpacesScoringInfo) UnmarshalJSON(data []byte) error { type NoMethod DynamiteSpacesScoringInfo var s1 struct { - FinalScore gensupport.JSONFloat64 `json:"finalScore"` - FreshnessScore gensupport.JSONFloat64 `json:"freshnessScore"` - MessageScore gensupport.JSONFloat64 `json:"messageScore"` - SpaceAgeInDays gensupport.JSONFloat64 `json:"spaceAgeInDays"` - TopicalityScore gensupport.JSONFloat64 `json:"topicalityScore"` + AffinityScore gensupport.JSONFloat64 `json:"affinityScore"` + CommonContactCountAffinityScore gensupport.JSONFloat64 `json:"commonContactCountAffinityScore"` + ContactsIntersectionCount gensupport.JSONFloat64 `json:"contactsIntersectionCount"` + FinalScore gensupport.JSONFloat64 `json:"finalScore"` + FreshnessScore gensupport.JSONFloat64 `json:"freshnessScore"` + JoinedSpacesAffinityScore gensupport.JSONFloat64 `json:"joinedSpacesAffinityScore"` + MemberMetadataCount gensupport.JSONFloat64 `json:"memberMetadataCount"` + MessageScore gensupport.JSONFloat64 `json:"messageScore"` + SmallContactListAffinityScore gensupport.JSONFloat64 `json:"smallContactListAffinityScore"` + SmallUnjoinedSpacesAffinityScore gensupport.JSONFloat64 `json:"smallUnjoinedSpacesAffinityScore"` + SpaceAgeInDays gensupport.JSONFloat64 `json:"spaceAgeInDays"` + TopicalityScore gensupport.JSONFloat64 `json:"topicalityScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } + s.AffinityScore = float64(s1.AffinityScore) + s.CommonContactCountAffinityScore = float64(s1.CommonContactCountAffinityScore) + s.ContactsIntersectionCount = float64(s1.ContactsIntersectionCount) s.FinalScore = float64(s1.FinalScore) s.FreshnessScore = float64(s1.FreshnessScore) + s.JoinedSpacesAffinityScore = float64(s1.JoinedSpacesAffinityScore) + s.MemberMetadataCount = float64(s1.MemberMetadataCount) s.MessageScore = float64(s1.MessageScore) + s.SmallContactListAffinityScore = float64(s1.SmallContactListAffinityScore) + s.SmallUnjoinedSpacesAffinityScore = float64(s1.SmallUnjoinedSpacesAffinityScore) s.SpaceAgeInDays = float64(s1.SpaceAgeInDays) s.TopicalityScore = float64(s1.TopicalityScore) return nil @@ -5556,14 +5590,11 @@ func (s *ResponseDebugInfo) MarshalJSON() ([]byte, error) { // RestrictItem: Information relevant only to a restrict entry. NextId: // 12 type RestrictItem struct { - // DriveFollowUpRestrict: - // LINT.ThenChange(//depot/google3/java/com/google/apps/search/quality/it - // emsuggest/utils/SubtypeRerankingUtils.java) DriveFollowUpRestrict *DriveFollowUpRestrict `json:"driveFollowUpRestrict,omitempty"` DriveLocationRestrict *DriveLocationRestrict `json:"driveLocationRestrict,omitempty"` - // DriveMimeTypeRestrict: LINT.IfChange Drive Types. + // DriveMimeTypeRestrict: Drive Types. DriveMimeTypeRestrict *DriveMimeTypeRestrict `json:"driveMimeTypeRestrict,omitempty"` DriveTimeSpanRestrict *DriveTimeSpanRestrict `json:"driveTimeSpanRestrict,omitempty"` @@ -6673,8 +6704,7 @@ type SpaceInfo struct { GroupId *GroupId `json:"groupId,omitempty"` - // IsExternal: Whether this is an external space outside of user's - // organization + // IsExternal: Whether this is a space that enables guest access IsExternal bool `json:"isExternal,omitempty"` Name string `json:"name,omitempty"` @@ -7438,6 +7468,12 @@ func (s *UploadItemRef) MarshalJSON() ([]byte, error) { // UserId: Primary key for User resource. type UserId struct { + // ActingUserId: Optional. Opaque, server-assigned ID of the user + // profile associated with App/user acting on behalf of the human user. + // This is currently only set when a 3P application is acting on the + // user's behalf. + ActingUserId string `json:"actingUserId,omitempty"` + // Id: Opaque, server-assigned ID of the User. Id string `json:"id,omitempty"` @@ -7472,7 +7508,7 @@ type UserId struct { // "BOT" Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "ActingUserId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7480,10 +7516,10 @@ type UserId struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. 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. "ActingUserId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if 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/cloudshell/v1/cloudshell-api.json b/cloudshell/v1/cloudshell-api.json index 6240eb4bbb6..711912b5308 100644 --- a/cloudshell/v1/cloudshell-api.json +++ b/cloudshell/v1/cloudshell-api.json @@ -374,7 +374,7 @@ } } }, - "revision": "20210809", + "revision": "20220319", "rootUrl": "https://cloudshell.googleapis.com/", "schemas": { "AddPublicKeyMetadata": { @@ -456,7 +456,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/cloudshell/v1/cloudshell-gen.go b/cloudshell/v1/cloudshell-gen.go index 2bc6e6be997..2872fb71f02 100644 --- a/cloudshell/v1/cloudshell-gen.go +++ b/cloudshell/v1/cloudshell-gen.go @@ -302,8 +302,7 @@ type DeleteEnvironmentMetadata struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index 505ac4270ce..37927b6bf33 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -406,7 +406,7 @@ } } }, - "revision": "20220307", + "revision": "20220326", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -501,7 +501,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -790,7 +790,7 @@ "id": "NodeConfig", "properties": { "diskSizeGb": { - "description": "Optional. The disk size in GB used for node VMs. Minimum size is 20GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "format": "int32", "type": "integer" }, @@ -1044,7 +1044,7 @@ "type": "object" }, "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+(\\.[0-9]+(\\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" }, "pypiPackages": { diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index e39b24a6745..a9d715649d9 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -367,8 +367,7 @@ func (s *Date) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -868,7 +867,7 @@ func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { // nodes running the Apache Airflow software. type NodeConfig struct { // DiskSizeGb: Optional. The disk size in GB used for node VMs. Minimum - // size is 20GB. If unspecified, defaults to 100GB. Cannot be updated. + // size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. // This field is supported for Cloud Composer environments in versions // composer-1.*.*-airflow-*.*.*. DiskSizeGb int64 `json:"diskSizeGb,omitempty"` @@ -1319,17 +1318,17 @@ type SoftwareConfig struct { // and the version of Apache Airflow. It must match the regular // expression // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo - // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also - // checks if the provided version is supported and denies the request - // for an unsupported version. The Cloud Composer portion of the image - // version is a full semantic version (https://semver.org), or an alias - // in the form of major version number or `latest`. When an alias is - // provided, the server replaces it with the current Cloud Composer + // w-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server + // also checks if the provided version is supported and denies the + // request for an unsupported version. The Cloud Composer portion of the + // image version is a full semantic version (https://semver.org), or an + // alias in the form of major version number or `latest`. When an alias + // is provided, the server replaces it with the current Cloud Composer // version that satisfies the alias. The Apache Airflow portion of the // image version is a full semantic version that points to one of the // supported Apache Airflow versions, or an alias in the form of only - // major and minor versions specified. When an alias is provided, the - // server replaces it with the latest Apache Airflow version that + // major or major.minor versions specified. When an alias is provided, + // the server replaces it with the latest Apache Airflow version that // satisfies the alias and is supported in the given Cloud Composer // version. In all cases, the resolved image version is stored in the // same field. See also version list diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index a34fa0ddd17..08c3a5c4005 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -253,6 +253,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "loadSnapshot": { + "description": "Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:loadSnapshot", + "httpMethod": "POST", + "id": "composer.projects.locations.environments.loadSnapshot", + "parameterOrder": [ + "environment" + ], + "parameters": { + "environment": { + "description": "The resource name of the target environment in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+environment}:loadSnapshot", + "request": { + "$ref": "LoadSnapshotRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Update an environment.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}", @@ -314,6 +342,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "saveSnapshot": { + "description": "Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:saveSnapshot", + "httpMethod": "POST", + "id": "composer.projects.locations.environments.saveSnapshot", + "parameterOrder": [ + "environment" + ], + "parameters": { + "environment": { + "description": "The resource name of the source environment in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+environment}:saveSnapshot", + "request": { + "$ref": "SaveSnapshotRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -462,7 +518,7 @@ } } }, - "revision": "20220307", + "revision": "20220326", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -485,7 +541,7 @@ "id": "CheckUpgradeRequest", "properties": { "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+(\\.[0-9]+(\\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" } }, @@ -583,7 +639,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -856,6 +912,21 @@ }, "type": "object" }, + "LoadSnapshotRequest": { + "description": "Request to load a snapshot into a Cloud Composer environment.", + "id": "LoadSnapshotRequest", + "properties": { + "skipPypiPackagesInstallation": { + "description": "Whether or not to skip installing Pypi packages when loading the environment's state.", + "type": "boolean" + }, + "snapshotPath": { + "description": "A Cloud Storage path to a snapshot to load, e.g.: \"gs://my-bucket/snapshots/project_location_environment_timestamp\".", + "type": "string" + } + }, + "type": "object" + }, "LoadSnapshotResponse": { "description": "Response to LoadSnapshotRequest.", "id": "LoadSnapshotResponse", @@ -906,7 +977,7 @@ "id": "NodeConfig", "properties": { "diskSizeGb": { - "description": "Optional. The disk size in GB used for node VMs. Minimum size is 20GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", + "description": "Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*.", "format": "int32", "type": "integer" }, @@ -1131,6 +1202,17 @@ "properties": {}, "type": "object" }, + "SaveSnapshotRequest": { + "description": "Request to create a snapshot of a Cloud Composer environment.", + "id": "SaveSnapshotRequest", + "properties": { + "snapshotLocation": { + "description": "Location in a Cloud Storage where the snapshot is going to be stored, e.g.: \"gs://my-bucket/snapshots\".", + "type": "string" + } + }, + "type": "object" + }, "SaveSnapshotResponse": { "description": "Response to SaveSnapshotRequest.", "id": "SaveSnapshotResponse", @@ -1188,7 +1270,7 @@ "type": "object" }, "imageVersion": { - "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+\\.[0-9]+(\\.[0-9]+)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major and minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", + "description": "The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+(\\.[0-9]+(\\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview).", "type": "string" }, "pypiPackages": { diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index a29e86f5466..63cb55c2402 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -240,17 +240,17 @@ type CheckUpgradeRequest struct { // and the version of Apache Airflow. It must match the regular // expression // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo - // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also - // checks if the provided version is supported and denies the request - // for an unsupported version. The Cloud Composer portion of the image - // version is a full semantic version (https://semver.org), or an alias - // in the form of major version number or `latest`. When an alias is - // provided, the server replaces it with the current Cloud Composer + // w-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server + // also checks if the provided version is supported and denies the + // request for an unsupported version. The Cloud Composer portion of the + // image version is a full semantic version (https://semver.org), or an + // alias in the form of major version number or `latest`. When an alias + // is provided, the server replaces it with the current Cloud Composer // version that satisfies the alias. The Apache Airflow portion of the // image version is a full semantic version that points to one of the // supported Apache Airflow versions, or an alias in the form of only - // major and minor versions specified. When an alias is provided, the - // server replaces it with the latest Apache Airflow version that + // major or major.minor versions specified. When an alias is provided, + // the server replaces it with the latest Apache Airflow version that // satisfies the alias and is supported in the given Cloud Composer // version. In all cases, the resolved image version is stored in the // same field. See also version list @@ -449,8 +449,7 @@ func (s *Date) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -914,6 +913,42 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LoadSnapshotRequest: Request to load a snapshot into a Cloud Composer +// environment. +type LoadSnapshotRequest struct { + // SkipPypiPackagesInstallation: Whether or not to skip installing Pypi + // packages when loading the environment's state. + SkipPypiPackagesInstallation bool `json:"skipPypiPackagesInstallation,omitempty"` + + // SnapshotPath: A Cloud Storage path to a snapshot to load, e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + SnapshotPath string `json:"snapshotPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SkipPypiPackagesInstallation") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "SkipPypiPackagesInstallation") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LoadSnapshotRequest) MarshalJSON() ([]byte, error) { + type NoMethod LoadSnapshotRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LoadSnapshotResponse: Response to LoadSnapshotRequest. type LoadSnapshotResponse struct { } @@ -1004,7 +1039,7 @@ func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { // nodes running the Apache Airflow software. type NodeConfig struct { // DiskSizeGb: Optional. The disk size in GB used for node VMs. Minimum - // size is 20GB. If unspecified, defaults to 100GB. Cannot be updated. + // size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. // This field is supported for Cloud Composer environments in versions // composer-1.*.*-airflow-*.*.*. DiskSizeGb int64 `json:"diskSizeGb,omitempty"` @@ -1390,6 +1425,37 @@ func (s *PrivateEnvironmentConfig) MarshalJSON() ([]byte, error) { type RestartWebServerRequest struct { } +// SaveSnapshotRequest: Request to create a snapshot of a Cloud Composer +// environment. +type SaveSnapshotRequest struct { + // SnapshotLocation: Location in a Cloud Storage where the snapshot is + // going to be stored, e.g.: "gs://my-bucket/snapshots". + SnapshotLocation string `json:"snapshotLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SnapshotLocation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SnapshotLocation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SaveSnapshotRequest) MarshalJSON() ([]byte, error) { + type NoMethod SaveSnapshotRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SaveSnapshotResponse: Response to SaveSnapshotRequest. type SaveSnapshotResponse struct { // SnapshotPath: The fully-resolved Cloud Storage path of the created @@ -1516,17 +1582,17 @@ type SoftwareConfig struct { // and the version of Apache Airflow. It must match the regular // expression // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflo - // w-([0-9]+\.[0-9]+(\.[0-9]+)?)`. When used as input, the server also - // checks if the provided version is supported and denies the request - // for an unsupported version. The Cloud Composer portion of the image - // version is a full semantic version (https://semver.org), or an alias - // in the form of major version number or `latest`. When an alias is - // provided, the server replaces it with the current Cloud Composer + // w-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server + // also checks if the provided version is supported and denies the + // request for an unsupported version. The Cloud Composer portion of the + // image version is a full semantic version (https://semver.org), or an + // alias in the form of major version number or `latest`. When an alias + // is provided, the server replaces it with the current Cloud Composer // version that satisfies the alias. The Apache Airflow portion of the // image version is a full semantic version that points to one of the // supported Apache Airflow versions, or an alias in the form of only - // major and minor versions specified. When an alias is provided, the - // server replaces it with the latest Apache Airflow version that + // major or major.minor versions specified. When an alias is provided, + // the server replaces it with the latest Apache Airflow version that // satisfies the alias and is supported in the given Cloud Composer // version. In all cases, the resolved image version is stored in the // same field. See also version list @@ -2608,6 +2674,153 @@ func (c *ProjectsLocationsEnvironmentsListCall) Pages(ctx context.Context, f fun } } +// method id "composer.projects.locations.environments.loadSnapshot": + +type ProjectsLocationsEnvironmentsLoadSnapshotCall struct { + s *Service + environment string + loadsnapshotrequest *LoadSnapshotRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LoadSnapshot: Loads a snapshot of a Cloud Composer environment. As a +// result of this operation, a snapshot of environment's specified in +// LoadSnapshotRequest is loaded into the environment. +// +// - environment: The resource name of the target environment in the +// form: +// "projects/{projectId}/locations/{locationId}/environments/{environme +// ntId}". +func (r *ProjectsLocationsEnvironmentsService) LoadSnapshot(environment string, loadsnapshotrequest *LoadSnapshotRequest) *ProjectsLocationsEnvironmentsLoadSnapshotCall { + c := &ProjectsLocationsEnvironmentsLoadSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.environment = environment + c.loadsnapshotrequest = loadsnapshotrequest + 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 *ProjectsLocationsEnvironmentsLoadSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsLoadSnapshotCall { + 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 *ProjectsLocationsEnvironmentsLoadSnapshotCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsLoadSnapshotCall { + 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 *ProjectsLocationsEnvironmentsLoadSnapshotCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEnvironmentsLoadSnapshotCall) 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.loadsnapshotrequest) + 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/{+environment}:loadSnapshot") + 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{ + "environment": c.environment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "composer.projects.locations.environments.loadSnapshot" 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 *ProjectsLocationsEnvironmentsLoadSnapshotCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:loadSnapshot", + // "httpMethod": "POST", + // "id": "composer.projects.locations.environments.loadSnapshot", + // "parameterOrder": [ + // "environment" + // ], + // "parameters": { + // "environment": { + // "description": "The resource name of the target environment in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+environment}:loadSnapshot", + // "request": { + // "$ref": "LoadSnapshotRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "composer.projects.locations.environments.patch": type ProjectsLocationsEnvironmentsPatchCall struct { @@ -3009,6 +3222,153 @@ func (c *ProjectsLocationsEnvironmentsRestartWebServerCall) Do(opts ...googleapi } +// method id "composer.projects.locations.environments.saveSnapshot": + +type ProjectsLocationsEnvironmentsSaveSnapshotCall struct { + s *Service + environment string + savesnapshotrequest *SaveSnapshotRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SaveSnapshot: Creates a snapshots of a Cloud Composer environment. As +// a result of this operation, snapshot of environment's state is stored +// in a location specified in the SaveSnapshotRequest. +// +// - environment: The resource name of the source environment in the +// form: +// "projects/{projectId}/locations/{locationId}/environments/{environme +// ntId}". +func (r *ProjectsLocationsEnvironmentsService) SaveSnapshot(environment string, savesnapshotrequest *SaveSnapshotRequest) *ProjectsLocationsEnvironmentsSaveSnapshotCall { + c := &ProjectsLocationsEnvironmentsSaveSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.environment = environment + c.savesnapshotrequest = savesnapshotrequest + 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 *ProjectsLocationsEnvironmentsSaveSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsSaveSnapshotCall { + 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 *ProjectsLocationsEnvironmentsSaveSnapshotCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsSaveSnapshotCall { + 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 *ProjectsLocationsEnvironmentsSaveSnapshotCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEnvironmentsSaveSnapshotCall) 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.savesnapshotrequest) + 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/{+environment}:saveSnapshot") + 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{ + "environment": c.environment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "composer.projects.locations.environments.saveSnapshot" 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 *ProjectsLocationsEnvironmentsSaveSnapshotCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:saveSnapshot", + // "httpMethod": "POST", + // "id": "composer.projects.locations.environments.saveSnapshot", + // "parameterOrder": [ + // "environment" + // ], + // "parameters": { + // "environment": { + // "description": "The resource name of the source environment in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+environment}:saveSnapshot", + // "request": { + // "$ref": "SaveSnapshotRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "composer.projects.locations.imageVersions.list": type ProjectsLocationsImageVersionsListCall struct { diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index cf0c42f1be4..e8359f723b0 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -20042,6 +20042,44 @@ }, "publicAdvertisedPrefixes": { "methods": { + "announce": { + "description": "Announces the specified PublicAdvertisedPrefix", + "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", + "httpMethod": "POST", + "id": "compute.publicAdvertisedPrefixes.announce", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "The name of the public advertised prefix. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "description": "Deletes the specified PublicAdvertisedPrefix", "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", @@ -20246,6 +20284,44 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "withdraw": { + "description": "Withdraws the specified PublicAdvertisedPrefix", + "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", + "httpMethod": "POST", + "id": "compute.publicAdvertisedPrefixes.withdraw", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "The name of the public advertised prefix. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -20311,6 +20387,51 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "announce": { + "description": "Announces the specified PublicDelegatedPrefix in the given region.", + "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", + "httpMethod": "POST", + "id": "compute.publicDelegatedPrefixes.announce", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "The name of the public delegated prefix. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region where the public delegated prefix is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "description": "Deletes the specified PublicDelegatedPrefix in the given region.", "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", @@ -20555,6 +20676,51 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "withdraw": { + "description": "Withdraws the specified PublicDelegatedPrefix in the given region.", + "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", + "httpMethod": "POST", + "id": "compute.publicDelegatedPrefixes.withdraw", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "The name of the public delegated prefix. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region where the public delegated prefix is located. It should comply with RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -38494,7 +38660,7 @@ } } }, - "revision": "20220301", + "revision": "20220315", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -41409,7 +41575,7 @@ "$ref": "Subsetting" }, "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds. The full range of timeout values allowed is 1 - 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", "format": "int32", "type": "integer" } @@ -42662,6 +42828,7 @@ "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", "enum": [ "ACTIVE", + "CANCELLED", "CREATING", "EXPIRED", "NOT_YET_ACTIVE" @@ -42670,6 +42837,7 @@ "", "", "", + "", "" ], "type": "string" @@ -45945,6 +46113,10 @@ ], "type": "string" }, + "noAutomateDnsZone": { + "description": "This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.", + "type": "boolean" + }, "portRange": { "description": "This field can be used only if: - Load balancing scheme is one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in the specified range will be forwarded to target or backend_service. You can only use one of ports, port_range, or allPorts. The three are mutually exclusive. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint ports. Some types of forwarding target have constraints on the acceptable ports. For more information, see [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications). @pattern: \\\\d+(?:-\\\\d+)?", "type": "string" @@ -46991,7 +47163,7 @@ "additionalProperties": { "type": "string" }, - "description": "A list of labels to apply for this resource. Each label key \u0026 value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", + "description": "A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", "type": "object" } }, @@ -47107,7 +47279,7 @@ "id": "GuestOsFeature", "properties": { "type": { - "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", + "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", "enum": [ "BARE_METAL_LINUX_COMPATIBLE", "FEATURE_TYPE_UNSPECIFIED", @@ -57712,7 +57884,7 @@ "id": "NetworkEndpointGroupServerlessDeployment", "properties": { "platform": { - "description": "The platform of the backend target(s) of this NEG. Possible values include: 1. API Gateway: apigateway.googleapis.com 2. App Engine: appengine.googleapis.com 3. Cloud Functions: cloudfunctions.googleapis.com 4. Cloud Run: run.googleapis.com ", + "description": "The platform of the backend target(s) of this NEG. The only supported value is API Gateway: apigateway.googleapis.com.", "type": "string" }, "resource": { @@ -58073,7 +58245,7 @@ "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0.", "type": "string" }, "network": { @@ -58322,6 +58494,18 @@ "format": "int32", "type": "integer" }, + "stackType": { + "description": "Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY.", + "enum": [ + "IPV4_IPV6", + "IPV4_ONLY" + ], + "enumDescriptions": [ + "This Peering will allow IPv4 traffic and routes to be exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 traffic and routes will be exchanged as well.", + "This Peering will only allow IPv4 traffic and routes to be exchanged, even if the matching peering is IPV4_IPV6." + ], + "type": "string" + }, "state": { "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", "enum": [ @@ -66244,6 +66428,10 @@ "description": "Specifies the availability domain (AD), which this instance should be scheduled on. The AD belongs to the spread GroupPlacementPolicy resource policy that has been assigned to the instance. Specify a value between 1-max count of availability domains in your GroupPlacementPolicy. See go/placement-policy-extension for more details.", "format": "int32", "type": "integer" + }, + "terminationTimestamp": { + "description": "Time in future when the instance will be terminated in RFC3339 text format.", + "type": "string" } }, "type": "object" @@ -66397,15 +66585,13 @@ "ACTIVE", "DROPPED", "INACTIVE", - "PENDING", - "UNKNOWN_ROUTE_STATUS" + "PENDING" ], "enumDescriptions": [ "This route is processed and active.", "The route is dropped due to the VPC exceeding the dynamic route limit. For dynamic route limit, please refer to the Learned route example", "This route is processed but inactive due to failure from the backend. The backend may have rejected the route", - "This route is being processed internally. The status will change once processed.", - "" + "This route is being processed internally. The status will change once processed." ], "type": "string" }, diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 6c8f42185ac..7a167d994b2 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -5874,13 +5874,13 @@ type BackendService struct { // TimeoutSec: The backend service timeout has a different meaning // depending on the type of load balancer. For more information see, - // Backend service settings The default is 30 seconds. The full range of - // timeout values allowed is 1 - 2,147,483,647 seconds. This value can - // be overridden in the PathMatcher configuration of the UrlMap that - // references this backend service. Not supported when the backend - // service is referenced by a URL map that is bound to target gRPC proxy - // that has validateForProxyless field set to true. Instead, use - // maxStreamDuration. + // Backend service settings. The default is 30 seconds. The full range + // of timeout values allowed goes from 1 through 2,147,483,647 seconds. + // This value can be overridden in the PathMatcher configuration of the + // UrlMap that references this backend service. Not supported when the + // backend service is referenced by a URL map that is bound to target + // gRPC proxy that has validateForProxyless field set to true. Instead, + // use maxStreamDuration. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7891,6 +7891,7 @@ type Commitment struct { // // Possible values: // "ACTIVE" + // "CANCELLED" // "CREATING" // "EXPIRED" // "NOT_YET_ACTIVE" @@ -13083,6 +13084,11 @@ type ForwardingRule struct { // configured. NetworkTier string `json:"networkTier,omitempty"` + // NoAutomateDnsZone: This is used in PSC consumer ForwardingRule to + // control whether it should try to auto-generate a DNS zone or not. + // Non-PSC forwarding rules do not use this field. + NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` + // PortRange: This field can be used only if: - Load balancing scheme is // one of EXTERNAL, INTERNAL_SELF_MANAGED or INTERNAL_MANAGED - // IPProtocol is one of TCP, UDP, or SCTP. Packets addressed to ports in @@ -14760,14 +14766,10 @@ type GlobalSetLabelsRequest struct { // resource to get the latest fingerprint. LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). + // Labels: A list of labels to apply for this resource. Each label must + // comply with the requirements for labels. For example, + // "webserver-frontend": "images". A label value can also be empty (e.g. + // "my-label": ""). Labels map[string]string `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to @@ -14984,9 +14986,9 @@ type GuestOsFeature struct { // Type: The ID of a supported feature. To add multiple values, use // commas to separate values. Set to one or more of the following // values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - - // UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - - // SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see - // Enabling guest operating system features. + // UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - + // SEV_SNP_CAPABLE For more information, see Enabling guest operating + // system features. // // Possible values: // "BARE_METAL_LINUX_COMPATIBLE" @@ -31811,10 +31813,8 @@ func (s *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { // provided. Note: The target backend service must be in the same // project and located in the same region as the Serverless NEG. type NetworkEndpointGroupServerlessDeployment struct { - // Platform: The platform of the backend target(s) of this NEG. Possible - // values include: 1. API Gateway: apigateway.googleapis.com 2. App - // Engine: appengine.googleapis.com 3. Cloud Functions: - // cloudfunctions.googleapis.com 4. Cloud Run: run.googleapis.com + // Platform: The platform of the backend target(s) of this NEG. The only + // supported value is API Gateway: apigateway.googleapis.com. Platform string `json:"platform,omitempty"` // Resource: The user-defined name of the workload/instance. This value @@ -32414,8 +32414,9 @@ type NetworkInterface struct { Kind string `json:"kind,omitempty"` // Name: [Output Only] The name of the network interface, which is - // generated by the server. For network devices, these are eth0, eth1, - // etc. + // generated by the server. For a VM, the network interface uses the + // nicN naming format. Where N is a value between 0 and 7. The default + // interface value is nic0. Name string `json:"name,omitempty"` // Network: URL of the VPC network resource for this instance. When @@ -32796,6 +32797,18 @@ type NetworkPeering struct { // PeerMtu: Maximum Transmission Unit in bytes. PeerMtu int64 `json:"peerMtu,omitempty"` + // StackType: Which IP version(s) of traffic and routes are allowed to + // be imported or exported between peer networks. The default value is + // IPV4_ONLY. + // + // Possible values: + // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to be + // exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 + // traffic and routes will be exchanged as well. + // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes + // to be exchanged, even if the matching peering is IPV4_IPV6. + StackType string `json:"stackType,omitempty"` + // State: [Output Only] State for the peering, either `ACTIVE` or // `INACTIVE`. The peering is `ACTIVE` when there's a matching // configuration in the peer network. @@ -45119,6 +45132,10 @@ type ResourceStatusScheduling struct { // more details. AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` + // TerminationTimestamp: Time in future when the instance will be + // terminated in RFC3339 text format. + TerminationTimestamp string `json:"terminationTimestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvailabilityDomain") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -45334,7 +45351,6 @@ type Route struct { // from the backend. The backend may have rejected the route // "PENDING" - This route is being processed internally. The status // will change once processed. - // "UNKNOWN_ROUTE_STATUS" RouteStatus string `json:"routeStatus,omitempty"` // RouteType: [Output Only] The type of this route, which can be one of @@ -147252,6 +147268,172 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op } +// method id "compute.publicAdvertisedPrefixes.announce": + +type PublicAdvertisedPrefixesAnnounceCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Announce: Announces the specified PublicAdvertisedPrefix +// +// - project: Project ID for this request. +// - publicAdvertisedPrefix: The name of the public advertised prefix. +// It should comply with RFC1035. +func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesAnnounceCall { + c := &PublicAdvertisedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *PublicAdvertisedPrefixesAnnounceCall { + 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 *PublicAdvertisedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesAnnounceCall { + 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 *PublicAdvertisedPrefixesAnnounceCall) Context(ctx context.Context) *PublicAdvertisedPrefixesAnnounceCall { + 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 *PublicAdvertisedPrefixesAnnounceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesAnnounceCall) 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, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.announce" 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 *PublicAdvertisedPrefixesAnnounceCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Announces the specified PublicAdvertisedPrefix", + // "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", + // "httpMethod": "POST", + // "id": "compute.publicAdvertisedPrefixes.announce", + // "parameterOrder": [ + // "project", + // "publicAdvertisedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicAdvertisedPrefix": { + // "description": "The name of the public advertised prefix. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.publicAdvertisedPrefixes.delete": type PublicAdvertisedPrefixesDeleteCall struct { @@ -148190,6 +148372,172 @@ func (c *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*O } +// method id "compute.publicAdvertisedPrefixes.withdraw": + +type PublicAdvertisedPrefixesWithdrawCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Withdraw: Withdraws the specified PublicAdvertisedPrefix +// +// - project: Project ID for this request. +// - publicAdvertisedPrefix: The name of the public advertised prefix. +// It should comply with RFC1035. +func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { + c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { + 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 *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { + 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 *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { + 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 *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesWithdrawCall) 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, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.withdraw" 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 *PublicAdvertisedPrefixesWithdrawCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Withdraws the specified PublicAdvertisedPrefix", + // "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", + // "httpMethod": "POST", + // "id": "compute.publicAdvertisedPrefixes.withdraw", + // "parameterOrder": [ + // "project", + // "publicAdvertisedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicAdvertisedPrefix": { + // "description": "The name of the public advertised prefix. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.publicDelegatedPrefixes.aggregatedList": type PublicDelegatedPrefixesAggregatedListCall struct { @@ -148476,6 +148824,185 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f } } +// method id "compute.publicDelegatedPrefixes.announce": + +type PublicDelegatedPrefixesAnnounceCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Announce: Announces the specified PublicDelegatedPrefix in the given +// region. +// +// - project: Project ID for this request. +// - publicDelegatedPrefix: The name of the public delegated prefix. It +// should comply with RFC1035. +// - region: The name of the region where the public delegated prefix is +// located. It should comply with RFC1035. +func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { + c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { + 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 *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { + 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 *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { + 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 *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesAnnounceCall) 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, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.announce" 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 *PublicDelegatedPrefixesAnnounceCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Announces the specified PublicDelegatedPrefix in the given region.", + // "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", + // "httpMethod": "POST", + // "id": "compute.publicDelegatedPrefixes.announce", + // "parameterOrder": [ + // "project", + // "region", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "The name of the public delegated prefix. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region where the public delegated prefix is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.publicDelegatedPrefixes.delete": type PublicDelegatedPrefixesDeleteCall struct { @@ -149478,6 +150005,185 @@ func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Op } +// method id "compute.publicDelegatedPrefixes.withdraw": + +type PublicDelegatedPrefixesWithdrawCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given +// region. +// +// - project: Project ID for this request. +// - publicDelegatedPrefix: The name of the public delegated prefix. It +// should comply with RFC1035. +// - region: The name of the region where the public delegated prefix is +// located. It should comply with RFC1035. +func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { + c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { + 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 *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { + 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 *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { + 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 *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesWithdrawCall) 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, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.withdraw" 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 *PublicDelegatedPrefixesWithdrawCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Withdraws the specified PublicDelegatedPrefix in the given region.", + // "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", + // "httpMethod": "POST", + // "id": "compute.publicDelegatedPrefixes.withdraw", + // "parameterOrder": [ + // "project", + // "region", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "The name of the public delegated prefix. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region where the public delegated prefix is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionAutoscalers.delete": type RegionAutoscalersDeleteCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 6ee99227d6b..b0f63c3200f 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -13692,6 +13692,268 @@ } } }, + "networkEdgeSecurityServices": { + "methods": { + "aggregatedList": { + "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to the specified project.", + "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", + "httpMethod": "GET", + "id": "compute.networkEdgeSecurityServices.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/networkEdgeSecurityServices", + "response": { + "$ref": "NetworkEdgeSecurityServiceAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified service.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "DELETE", + "id": "compute.networkEdgeSecurityServices.delete", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Gets a specified NetworkEdgeSecurityService.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "GET", + "id": "compute.networkEdgeSecurityServices.get", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to get.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "response": { + "$ref": "NetworkEdgeSecurityService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new service in the specified project using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + "httpMethod": "POST", + "id": "compute.networkEdgeSecurityServices.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "validateOnly": { + "description": "If true, the request will not be committed.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + "request": { + "$ref": "NetworkEdgeSecurityService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "patch": { + "description": "Patches the specified policy with the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "PATCH", + "id": "compute.networkEdgeSecurityServices.patch", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "paths": { + "location": "query", + "repeated": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "Indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "request": { + "$ref": "NetworkEdgeSecurityService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "networkEndpointGroups": { "methods": { "aggregatedList": { @@ -24055,17 +24317,17 @@ } } }, - "regionSslCertificates": { + "regionSecurityPolicies": { "methods": { "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "description": "Deletes the specified policy.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "DELETE", - "id": "compute.regionSslCertificates.delete", + "id": "compute.regionSecurityPolicies.delete", "parameterOrder": [ "project", "region", - "sslCertificate" + "securityPolicy" ], "parameters": { "project": { @@ -24087,15 +24349,15 @@ "location": "query", "type": "string" }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", + "securityPolicy": { + "description": "Name of the security policy to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "response": { "$ref": "Operation" }, @@ -24105,14 +24367,14 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "description": "List all of the ordered rules present in a single specified policy.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "GET", - "id": "compute.regionSslCertificates.get", + "id": "compute.regionSecurityPolicies.get", "parameterOrder": [ "project", "region", - "sslCertificate" + "securityPolicy" ], "parameters": { "project": { @@ -24129,17 +24391,17 @@ "required": true, "type": "string" }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", + "securityPolicy": { + "description": "Name of the security policy to get.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "response": { - "$ref": "SslCertificate" + "$ref": "SecurityPolicy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24148,10 +24410,10 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", + "description": "Creates a new policy in the specified project using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies", "httpMethod": "POST", - "id": "compute.regionSslCertificates.insert", + "id": "compute.regionSecurityPolicies.insert", "parameterOrder": [ "project", "region" @@ -24175,11 +24437,16 @@ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + }, + "validateOnly": { + "description": "If true, the request will not be committed.", + "location": "query", + "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/sslCertificates", + "path": "projects/{project}/regions/{region}/securityPolicies", "request": { - "$ref": "SslCertificate" + "$ref": "SecurityPolicy" }, "response": { "$ref": "Operation" @@ -24190,10 +24457,10 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", + "description": "List all the policies that have been configured for the specified project and region.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies", "httpMethod": "GET", - "id": "compute.regionSslCertificates.list", + "id": "compute.regionSecurityPolicies.list", "parameterOrder": [ "project", "region" @@ -24242,9 +24509,9 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/sslCertificates", + "path": "projects/{project}/regions/{region}/securityPolicies", "response": { - "$ref": "SslCertificateList" + "$ref": "SecurityPolicyList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24252,15 +24519,15 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource and region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSslCertificates.testIamPermissions", + "patch": { + "description": "Patches the specified policy with the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + "httpMethod": "PATCH", + "id": "compute.regionSecurityPolicies.patch", "parameterOrder": [ "project", "region", - "resource" + "securityPolicy" ], "parameters": { "project": { @@ -24271,46 +24538,50 @@ "type": "string" }, "region": { - "description": "The name of the region for this request.", + "description": "Name of the region scoping this request.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" }, - "resource": { - "description": "Name or id of the resource for this request.", + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "securityPolicy": { + "description": "Name of the security policy to update.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "request": { - "$ref": "TestPermissionsRequest" + "$ref": "SecurityPolicy" }, "response": { - "$ref": "TestPermissionsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] } } }, - "regionTargetHttpProxies": { + "regionSslCertificates": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "description": "Deletes the specified SslCertificate resource in the region.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "httpMethod": "DELETE", - "id": "compute.regionTargetHttpProxies.delete", + "id": "compute.regionSslCertificates.delete", "parameterOrder": [ "project", "region", - "targetHttpProxy" + "sslCertificate" ], "parameters": { "project": { @@ -24332,15 +24603,15 @@ "location": "query", "type": "string" }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", + "sslCertificate": { + "description": "Name of the SslCertificate resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "response": { "$ref": "Operation" }, @@ -24350,14 +24621,14 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.get", + "id": "compute.regionSslCertificates.get", "parameterOrder": [ "project", "region", - "targetHttpProxy" + "sslCertificate" ], "parameters": { "project": { @@ -24374,17 +24645,17 @@ "required": true, "type": "string" }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", + "sslCertificate": { + "description": "Name of the SslCertificate resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "response": { - "$ref": "TargetHttpProxy" + "$ref": "SslCertificate" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24393,10 +24664,10 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", + "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + "flatPath": "projects/{project}/regions/{region}/sslCertificates", "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.insert", + "id": "compute.regionSslCertificates.insert", "parameterOrder": [ "project", "region" @@ -24422,9 +24693,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", + "path": "projects/{project}/regions/{region}/sslCertificates", "request": { - "$ref": "TargetHttpProxy" + "$ref": "SslCertificate" }, "response": { "$ref": "Operation" @@ -24435,10 +24706,10 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", + "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates", "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.list", + "id": "compute.regionSslCertificates.list", "parameterOrder": [ "project", "region" @@ -24487,9 +24758,9 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", + "path": "projects/{project}/regions/{region}/sslCertificates", "response": { - "$ref": "TargetHttpProxyList" + "$ref": "SslCertificateList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24497,61 +24768,11 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource and region.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.testIamPermissions", + "id": "compute.regionSslCertificates.testIamPermissions", "parameterOrder": [ "project", "region", @@ -24580,7 +24801,7 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", + "path": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", "request": { "$ref": "TestPermissionsRequest" }, @@ -24595,17 +24816,17 @@ } } }, - "regionTargetHttpsProxies": { + "regionTargetHttpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "description": "Deletes the specified TargetHttpProxy resource.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "httpMethod": "DELETE", - "id": "compute.regionTargetHttpsProxies.delete", + "id": "compute.regionTargetHttpProxies.delete", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" ], "parameters": { "project": { @@ -24627,15 +24848,15 @@ "location": "query", "type": "string" }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "response": { "$ref": "Operation" }, @@ -24645,14 +24866,14 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.get", + "id": "compute.regionTargetHttpProxies.get", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" ], "parameters": { "project": { @@ -24669,17 +24890,17 @@ "required": true, "type": "string" }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "response": { - "$ref": "TargetHttpsProxy" + "$ref": "TargetHttpProxy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24688,10 +24909,10 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.insert", + "id": "compute.regionTargetHttpProxies.insert", "parameterOrder": [ "project", "region" @@ -24717,9 +24938,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "path": "projects/{project}/regions/{region}/targetHttpProxies", "request": { - "$ref": "TargetHttpsProxy" + "$ref": "TargetHttpProxy" }, "response": { "$ref": "Operation" @@ -24730,10 +24951,10 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.list", + "id": "compute.regionTargetHttpProxies.list", "parameterOrder": [ "project", "region" @@ -24782,9 +25003,9 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "path": "projects/{project}/regions/{region}/targetHttpProxies", "response": { - "$ref": "TargetHttpsProxyList" + "$ref": "TargetHttpProxyList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -24792,65 +25013,360 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "patch": { - "description": "Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.regionTargetHttpsProxies.patch", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + "setUrlMap": { + "description": "Changes the URL map for TargetHttpProxy.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setSslCertificates", + "id": "compute.regionTargetHttpProxies.setUrlMap", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy to set a URL map for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + "request": { + "$ref": "UrlMapReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionTargetHttpProxies.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "regionTargetHttpsProxies": { + "methods": { + "delete": { + "description": "Deletes the specified TargetHttpsProxy resource.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "DELETE", + "id": "compute.regionTargetHttpsProxies.delete", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.get", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "TargetHttpsProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/targetHttpsProxies", + "request": { + "$ref": "TargetHttpsProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "response": { + "$ref": "TargetHttpsProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "PATCH", + "id": "compute.regionTargetHttpsProxies.patch", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "request": { + "$ref": "TargetHttpsProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setSslCertificates": { + "description": "Replaces SslCertificates for TargetHttpsProxy.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.setSslCertificates", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" ], "parameters": { "project": { @@ -27252,6 +27768,66 @@ "https://www.googleapis.com/auth/compute" ] }, + "aggregatedList": { + "description": "Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.", + "flatPath": "projects/{project}/aggregated/securityPolicies", + "httpMethod": "GET", + "id": "compute.securityPolicies.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/securityPolicies", + "response": { + "$ref": "SecurityPoliciesAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { "description": "Deletes the specified policy.", "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", @@ -34216,7 +34792,7 @@ } } }, - "revision": "20220301", + "revision": "20220315", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -36935,7 +37511,7 @@ "$ref": "Subsetting" }, "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds. The full range of timeout values allowed is 1 - 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", "format": "int32", "type": "integer" } @@ -41625,7 +42201,7 @@ "additionalProperties": { "type": "string" }, - "description": "A list of labels to apply for this resource. Each label key \u0026 value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", + "description": "A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", "type": "object" } }, @@ -41722,7 +42298,7 @@ "id": "GuestOsFeature", "properties": { "type": { - "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", + "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "GVNIC", @@ -49843,6 +50419,281 @@ }, "type": "object" }, + "NetworkEdgeSecurityService": { + "description": "Represents a Google Cloud Armor network edge security service resource.", + "id": "NetworkEdgeSecurityService", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a NetworkEdgeSecurityService. An up-to-date fingerprint must be provided in order to update the NetworkEdgeSecurityService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a NetworkEdgeSecurityService.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#networkEdgeSecurityService", + "description": "[Output only] Type of the resource. Always compute#networkEdgeSecurityService for NetworkEdgeSecurityServices", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the resource resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "securityPolicy": { + "description": "The resource URL for the network edge security service associated with this network edge security service.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEdgeSecurityServiceAggregatedList": { + "id": "NetworkEdgeSecurityServiceAggregatedList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "NetworkEdgeSecurityServicesScopedList", + "description": "Name of the scope containing this set of security policies." + }, + "description": "A list of NetworkEdgeSecurityServicesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#networkEdgeSecurityServiceAggregatedList", + "description": "[Output Only] Type of resource. Always compute#networkEdgeSecurityServiceAggregatedList for lists of Network Edge Security Services.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEdgeSecurityServicesScopedList": { + "id": "NetworkEdgeSecurityServicesScopedList", + "properties": { + "networkEdgeSecurityServices": { + "description": "A list of NetworkEdgeSecurityServices contained in this scope.", + "items": { + "$ref": "NetworkEdgeSecurityService" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of security policies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "NetworkEndpoint": { "description": "The network endpoint.", "id": "NetworkEndpoint", @@ -50306,7 +51157,7 @@ "id": "NetworkEndpointGroupServerlessDeployment", "properties": { "platform": { - "description": "The platform of the backend target(s) of this NEG. Possible values include: 1. API Gateway: apigateway.googleapis.com 2. App Engine: appengine.googleapis.com 3. Cloud Functions: cloudfunctions.googleapis.com 4. Cloud Run: run.googleapis.com ", + "description": "The platform of the backend target(s) of this NEG. The only supported value is API Gateway: apigateway.googleapis.com.", "type": "string" }, "resource": { @@ -50667,7 +51518,7 @@ "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0.", "type": "string" }, "network": { @@ -58123,6 +58974,22 @@ "format": "uint32", "type": "integer" }, + "routeStatus": { + "description": "[Output only] The status of the route.", + "enum": [ + "ACTIVE", + "DROPPED", + "INACTIVE", + "PENDING" + ], + "enumDescriptions": [ + "This route is processed and active.", + "The route is dropped due to the VPC exceeding the dynamic route limit. For dynamic route limit, please refer to the Learned route example", + "This route is processed but inactive due to failure from the backend. The backend may have rejected the route", + "This route is being processed internally. The status will change once processed." + ], + "type": "string" + }, "routeType": { "description": "[Output Only] The type of this route, which can be one of the following values: - 'TRANSIT' for a transit route that this router learned from another Cloud Router and will readvertise to one of its BGP peers - 'SUBNET' for a route from a subnet of the VPC - 'BGP' for a route learned from a BGP peer of this router - 'STATIC' for a static route", "enum": [ @@ -59951,6 +60818,132 @@ }, "type": "object" }, + "SecurityPoliciesAggregatedList": { + "id": "SecurityPoliciesAggregatedList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "SecurityPoliciesScopedList", + "description": "Name of the scope containing this set of security policies." + }, + "description": "A list of SecurityPoliciesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#securityPoliciesAggregatedList", + "description": "[Output Only] Type of resource. Always compute#securityPolicyAggregatedList for lists of Security Policies.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SecurityPoliciesListPreconfiguredExpressionSetsResponse": { "id": "SecurityPoliciesListPreconfiguredExpressionSetsResponse", "properties": { @@ -59960,6 +60953,104 @@ }, "type": "object" }, + "SecurityPoliciesScopedList": { + "id": "SecurityPoliciesScopedList", + "properties": { + "securityPolicies": { + "description": "A list of SecurityPolicies contained in this scope.", + "items": { + "$ref": "SecurityPolicy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of security policies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SecurityPoliciesWafConfig": { "id": "SecurityPoliciesWafConfig", "properties": { @@ -59990,6 +61081,9 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "ddosProtectionConfig": { + "$ref": "SecurityPolicyDdosProtectionConfig" + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -60038,6 +61132,10 @@ "recaptchaOptionsConfig": { "$ref": "SecurityPolicyRecaptchaOptionsConfig" }, + "region": { + "description": "[Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.", + "type": "string" + }, "ruleTupleCount": { "description": "[Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.", "format": "int32", @@ -60063,9 +61161,11 @@ "enum": [ "CLOUD_ARMOR", "CLOUD_ARMOR_EDGE", + "CLOUD_ARMOR_NETWORK", "FIREWALL" ], "enumDescriptions": [ + "", "", "", "" @@ -60159,6 +61259,23 @@ }, "type": "object" }, + "SecurityPolicyDdosProtectionConfig": { + "id": "SecurityPolicyDdosProtectionConfig", + "properties": { + "ddosProtection": { + "enum": [ + "ADVANCED", + "STANDARD" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "SecurityPolicyList": { "id": "SecurityPolicyList", "properties": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 3daee661a61..c6708a2ad17 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -177,6 +177,7 @@ func New(client *http.Client) (*Service, error) { s.Licenses = NewLicensesService(s) s.MachineImages = NewMachineImagesService(s) s.MachineTypes = NewMachineTypesService(s) + s.NetworkEdgeSecurityServices = NewNetworkEdgeSecurityServicesService(s) s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) s.Networks = NewNetworksService(s) @@ -202,6 +203,7 @@ func New(client *http.Client) (*Service, error) { s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) s.RegionOperations = NewRegionOperationsService(s) + s.RegionSecurityPolicies = NewRegionSecurityPoliciesService(s) s.RegionSslCertificates = NewRegionSslCertificatesService(s) s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) s.RegionTargetHttpsProxies = NewRegionTargetHttpsProxiesService(s) @@ -304,6 +306,8 @@ type Service struct { MachineTypes *MachineTypesService + NetworkEdgeSecurityServices *NetworkEdgeSecurityServicesService + NetworkEndpointGroups *NetworkEndpointGroupsService NetworkFirewallPolicies *NetworkFirewallPoliciesService @@ -354,6 +358,8 @@ type Service struct { RegionOperations *RegionOperationsService + RegionSecurityPolicies *RegionSecurityPoliciesService + RegionSslCertificates *RegionSslCertificatesService RegionTargetHttpProxies *RegionTargetHttpProxiesService @@ -715,6 +721,15 @@ type MachineTypesService struct { s *Service } +func NewNetworkEdgeSecurityServicesService(s *Service) *NetworkEdgeSecurityServicesService { + rs := &NetworkEdgeSecurityServicesService{s: s} + return rs +} + +type NetworkEdgeSecurityServicesService struct { + s *Service +} + func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { rs := &NetworkEndpointGroupsService{s: s} return rs @@ -940,6 +955,15 @@ type RegionOperationsService struct { s *Service } +func NewRegionSecurityPoliciesService(s *Service) *RegionSecurityPoliciesService { + rs := &RegionSecurityPoliciesService{s: s} + return rs +} + +type RegionSecurityPoliciesService struct { + s *Service +} + func NewRegionSslCertificatesService(s *Service) *RegionSslCertificatesService { rs := &RegionSslCertificatesService{s: s} return rs @@ -5554,13 +5578,13 @@ type BackendService struct { // TimeoutSec: The backend service timeout has a different meaning // depending on the type of load balancer. For more information see, - // Backend service settings The default is 30 seconds. The full range of - // timeout values allowed is 1 - 2,147,483,647 seconds. This value can - // be overridden in the PathMatcher configuration of the UrlMap that - // references this backend service. Not supported when the backend - // service is referenced by a URL map that is bound to target gRPC proxy - // that has validateForProxyless field set to true. Instead, use - // maxStreamDuration. + // Backend service settings. The default is 30 seconds. The full range + // of timeout values allowed goes from 1 through 2,147,483,647 seconds. + // This value can be overridden in the PathMatcher configuration of the + // UrlMap that references this backend service. Not supported when the + // backend service is referenced by a URL map that is bound to target + // gRPC proxy that has validateForProxyless field set to true. Instead, + // use maxStreamDuration. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -13067,14 +13091,10 @@ type GlobalSetLabelsRequest struct { // resource to get the latest fingerprint. LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). + // Labels: A list of labels to apply for this resource. Each label must + // comply with the requirements for labels. For example, + // "webserver-frontend": "images". A label value can also be empty (e.g. + // "my-label": ""). Labels map[string]string `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to @@ -13255,9 +13275,9 @@ type GuestOsFeature struct { // Type: The ID of a supported feature. To add multiple values, use // commas to separate values. Set to one or more of the following // values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - - // UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - - // SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see - // Enabling guest operating system features. + // UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - + // SEV_SNP_CAPABLE For more information, see Enabling guest operating + // system features. // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" @@ -26137,6 +26157,440 @@ func (s *Network) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkEdgeSecurityService: Represents a Google Cloud Armor network +// edge security service resource. +type NetworkEdgeSecurityService struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a NetworkEdgeSecurityService. An + // up-to-date fingerprint must be provided in order to update the + // NetworkEdgeSecurityService, otherwise the request will fail with + // error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve a NetworkEdgeSecurityService. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output only] Type of the resource. Always + // compute#networkEdgeSecurityService for NetworkEdgeSecurityServices + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Region: [Output Only] URL of the region where the resource resides. + // You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SecurityPolicy: The resource URL for the network edge security + // service associated with this network edge security service. + SecurityPolicy string `json:"securityPolicy,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServiceAggregatedList struct { + Etag string `json:"etag,omitempty"` + + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEdgeSecurityServicesScopedList resources. + Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#networkEdgeSecurityServiceAggregatedList for lists of Network + // Edge Security Services. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEdgeSecurityServiceAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServiceAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServicesScopedList struct { + // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices + // contained in this scope. + NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` + + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEdgeSecurityServicesScopedListWarning: Informational warning +// which replaces the list of security policies when the list is empty. +type NetworkEdgeSecurityServicesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServicesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkEndpoint: The network endpoint. type NetworkEndpoint struct { // Annotations: Metadata defined as annotations on the network endpoint. @@ -26889,10 +27343,8 @@ func (s *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { // provided. Note: The target backend service must be in the same // project and located in the same region as the Serverless NEG. type NetworkEndpointGroupServerlessDeployment struct { - // Platform: The platform of the backend target(s) of this NEG. Possible - // values include: 1. API Gateway: apigateway.googleapis.com 2. App - // Engine: appengine.googleapis.com 3. Cloud Functions: - // cloudfunctions.googleapis.com 4. Cloud Run: run.googleapis.com + // Platform: The platform of the backend target(s) of this NEG. The only + // supported value is API Gateway: apigateway.googleapis.com. Platform string `json:"platform,omitempty"` // Resource: The user-defined name of the workload/instance. This value @@ -27492,8 +27944,9 @@ type NetworkInterface struct { Kind string `json:"kind,omitempty"` // Name: [Output Only] The name of the network interface, which is - // generated by the server. For network devices, these are eth0, eth1, - // etc. + // generated by the server. For a VM, the network interface uses the + // nicN naming format. Where N is a value between 0 and 7. The default + // interface value is nic0. Name string `json:"name,omitempty"` // Network: URL of the VPC network resource for this instance. When @@ -39087,6 +39540,19 @@ type Route struct { // is `1000`. The priority value must be from `0` to `65535`, inclusive. Priority int64 `json:"priority,omitempty"` + // RouteStatus: [Output only] The status of the route. + // + // Possible values: + // "ACTIVE" - This route is processed and active. + // "DROPPED" - The route is dropped due to the VPC exceeding the + // dynamic route limit. For dynamic route limit, please refer to the + // Learned route example + // "INACTIVE" - This route is processed but inactive due to failure + // from the backend. The backend may have rejected the route + // "PENDING" - This route is being processed internally. The status + // will change once processed. + RouteStatus string `json:"routeStatus,omitempty"` + // RouteType: [Output Only] The type of this route, which can be one of // the following values: - 'TRANSIT' for a transit route that this // router learned from another Cloud Router and will readvertise to one @@ -41613,6 +42079,194 @@ func (s *Screenshot) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPoliciesAggregatedList struct { + Etag string `json:"etag,omitempty"` + + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SecurityPoliciesScopedList resources. + Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#securityPolicyAggregatedList for lists of Security Policies. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPoliciesAggregatedListWarning: [Output Only] Informational +// warning message. +type SecurityPoliciesAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` @@ -41645,6 +42299,168 @@ func (s *SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPoliciesScopedList struct { + // SecurityPolicies: A list of SecurityPolicies contained in this scope. + SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` + + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SecurityPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPoliciesScopedListWarning: Informational warning which +// replaces the list of security policies when the list is empty. +type SecurityPoliciesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPoliciesWafConfig struct { WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` @@ -41687,6 +42503,8 @@ type SecurityPolicy struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` @@ -41749,6 +42567,11 @@ type SecurityPolicy struct { RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` + // Region: [Output Only] URL of the region where the regional security + // policy resides. This field is not applicable to global security + // policies. + Region string `json:"region,omitempty"` + // RuleTupleCount: [Output Only] Total count of all security policy rule // tuples. A security policy can not exceed a set number of tuples. RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` @@ -41783,6 +42606,7 @@ type SecurityPolicy struct { // Possible values: // "CLOUD_ARMOR" // "CLOUD_ARMOR_EDGE" + // "CLOUD_ARMOR_NETWORK" // "FIREWALL" Type string `json:"type,omitempty"` @@ -41960,6 +42784,36 @@ func (s *SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPolicyDdosProtectionConfig struct { + // Possible values: + // "ADVANCED" + // "STANDARD" + DdosProtection string `json:"ddosProtection,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DdosProtection") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DdosProtection") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyDdosProtectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPolicyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -112451,9 +113305,9 @@ func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeLis } } -// method id "compute.networkEndpointGroups.aggregatedList": +// method id "compute.networkEdgeSecurityServices.aggregatedList": -type NetworkEndpointGroupsAggregatedListCall struct { +type NetworkEdgeSecurityServicesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -112462,12 +113316,12 @@ type NetworkEndpointGroupsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of network endpoint groups and -// sorts them by zone. +// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService +// resources available to the specified project. // -// - project: Project ID for this request. -func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { - c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { + c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -112494,7 +113348,7 @@ func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEn // can include `AND` and `OR` expressions explicitly. For example: ``` // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") // AND (scheduling.automaticRestart = true) ``` -func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -112507,7 +113361,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *Network // response. For resource types which predate this field, if this flag // is omitted or false, only scopes of the scope types where the // resource type is expected to be found will be included. -func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -112518,7 +113372,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllSco // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -112532,7 +113386,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) * // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -112540,7 +113394,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *Netwo // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -112549,7 +113403,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *N // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -112557,7 +113411,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPar // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -112567,7 +113421,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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 *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -112575,21 +113429,21 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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 *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { 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 *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) 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_ { @@ -112602,7 +113456,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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, "projects/{project}/aggregated/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -112615,15 +113469,16 @@ func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.aggregatedList" call. -// Exactly one of *NetworkEndpointGroupAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. +// Exactly one of *NetworkEdgeSecurityServiceAggregatedList or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *NetworkEdgeSecurityServiceAggregatedList.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -112642,7 +113497,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &NetworkEndpointGroupAggregatedList{ + ret := &NetworkEdgeSecurityServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -112654,10 +113509,10 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", - // "flatPath": "projects/{project}/aggregated/networkEndpointGroups", + // "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to the specified project.", + // "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", // "httpMethod": "GET", - // "id": "compute.networkEndpointGroups.aggregatedList", + // "id": "compute.networkEdgeSecurityServices.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -112691,7 +113546,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -112703,9 +113558,9 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/networkEndpointGroups", + // "path": "projects/{project}/aggregated/networkEdgeSecurityServices", // "response": { - // "$ref": "NetworkEndpointGroupAggregatedList" + // "$ref": "NetworkEdgeSecurityServiceAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -112719,7 +113574,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // 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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -112737,223 +113592,29 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f f } } -// method id "compute.networkEndpointGroups.attachNetworkEndpoints": +// method id "compute.networkEdgeSecurityServices.delete": -type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the -// specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where -// you are attaching network endpoints to. It should comply with -// RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is -// located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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.networkendpointgroupsattachendpointsrequest) - 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, 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": "Attach a list of network endpoints to the specified network endpoint group.", - // "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - // "httpMethod": "POST", - // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", - // "parameterOrder": [ - // "project", - // "zone", - // "networkEndpointGroup" - // ], - // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - // "request": { - // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networkEndpointGroups.delete": - -type NetworkEndpointGroupsDeleteCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesDeleteCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network endpoint group. The network -// endpoints in the NEG and the VM instances they belong to are not -// terminated when the NEG is deleted. Note that the NEG cannot be -// deleted if there are backend services referencing it. +// Delete: Deletes the specified service. // -// - networkEndpointGroup: The name of the network endpoint group to -// delete. It should comply with RFC1035. +// - networkEdgeSecurityService: Name of the network edge security +// service to delete. // - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is -// located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { - c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { + c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService return c } @@ -112968,7 +113629,7 @@ func (r *NetworkEndpointGroupsService) Delete(project string, zone string, netwo // 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -112976,7 +113637,7 @@ func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -112984,21 +113645,21 @@ func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkE // 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 *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { 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 *NetworkEndpointGroupsDeleteCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesDeleteCall) 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_ { @@ -113008,7 +113669,7 @@ func (c *NetworkEndpointGroupsDeleteCall) 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -113016,21 +113677,1256 @@ func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.delete" call. +// Do executes the "compute.networkEdgeSecurityServices.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 *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEdgeSecurityServicesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 the specified service.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "DELETE", + // "id": "compute.networkEdgeSecurityServices.delete", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.get": + +type NetworkEdgeSecurityServicesGetCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a specified NetworkEdgeSecurityService. +// +// - networkEdgeSecurityService: Name of the network edge security +// service to get. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { + c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService + 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 *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesGetCall) 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + 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{ + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.get" call. +// Exactly one of *NetworkEdgeSecurityService or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEdgeSecurityService.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEdgeSecurityService{ + 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 specified NetworkEdgeSecurityService.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "GET", + // "id": "compute.networkEdgeSecurityServices.get", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to get.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "response": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.insert": + +type NetworkEdgeSecurityServicesInsertCall struct { + s *Service + project string + region string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new service in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { + c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkedgesecurityservice = networkedgesecurityservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesInsertCall) 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.networkedgesecurityservice) + 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.insert" 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 *NetworkEdgeSecurityServicesInsertCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 service in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + // "httpMethod": "POST", + // "id": "compute.networkEdgeSecurityServices.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "validateOnly": { + // "description": "If true, the request will not be committed.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + // "request": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.patch": + +type NetworkEdgeSecurityServicesPatchCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the +// request. +// +// - networkEdgeSecurityService: Name of the network edge security +// service to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { + c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService + c.networkedgesecurityservice = networkedgesecurityservice + return c +} + +// Paths sets the optional parameter "paths": +func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates fields +// to be updated as part of this request. +func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesPatchCall) 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.networkedgesecurityservice) + 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.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 *NetworkEdgeSecurityServicesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Patches the specified policy with the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "PATCH", + // "id": "compute.networkEdgeSecurityServices.patch", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "paths": { + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "Indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "request": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.aggregatedList": + +type NetworkEndpointGroupsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of network endpoint groups and +// sorts them by zone. +// +// - project: Project ID for this request. +func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { + c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAggregatedListCall) 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, "projects/{project}/aggregated/networkEndpointGroups") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.aggregatedList" call. +// Exactly one of *NetworkEndpointGroupAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroupAggregatedList{ + 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": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "flatPath": "projects/{project}/aggregated/networkEndpointGroups", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) 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 "compute.networkEndpointGroups.attachNetworkEndpoints": + +type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AttachNetworkEndpoints: Attach a list of network endpoints to the +// specified network endpoint group. +// +// - networkEndpointGroup: The name of the network endpoint group where +// you are attaching network endpoints to. It should comply with +// RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is +// located. It should comply with RFC1035. +func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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.networkendpointgroupsattachendpointsrequest) + 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Attach a list of network endpoints to the specified network endpoint group.", + // "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.delete": + +type NetworkEndpointGroupsDeleteCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified network endpoint group. The network +// endpoints in the NEG and the VM instances they belong to are not +// terminated when the NEG is deleted. Note that the NEG cannot be +// deleted if there are backend services referencing it. +// +// - networkEndpointGroup: The name of the network endpoint group to +// delete. It should comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is +// located. It should comply with RFC1035. +func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { + c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDeleteCall) 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + 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{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.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 *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -155045,6 +156941,1014 @@ func (c *RegionOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } +// method id "compute.regionSecurityPolicies.delete": + +type RegionSecurityPoliciesDeleteCall struct { + s *Service + project string + region string + securityPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified policy. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to delete. +func (r *RegionSecurityPoliciesService) Delete(project string, region string, securityPolicy string) *RegionSecurityPoliciesDeleteCall { + c := &RegionSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesDeleteCall) RequestId(requestId string) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Context(ctx context.Context) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesDeleteCall) 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + 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{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.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 *RegionSecurityPoliciesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 the specified policy.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "DELETE", + // "id": "compute.regionSecurityPolicies.delete", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.get": + +type RegionSecurityPoliciesGetCall struct { + s *Service + project string + region string + securityPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: List all of the ordered rules present in a single specified +// policy. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to get. +func (r *RegionSecurityPoliciesService) Get(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetCall { + c := &RegionSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + 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 *RegionSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) Context(ctx context.Context) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesGetCall) 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + 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{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.get" call. +// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPolicy{ + 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 all of the ordered rules present in a single specified policy.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "GET", + // "id": "compute.regionSecurityPolicies.get", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to get.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "SecurityPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.insert": + +type RegionSecurityPoliciesInsertCall struct { + s *Service + project string + region string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new policy in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionSecurityPoliciesService) Insert(project string, region string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesInsertCall { + c := &RegionSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesInsertCall) RequestId(requestId string) *RegionSecurityPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *RegionSecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Context(ctx context.Context) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesInsertCall) 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.securitypolicy) + 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, "projects/{project}/regions/{region}/securityPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.insert" 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 *RegionSecurityPoliciesInsertCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 policy in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies", + // "httpMethod": "POST", + // "id": "compute.regionSecurityPolicies.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "validateOnly": { + // "description": "If true, the request will not be committed.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.list": + +type RegionSecurityPoliciesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all the policies that have been configured for the +// specified project and region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionSecurityPoliciesService) List(project string, region string) *RegionSecurityPoliciesListCall { + c := &RegionSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *RegionSecurityPoliciesListCall) Filter(filter string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionSecurityPoliciesListCall) MaxResults(maxResults int64) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *RegionSecurityPoliciesListCall) OrderBy(orderBy string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionSecurityPoliciesListCall) PageToken(pageToken string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSecurityPoliciesListCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) Context(ctx context.Context) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesListCall) 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, "projects/{project}/regions/{region}/securityPolicies") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.list" call. +// Exactly one of *SecurityPolicyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SecurityPolicyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPolicyList{ + 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 all the policies that have been configured for the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies", + // "httpMethod": "GET", + // "id": "compute.regionSecurityPolicies.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies", + // "response": { + // "$ref": "SecurityPolicyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *RegionSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) 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 "compute.regionSecurityPolicies.patch": + +type RegionSecurityPoliciesPatchCall struct { + s *Service + project string + region string + securityPolicy string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the +// request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to update. +func (r *RegionSecurityPoliciesService) Patch(project string, region string, securityPolicy string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesPatchCall { + c := &RegionSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesPatchCall) RequestId(requestId string) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesPatchCall) 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.securitypolicy) + 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.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 *RegionSecurityPoliciesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Patches the specified policy with the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "PATCH", + // "id": "compute.regionSecurityPolicies.patch", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionSslCertificates.delete": type RegionSslCertificatesDeleteCall struct { @@ -167845,6 +170749,291 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } +// method id "compute.securityPolicies.aggregatedList": + +type SecurityPoliciesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all SecurityPolicy resources, +// regional and global, available to the specified project. +// +// - project: Name of the project scoping this request. +func (r *SecurityPoliciesService) AggregatedList(project string) *SecurityPoliciesAggregatedListCall { + c := &SecurityPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *SecurityPoliciesAggregatedListCall) Filter(filter string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *SecurityPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *SecurityPoliciesAggregatedListCall) MaxResults(maxResults int64) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *SecurityPoliciesAggregatedListCall) OrderBy(orderBy string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *SecurityPoliciesAggregatedListCall) PageToken(pageToken string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *SecurityPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) Context(ctx context.Context) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesAggregatedListCall) 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, "projects/{project}/aggregated/securityPolicies") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.aggregatedList" call. +// Exactly one of *SecurityPoliciesAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SecurityPoliciesAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SecurityPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPoliciesAggregatedList{ + 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": "Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/securityPolicies", + // "httpMethod": "GET", + // "id": "compute.securityPolicies.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/securityPolicies", + // "response": { + // "$ref": "SecurityPoliciesAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *SecurityPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SecurityPoliciesAggregatedList) 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 "compute.securityPolicies.delete": type SecurityPoliciesDeleteCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index e27b06d3332..a69d8a8c76c 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -12338,6 +12338,268 @@ } } }, + "networkEdgeSecurityServices": { + "methods": { + "aggregatedList": { + "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to the specified project.", + "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", + "httpMethod": "GET", + "id": "compute.networkEdgeSecurityServices.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/networkEdgeSecurityServices", + "response": { + "$ref": "NetworkEdgeSecurityServiceAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified service.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "DELETE", + "id": "compute.networkEdgeSecurityServices.delete", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Gets a specified NetworkEdgeSecurityService.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "GET", + "id": "compute.networkEdgeSecurityServices.get", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to get.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "response": { + "$ref": "NetworkEdgeSecurityService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new service in the specified project using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + "httpMethod": "POST", + "id": "compute.networkEdgeSecurityServices.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "validateOnly": { + "description": "If true, the request will not be committed.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + "request": { + "$ref": "NetworkEdgeSecurityService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "patch": { + "description": "Patches the specified policy with the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "httpMethod": "PATCH", + "id": "compute.networkEdgeSecurityServices.patch", + "parameterOrder": [ + "project", + "region", + "networkEdgeSecurityService" + ], + "parameters": { + "networkEdgeSecurityService": { + "description": "Name of the network edge security service to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "paths": { + "location": "query", + "repeated": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "Indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + "request": { + "$ref": "NetworkEdgeSecurityService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "networkEndpointGroups": { "methods": { "aggregatedList": { @@ -21426,17 +21688,17 @@ } } }, - "regionSslCertificates": { + "regionSecurityPolicies": { "methods": { "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "description": "Deletes the specified policy.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "DELETE", - "id": "compute.regionSslCertificates.delete", + "id": "compute.regionSecurityPolicies.delete", "parameterOrder": [ "project", "region", - "sslCertificate" + "securityPolicy" ], "parameters": { "project": { @@ -21458,15 +21720,15 @@ "location": "query", "type": "string" }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", + "securityPolicy": { + "description": "Name of the security policy to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "response": { "$ref": "Operation" }, @@ -21476,14 +21738,14 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "description": "List all of the ordered rules present in a single specified policy.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "GET", - "id": "compute.regionSslCertificates.get", + "id": "compute.regionSecurityPolicies.get", "parameterOrder": [ "project", "region", - "sslCertificate" + "securityPolicy" ], "parameters": { "project": { @@ -21500,17 +21762,17 @@ "required": true, "type": "string" }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", + "securityPolicy": { + "description": "Name of the security policy to get.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "response": { - "$ref": "SslCertificate" + "$ref": "SecurityPolicy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -21519,10 +21781,10 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", + "description": "Creates a new policy in the specified project using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies", "httpMethod": "POST", - "id": "compute.regionSslCertificates.insert", + "id": "compute.regionSecurityPolicies.insert", "parameterOrder": [ "project", "region" @@ -21546,11 +21808,16 @@ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + }, + "validateOnly": { + "description": "If true, the request will not be committed.", + "location": "query", + "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/sslCertificates", + "path": "projects/{project}/regions/{region}/securityPolicies", "request": { - "$ref": "SslCertificate" + "$ref": "SecurityPolicy" }, "response": { "$ref": "Operation" @@ -21561,10 +21828,10 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", + "description": "List all the policies that have been configured for the specified project and region.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies", "httpMethod": "GET", - "id": "compute.regionSslCertificates.list", + "id": "compute.regionSecurityPolicies.list", "parameterOrder": [ "project", "region" @@ -21613,29 +21880,79 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/sslCertificates", + "path": "projects/{project}/regions/{region}/securityPolicies", "response": { - "$ref": "SslCertificateList" + "$ref": "SecurityPolicyList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "patch": { + "description": "Patches the specified policy with the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + "httpMethod": "PATCH", + "id": "compute.regionSecurityPolicies.patch", + "parameterOrder": [ + "project", + "region", + "securityPolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "securityPolicy": { + "description": "Name of the security policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + "request": { + "$ref": "SecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, - "regionTargetHttpProxies": { + "regionSslCertificates": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "description": "Deletes the specified SslCertificate resource in the region.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "httpMethod": "DELETE", - "id": "compute.regionTargetHttpProxies.delete", + "id": "compute.regionSslCertificates.delete", "parameterOrder": [ "project", "region", - "targetHttpProxy" + "sslCertificate" ], "parameters": { "project": { @@ -21657,15 +21974,15 @@ "location": "query", "type": "string" }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", + "sslCertificate": { + "description": "Name of the SslCertificate resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "response": { "$ref": "Operation" }, @@ -21675,14 +21992,14 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.get", + "id": "compute.regionSslCertificates.get", "parameterOrder": [ "project", "region", - "targetHttpProxy" + "sslCertificate" ], "parameters": { "project": { @@ -21699,17 +22016,17 @@ "required": true, "type": "string" }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", + "sslCertificate": { + "description": "Name of the SslCertificate resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", "response": { - "$ref": "TargetHttpProxy" + "$ref": "SslCertificate" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -21718,10 +22035,10 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", + "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + "flatPath": "projects/{project}/regions/{region}/sslCertificates", "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.insert", + "id": "compute.regionSslCertificates.insert", "parameterOrder": [ "project", "region" @@ -21747,9 +22064,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", + "path": "projects/{project}/regions/{region}/sslCertificates", "request": { - "$ref": "TargetHttpProxy" + "$ref": "SslCertificate" }, "response": { "$ref": "Operation" @@ -21760,10 +22077,10 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", + "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/sslCertificates", "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.list", + "id": "compute.regionSslCertificates.list", "parameterOrder": [ "project", "region" @@ -21812,79 +22129,29 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", + "path": "projects/{project}/regions/{region}/sslCertificates", "response": { - "$ref": "TargetHttpProxyList" + "$ref": "SslCertificateList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] } } }, - "regionTargetHttpsProxies": { + "regionTargetHttpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "description": "Deletes the specified TargetHttpProxy resource.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "httpMethod": "DELETE", - "id": "compute.regionTargetHttpsProxies.delete", + "id": "compute.regionTargetHttpProxies.delete", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" ], "parameters": { "project": { @@ -21906,15 +22173,15 @@ "location": "query", "type": "string" }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "response": { "$ref": "Operation" }, @@ -21924,14 +22191,14 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.get", + "id": "compute.regionTargetHttpProxies.get", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" ], "parameters": { "project": { @@ -21948,17 +22215,17 @@ "required": true, "type": "string" }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", "response": { - "$ref": "TargetHttpsProxy" + "$ref": "TargetHttpProxy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -21967,10 +22234,10 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.insert", + "id": "compute.regionTargetHttpProxies.insert", "parameterOrder": [ "project", "region" @@ -21996,9 +22263,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "path": "projects/{project}/regions/{region}/targetHttpProxies", "request": { - "$ref": "TargetHttpsProxy" + "$ref": "TargetHttpProxy" }, "response": { "$ref": "Operation" @@ -22009,10 +22276,10 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.list", + "id": "compute.regionTargetHttpProxies.list", "parameterOrder": [ "project", "region" @@ -22061,9 +22328,9 @@ "type": "boolean" } }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "path": "projects/{project}/regions/{region}/targetHttpProxies", "response": { - "$ref": "TargetHttpsProxyList" + "$ref": "TargetHttpProxyList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -22071,65 +22338,314 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "patch": { - "description": "Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.regionTargetHttpsProxies.patch", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + "setUrlMap": { + "description": "Changes the URL map for TargetHttpProxy.", + "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setSslCertificates", + "id": "compute.regionTargetHttpProxies.setUrlMap", "parameterOrder": [ "project", "region", - "targetHttpsProxy" + "targetHttpProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy to set a URL map for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + "request": { + "$ref": "UrlMapReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "regionTargetHttpsProxies": { + "methods": { + "delete": { + "description": "Deletes the specified TargetHttpsProxy resource.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "DELETE", + "id": "compute.regionTargetHttpsProxies.delete", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.get", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "TargetHttpsProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/targetHttpsProxies", + "request": { + "$ref": "TargetHttpsProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies", + "response": { + "$ref": "TargetHttpsProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified regional TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "httpMethod": "PATCH", + "id": "compute.regionTargetHttpsProxies.patch", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "request": { + "$ref": "TargetHttpsProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setSslCertificates": { + "description": "Replaces SslCertificates for TargetHttpsProxy.", + "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.setSslCertificates", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" ], "parameters": { "project": { @@ -24295,6 +24811,66 @@ "https://www.googleapis.com/auth/compute" ] }, + "aggregatedList": { + "description": "Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.", + "flatPath": "projects/{project}/aggregated/securityPolicies", + "httpMethod": "GET", + "id": "compute.securityPolicies.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/securityPolicies", + "response": { + "$ref": "SecurityPoliciesAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { "description": "Deletes the specified policy.", "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", @@ -30499,7 +31075,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -32995,6 +33571,13 @@ ], "type": "string" }, + "localityLbPolicies": { + "description": "A list of locality load balancing policies to be used in order of preference. Either the policy or the customPolicy field should be set. Overrides any value set in the localityLbPolicy field. localityLbPolicies is only supported when the BackendService is referenced by a URL Map that is referenced by a target gRPC proxy that has the validateForProxyless field set to true.", + "items": { + "$ref": "BackendServiceLocalityLoadBalancingPolicyConfig" + }, + "type": "array" + }, "localityLbPolicy": { "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "enum": [ @@ -33115,7 +33698,7 @@ "$ref": "Subsetting" }, "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds. The full range of timeout values allowed is 1 - 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.", "format": "int32", "type": "integer" } @@ -33583,6 +34166,63 @@ }, "type": "object" }, + "BackendServiceLocalityLoadBalancingPolicyConfig": { + "description": "Container for either a built-in LB policy supported by gRPC or Envoy or a custom one implemented by the end user.", + "id": "BackendServiceLocalityLoadBalancingPolicyConfig", + "properties": { + "customPolicy": { + "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" + }, + "policy": { + "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" + } + }, + "type": "object" + }, + "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy": { + "description": "The configuration for a custom policy implemented by the user and deployed with the client.", + "id": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", + "properties": { + "data": { + "description": "An optional, arbitrary JSON object with configuration data, understood by a locally installed custom policy implementation.", + "type": "string" + }, + "name": { + "description": "Identifies the custom policy. The value should match the type the custom implementation is registered with on the gRPC clients. It should follow protocol buffer message naming conventions and include the full path (e.g. myorg.CustomLbPolicy). The maximum length is 256 characters. Note that specifying the same custom policy more than once for a backend is not a valid configuration and will be rejected.", + "type": "string" + } + }, + "type": "object" + }, + "BackendServiceLocalityLoadBalancingPolicyConfigPolicy": { + "description": "The configuration for a built-in load balancing policy.", + "id": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy", + "properties": { + "name": { + "description": "The name of a locality load balancer policy to be used. The value should be one of the predefined ones as supported by localityLbPolicy, although at the moment only ROUND_ROBIN is supported. This field should only be populated when the customPolicy field is not used. Note that specifying the same policy more than once for a backend is not a valid configuration and will be rejected.", + "enum": [ + "INVALID_LB_POLICY", + "LEAST_REQUEST", + "MAGLEV", + "ORIGINAL_DESTINATION", + "RANDOM", + "RING_HASH", + "ROUND_ROBIN" + ], + "enumDescriptions": [ + "", + "An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.", + "This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824", + "Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.", + "The load balancer selects a random healthy host.", + "The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.", + "This is a simple policy in which each healthy backend is selected in round robin order. This is the default." + ], + "type": "string" + } + }, + "type": "object" + }, "BackendServiceLogConfig": { "description": "The available logging options for the load balancer traffic served by this backend service.", "id": "BackendServiceLogConfig", @@ -36942,6 +37582,10 @@ "format": "int32", "type": "integer" }, + "ruleName": { + "description": "An optional name for the rule. This field is not a unique identifier and can be updated.", + "type": "string" + }, "ruleTupleCount": { "description": "[Output Only] Calculation of the complexity of a single firewall policy rule.", "format": "int32", @@ -37740,7 +38384,7 @@ "additionalProperties": { "type": "string" }, - "description": "A list of labels to apply for this resource. Each label key \u0026 value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", + "description": "A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", "type": "object" } }, @@ -37837,7 +38481,7 @@ "id": "GuestOsFeature", "properties": { "type": { - "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", + "description": "The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see Enabling guest operating system features.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "GVNIC", @@ -45682,6 +46326,281 @@ }, "type": "object" }, + "NetworkEdgeSecurityService": { + "description": "Represents a Google Cloud Armor network edge security service resource.", + "id": "NetworkEdgeSecurityService", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a NetworkEdgeSecurityService. An up-to-date fingerprint must be provided in order to update the NetworkEdgeSecurityService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a NetworkEdgeSecurityService.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#networkEdgeSecurityService", + "description": "[Output only] Type of the resource. Always compute#networkEdgeSecurityService for NetworkEdgeSecurityServices", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the resource resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "securityPolicy": { + "description": "The resource URL for the network edge security service associated with this network edge security service.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEdgeSecurityServiceAggregatedList": { + "id": "NetworkEdgeSecurityServiceAggregatedList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "NetworkEdgeSecurityServicesScopedList", + "description": "Name of the scope containing this set of security policies." + }, + "description": "A list of NetworkEdgeSecurityServicesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#networkEdgeSecurityServiceAggregatedList", + "description": "[Output Only] Type of resource. Always compute#networkEdgeSecurityServiceAggregatedList for lists of Network Edge Security Services.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEdgeSecurityServicesScopedList": { + "id": "NetworkEdgeSecurityServicesScopedList", + "properties": { + "networkEdgeSecurityServices": { + "description": "A list of NetworkEdgeSecurityServices contained in this scope.", + "items": { + "$ref": "NetworkEdgeSecurityService" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of security policies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "NetworkEndpoint": { "description": "The network endpoint.", "id": "NetworkEndpoint", @@ -46435,7 +47354,7 @@ "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and 7. The default interface value is nic0.", "type": "string" }, "network": { @@ -53712,6 +54631,22 @@ "format": "uint32", "type": "integer" }, + "routeStatus": { + "description": "[Output only] The status of the route.", + "enum": [ + "ACTIVE", + "DROPPED", + "INACTIVE", + "PENDING" + ], + "enumDescriptions": [ + "This route is processed and active.", + "The route is dropped due to the VPC exceeding the dynamic route limit. For dynamic route limit, please refer to the Learned route example", + "This route is processed but inactive due to failure from the backend. The backend may have rejected the route", + "This route is being processed internally. The status will change once processed." + ], + "type": "string" + }, "routeType": { "description": "[Output Only] The type of this route, which can be one of the following values: - 'TRANSIT' for a transit route that this router learned from another Cloud Router and will readvertise to one of its BGP peers - 'SUBNET' for a route from a subnet of the VPC - 'BGP' for a route learned from a BGP peer of this router - 'STATIC' for a static route", "enum": [ @@ -55520,6 +56455,132 @@ }, "type": "object" }, + "SecurityPoliciesAggregatedList": { + "id": "SecurityPoliciesAggregatedList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "SecurityPoliciesScopedList", + "description": "Name of the scope containing this set of security policies." + }, + "description": "A list of SecurityPoliciesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#securityPoliciesAggregatedList", + "description": "[Output Only] Type of resource. Always compute#securityPolicyAggregatedList for lists of Security Policies.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SecurityPoliciesListPreconfiguredExpressionSetsResponse": { "id": "SecurityPoliciesListPreconfiguredExpressionSetsResponse", "properties": { @@ -55529,6 +56590,104 @@ }, "type": "object" }, + "SecurityPoliciesScopedList": { + "id": "SecurityPoliciesScopedList", + "properties": { + "securityPolicies": { + "description": "A list of SecurityPolicies contained in this scope.", + "items": { + "$ref": "SecurityPolicy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of security policies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SecurityPoliciesWafConfig": { "id": "SecurityPoliciesWafConfig", "properties": { @@ -55552,6 +56711,9 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "ddosProtectionConfig": { + "$ref": "SecurityPolicyDdosProtectionConfig" + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -55579,6 +56741,10 @@ "recaptchaOptionsConfig": { "$ref": "SecurityPolicyRecaptchaOptionsConfig" }, + "region": { + "description": "[Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.", + "type": "string" + }, "rules": { "description": "A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", "items": { @@ -55594,9 +56760,11 @@ "description": "The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. This field can be set only at resource creation time.", "enum": [ "CLOUD_ARMOR", - "CLOUD_ARMOR_EDGE" + "CLOUD_ARMOR_EDGE", + "CLOUD_ARMOR_NETWORK" ], "enumDescriptions": [ + "", "", "" ], @@ -55667,6 +56835,23 @@ }, "type": "object" }, + "SecurityPolicyDdosProtectionConfig": { + "id": "SecurityPolicyDdosProtectionConfig", + "properties": { + "ddosProtection": { + "enum": [ + "ADVANCED", + "STANDARD" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "SecurityPolicyList": { "id": "SecurityPolicyList", "properties": { @@ -57926,7 +59111,7 @@ "type": "boolean" }, "externalIpv6Prefix": { - "description": "[Output Only] The range of external IPv6 addresses that are owned by this subnetwork.", + "description": "[Output Only] The external IPv6 address range that is assigned to this subnetwork.", "type": "string" }, "fingerprint": { @@ -57944,7 +59129,7 @@ "type": "string" }, "internalIpv6Prefix": { - "description": "[Output Only] The range of internal IPv6 addresses that are owned by this subnetwork. Note this is for general VM to VM communication, not to be confused with the ipv6_cidr_range field.", + "description": "[Output Only] The internal IPv6 address range that is assigned to this subnetwork.", "type": "string" }, "ipCidrRange": { @@ -57952,19 +59137,19 @@ "type": "string" }, "ipv6AccessType": { - "description": "The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet cannot enable direct path.", + "description": "The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.", "enum": [ "EXTERNAL", "INTERNAL" ], "enumDescriptions": [ - "VMs on this subnet will be assigned IPv6 addresses that are accesible via the Internet, as well as the VPC network.", + "VMs on this subnet will be assigned IPv6 addresses that are accessible via the Internet, as well as the VPC network.", "VMs on this subnet will be assigned IPv6 addresses that are only accessible over the VPC network." ], "type": "string" }, "ipv6CidrRange": { - "description": "[Output Only] The range of internal IPv6 addresses that are owned by this subnetwork. Note this will be for private google access only eventually.", + "description": "[Output Only] This field is for internal use.", "type": "string" }, "kind": { @@ -57990,7 +59175,7 @@ "type": "boolean" }, "privateIpv6GoogleAccess": { - "description": "The private IPv6 google access type for the VMs in this subnet. This is an expanded field of enablePrivateV6Access. If both fields are set, privateIpv6GoogleAccess will take priority. This field can be both set at resource creation time and updated using patch.", + "description": "This field is for internal use. This field can be both set at resource creation time and updated using patch.", "enum": [ "DISABLE_GOOGLE_ACCESS", "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index ae47a4860e7..ad39992599d 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -177,6 +177,7 @@ func New(client *http.Client) (*Service, error) { s.Licenses = NewLicensesService(s) s.MachineImages = NewMachineImagesService(s) s.MachineTypes = NewMachineTypesService(s) + s.NetworkEdgeSecurityServices = NewNetworkEdgeSecurityServicesService(s) s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) s.Networks = NewNetworksService(s) @@ -201,6 +202,7 @@ func New(client *http.Client) (*Service, error) { s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) s.RegionOperations = NewRegionOperationsService(s) + s.RegionSecurityPolicies = NewRegionSecurityPoliciesService(s) s.RegionSslCertificates = NewRegionSslCertificatesService(s) s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) s.RegionTargetHttpsProxies = NewRegionTargetHttpsProxiesService(s) @@ -303,6 +305,8 @@ type Service struct { MachineTypes *MachineTypesService + NetworkEdgeSecurityServices *NetworkEdgeSecurityServicesService + NetworkEndpointGroups *NetworkEndpointGroupsService NetworkFirewallPolicies *NetworkFirewallPoliciesService @@ -351,6 +355,8 @@ type Service struct { RegionOperations *RegionOperationsService + RegionSecurityPolicies *RegionSecurityPoliciesService + RegionSslCertificates *RegionSslCertificatesService RegionTargetHttpProxies *RegionTargetHttpProxiesService @@ -712,6 +718,15 @@ type MachineTypesService struct { s *Service } +func NewNetworkEdgeSecurityServicesService(s *Service) *NetworkEdgeSecurityServicesService { + rs := &NetworkEdgeSecurityServicesService{s: s} + return rs +} + +type NetworkEdgeSecurityServicesService struct { + s *Service +} + func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { rs := &NetworkEndpointGroupsService{s: s} return rs @@ -928,6 +943,15 @@ type RegionOperationsService struct { s *Service } +func NewRegionSecurityPoliciesService(s *Service) *RegionSecurityPoliciesService { + rs := &RegionSecurityPoliciesService{s: s} + return rs +} + +type RegionSecurityPoliciesService struct { + s *Service +} + func NewRegionSslCertificatesService(s *Service) *RegionSslCertificatesService { rs := &RegionSslCertificatesService{s: s} return rs @@ -5220,6 +5244,14 @@ type BackendService struct { // "INVALID_LOAD_BALANCING_SCHEME" LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + // LocalityLbPolicies: A list of locality load balancing policies to be + // used in order of preference. Either the policy or the customPolicy + // field should be set. Overrides any value set in the localityLbPolicy + // field. localityLbPolicies is only supported when the BackendService + // is referenced by a URL Map that is referenced by a target gRPC proxy + // that has the validateForProxyless field set to true. + LocalityLbPolicies []*BackendServiceLocalityLoadBalancingPolicyConfig `json:"localityLbPolicies,omitempty"` + // LocalityLbPolicy: The load balancing algorithm used within the scope // of the locality. The possible values are: - ROUND_ROBIN: This is a // simple policy in which each healthy backend is selected in round @@ -5404,13 +5436,13 @@ type BackendService struct { // TimeoutSec: The backend service timeout has a different meaning // depending on the type of load balancer. For more information see, - // Backend service settings The default is 30 seconds. The full range of - // timeout values allowed is 1 - 2,147,483,647 seconds. This value can - // be overridden in the PathMatcher configuration of the UrlMap that - // references this backend service. Not supported when the backend - // service is referenced by a URL map that is bound to target gRPC proxy - // that has validateForProxyless field set to true. Instead, use - // maxStreamDuration. + // Backend service settings. The default is 30 seconds. The full range + // of timeout values allowed goes from 1 through 2,147,483,647 seconds. + // This value can be overridden in the PathMatcher configuration of the + // UrlMap that references this backend service. Not supported when the + // backend service is referenced by a URL map that is bound to target + // gRPC proxy that has validateForProxyless field set to true. Instead, + // use maxStreamDuration. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -6293,6 +6325,132 @@ func (s *BackendServiceListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceLocalityLoadBalancingPolicyConfig: Container for either +// a built-in LB policy supported by gRPC or Envoy or a custom one +// implemented by the end user. +type BackendServiceLocalityLoadBalancingPolicyConfig struct { + CustomPolicy *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy `json:"customPolicy,omitempty"` + + Policy *BackendServiceLocalityLoadBalancingPolicyConfigPolicy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomPolicy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomPolicy") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceLocalityLoadBalancingPolicyConfig) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceLocalityLoadBalancingPolicyConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy: The +// configuration for a custom policy implemented by the user and +// deployed with the client. +type BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy struct { + // Data: An optional, arbitrary JSON object with configuration data, + // understood by a locally installed custom policy implementation. + Data string `json:"data,omitempty"` + + // Name: Identifies the custom policy. The value should match the type + // the custom implementation is registered with on the gRPC clients. It + // should follow protocol buffer message naming conventions and include + // the full path (e.g. myorg.CustomLbPolicy). The maximum length is 256 + // characters. Note that specifying the same custom policy more than + // once for a backend is not a valid configuration and will be rejected. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Data") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Data") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BackendServiceLocalityLoadBalancingPolicyConfigPolicy: The +// configuration for a built-in load balancing policy. +type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { + // Name: The name of a locality load balancer policy to be used. The + // value should be one of the predefined ones as supported by + // localityLbPolicy, although at the moment only ROUND_ROBIN is + // supported. This field should only be populated when the customPolicy + // field is not used. Note that specifying the same policy more than + // once for a backend is not a valid configuration and will be rejected. + // + // Possible values: + // "INVALID_LB_POLICY" + // "LEAST_REQUEST" - An O(1) algorithm which selects two random + // healthy hosts and picks the host which has fewer active requests. + // "MAGLEV" - This algorithm implements consistent hashing to + // backends. Maglev can be used as a drop in replacement for the ring + // hash load balancer. Maglev is not as stable as ring hash but has + // faster table lookup build times and host selection times. For more + // information about Maglev, see + // https://ai.google/research/pubs/pub44824 + // "ORIGINAL_DESTINATION" - Backend host is selected based on the + // client connection metadata, i.e., connections are opened to the same + // address as the destination address of the incoming connection before + // the connection was redirected to the load balancer. + // "RANDOM" - The load balancer selects a random healthy host. + // "RING_HASH" - The ring/modulo hash load balancer implements + // consistent hashing to backends. The algorithm has the property that + // the addition/removal of a host from a set of N hosts only affects 1/N + // of the requests. + // "ROUND_ROBIN" - This is a simple policy in which each healthy + // backend is selected in round robin order. This is the default. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *BackendServiceLocalityLoadBalancingPolicyConfigPolicy) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BackendServiceLogConfig: The available logging options for the load // balancer traffic served by this backend service. type BackendServiceLogConfig struct { @@ -11559,6 +11717,10 @@ type FirewallPolicyRule struct { // priority and 2147483647 is the lowest prority. Priority int64 `json:"priority,omitempty"` + // RuleName: An optional name for the rule. This field is not a unique + // identifier and can be updated. + RuleName string `json:"ruleName,omitempty"` + // RuleTupleCount: [Output Only] Calculation of the complexity of a // single firewall policy rule. RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` @@ -12843,14 +13005,10 @@ type GlobalSetLabelsRequest struct { // resource to get the latest fingerprint. LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). + // Labels: A list of labels to apply for this resource. Each label must + // comply with the requirements for labels. For example, + // "webserver-frontend": "images". A label value can also be empty (e.g. + // "my-label": ""). Labels map[string]string `json:"labels,omitempty"` // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to @@ -13031,9 +13189,9 @@ type GuestOsFeature struct { // Type: The ID of a supported feature. To add multiple values, use // commas to separate values. Set to one or more of the following // values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - - // UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - - // SUSPEND_RESUME_COMPATIBLE - SEV_SNP_CAPABLE For more information, see - // Enabling guest operating system features. + // UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - + // SEV_SNP_CAPABLE For more information, see Enabling guest operating + // system features. // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" @@ -25455,101 +25613,35 @@ func (s *Network) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpoint: The network endpoint. -type NetworkEndpoint struct { - // Annotations: Metadata defined as annotations on the network endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - - // Fqdn: Optional fully qualified domain name of network endpoint. This - // can only be specified when NetworkEndpointGroup.network_endpoint_type - // is NON_GCP_FQDN_PORT. - Fqdn string `json:"fqdn,omitempty"` - - // Instance: The name for a specific VM instance that the IP address - // belongs to. This is required for network endpoints of type - // GCE_VM_IP_PORT. The instance must be in the same zone of network - // endpoint group. The name must be 1-63 characters long, and comply - // with RFC1035. - Instance string `json:"instance,omitempty"` - - // IpAddress: Optional IPv4 address of network endpoint. The IP address - // must belong to a VM in Compute Engine (either the primary IP or as - // part of an aliased IP range). If the IP address is not specified, - // then the primary IP address for the VM instance in the network that - // the network endpoint group belongs to will be used. - IpAddress string `json:"ipAddress,omitempty"` - - // Port: Optional port number of network endpoint. If not specified, the - // defaultPort for the network endpoint group will be used. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Annotations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroup: Represents a collection of network endpoints. A -// network endpoint group (NEG) defines how a set of endpoints should be -// reached, whether they are reachable, and where they are located. For -// more information about using NEGs, see Setting up external HTTP(S) -// Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting -// up external HTTP(S) Load Balancing with serverless NEGs. -type NetworkEndpointGroup struct { - // Annotations: Metadata defined as annotations on the network endpoint - // group. - Annotations map[string]string `json:"annotations,omitempty"` - - // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. - AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - - // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". - // Only one of cloudRun, appEngine or cloudFunction may be set. - CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - - // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. - CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` - +// NetworkEdgeSecurityService: Represents a Google Cloud Armor network +// edge security service resource. +type NetworkEdgeSecurityService struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a NetworkEdgeSecurityService. An + // up-to-date fingerprint must be provided in order to update the + // NetworkEdgeSecurityService, otherwise the request will fail with + // error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve a NetworkEdgeSecurityService. + Fingerprint string `json:"fingerprint,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#networkEndpointGroup for network endpoint group. + // Kind: [Output only] Type of the resource. Always + // compute#networkEdgeSecurityService for NetworkEdgeSecurityServices Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means @@ -25558,95 +25650,63 @@ type NetworkEndpointGroup struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. - Network string `json:"network,omitempty"` - - // NetworkEndpointType: Type of network endpoints in this network - // endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, - // NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, - // SERVERLESS, PRIVATE_SERVICE_CONNECT. - // - // Possible values: - // "GCE_VM_IP" - The network endpoint is represented by an IP address. - // "GCE_VM_IP_PORT" - The network endpoint is represented by IP - // address and port pair. - // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully - // qualified domain name and port. - // "INTERNET_IP_PORT" - The network endpoint is represented by an - // internet IP address and port. - // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by - // an IP address and port. The endpoint belongs to a VM or pod running - // in a customer's on-premises. - // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public - // Google APIs or services exposed by other GCP Project with a Service - // Attachment. The connection is set up by private service connect - // "SERVERLESS" - The network endpoint is handled by specified - // serverless infrastructure. - NetworkEndpointType string `json:"networkEndpointType,omitempty"` - - // PscTargetService: The target service url used to set up private - // service connection to a Google API. An example value is: - // "asia-northeast3-cloudkms.googleapis.com" - PscTargetService string `json:"pscTargetService,omitempty"` - - // Region: [Output Only] The URL of the region where the network - // endpoint group is located. + // Region: [Output Only] URL of the region where the resource resides. + // You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. Region string `json:"region,omitempty"` + // SecurityPolicy: The resource URL for the network edge security + // service associated with this network edge security service. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Size: [Output only] Number of network endpoints in the network - // endpoint group. - Size int64 `json:"size,omitempty"` - - // Subnetwork: Optional URL of the subnetwork to which all network - // endpoints in the NEG belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the network endpoint - // group is located. - Zone string `json:"zone,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroup +func (s *NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityService raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupAggregatedList struct { +type NetworkEdgeSecurityServiceAggregatedList struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroupsScopedList resources. - Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` + // Items: A list of NetworkEdgeSecurityServicesScopedList resources. + Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#networkEndpointGroupAggregatedList for aggregated lists of - // network endpoint groups. + // Kind: [Output Only] Type of resource. Always + // compute#networkEdgeSecurityServiceAggregatedList for lists of Network + // Edge Security Services. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -25664,13 +25724,13 @@ type NetworkEndpointGroupAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` + Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -25678,7 +25738,7 @@ type NetworkEndpointGroupAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -25687,15 +25747,547 @@ type NetworkEndpointGroupAggregatedList struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedList +func (s *NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupAggregatedListWarning: [Output Only] +// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] // Informational warning message. -type NetworkEndpointGroupAggregatedListWarning struct { +type NetworkEdgeSecurityServiceAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServiceAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServicesScopedList struct { + // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices + // contained in this scope. + NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` + + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEdgeSecurityServicesScopedListWarning: Informational warning +// which replaces the list of security policies when the list is empty. +type NetworkEdgeSecurityServicesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEdgeSecurityServicesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpoint: The network endpoint. +type NetworkEndpoint struct { + // Annotations: Metadata defined as annotations on the network endpoint. + Annotations map[string]string `json:"annotations,omitempty"` + + // Fqdn: Optional fully qualified domain name of network endpoint. This + // can only be specified when NetworkEndpointGroup.network_endpoint_type + // is NON_GCP_FQDN_PORT. + Fqdn string `json:"fqdn,omitempty"` + + // Instance: The name for a specific VM instance that the IP address + // belongs to. This is required for network endpoints of type + // GCE_VM_IP_PORT. The instance must be in the same zone of network + // endpoint group. The name must be 1-63 characters long, and comply + // with RFC1035. + Instance string `json:"instance,omitempty"` + + // IpAddress: Optional IPv4 address of network endpoint. The IP address + // must belong to a VM in Compute Engine (either the primary IP or as + // part of an aliased IP range). If the IP address is not specified, + // then the primary IP address for the VM instance in the network that + // the network endpoint group belongs to will be used. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: Optional port number of network endpoint. If not specified, the + // defaultPort for the network endpoint group will be used. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroup: Represents a collection of network endpoints. A +// network endpoint group (NEG) defines how a set of endpoints should be +// reached, whether they are reachable, and where they are located. For +// more information about using NEGs, see Setting up external HTTP(S) +// Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting +// up external HTTP(S) Load Balancing with serverless NEGs. +type NetworkEndpointGroup struct { + // Annotations: Metadata defined as annotations on the network endpoint + // group. + Annotations map[string]string `json:"annotations,omitempty"` + + // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` + + // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". + // Only one of cloudRun, appEngine or cloudFunction may be set. + CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` + + // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // DefaultPort: The default port used if the port number is not + // specified in the network endpoint. + DefaultPort int64 `json:"defaultPort,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#networkEndpointGroup for network endpoint group. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: The URL of the network to which all network endpoints in the + // NEG belong. Uses "default" project network if unspecified. + Network string `json:"network,omitempty"` + + // NetworkEndpointType: Type of network endpoints in this network + // endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, + // NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, + // SERVERLESS, PRIVATE_SERVICE_CONNECT. + // + // Possible values: + // "GCE_VM_IP" - The network endpoint is represented by an IP address. + // "GCE_VM_IP_PORT" - The network endpoint is represented by IP + // address and port pair. + // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully + // qualified domain name and port. + // "INTERNET_IP_PORT" - The network endpoint is represented by an + // internet IP address and port. + // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by + // an IP address and port. The endpoint belongs to a VM or pod running + // in a customer's on-premises. + // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public + // Google APIs or services exposed by other GCP Project with a Service + // Attachment. The connection is set up by private service connect + // "SERVERLESS" - The network endpoint is handled by specified + // serverless infrastructure. + NetworkEndpointType string `json:"networkEndpointType,omitempty"` + + // PscTargetService: The target service url used to set up private + // service connection to a Google API. An example value is: + // "asia-northeast3-cloudkms.googleapis.com" + PscTargetService string `json:"pscTargetService,omitempty"` + + // Region: [Output Only] The URL of the region where the network + // endpoint group is located. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Size: [Output only] Number of network endpoints in the network + // endpoint group. + Size int64 `json:"size,omitempty"` + + // Subnetwork: Optional URL of the subnetwork to which all network + // endpoints in the NEG belong. + Subnetwork string `json:"subnetwork,omitempty"` + + // Zone: [Output Only] The URL of the zone where the network endpoint + // group is located. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointGroupsScopedList resources. + Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupAggregatedList for aggregated lists of + // network endpoint groups. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -26666,8 +27258,9 @@ type NetworkInterface struct { Kind string `json:"kind,omitempty"` // Name: [Output Only] The name of the network interface, which is - // generated by the server. For network devices, these are eth0, eth1, - // etc. + // generated by the server. For a VM, the network interface uses the + // nicN naming format. Where N is a value between 0 and 7. The default + // interface value is nic0. Name string `json:"name,omitempty"` // Network: URL of the VPC network resource for this instance. When @@ -37944,6 +38537,19 @@ type Route struct { // is `1000`. The priority value must be from `0` to `65535`, inclusive. Priority int64 `json:"priority,omitempty"` + // RouteStatus: [Output only] The status of the route. + // + // Possible values: + // "ACTIVE" - This route is processed and active. + // "DROPPED" - The route is dropped due to the VPC exceeding the + // dynamic route limit. For dynamic route limit, please refer to the + // Learned route example + // "INACTIVE" - This route is processed but inactive due to failure + // from the backend. The backend may have rejected the route + // "PENDING" - This route is being processed internally. The status + // will change once processed. + RouteStatus string `json:"routeStatus,omitempty"` + // RouteType: [Output Only] The type of this route, which can be one of // the following values: - 'TRANSIT' for a transit route that this // router learned from another Cloud Router and will readvertise to one @@ -40448,280 +41054,18 @@ func (s *Screenshot) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { - PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "PreconfiguredExpressionSets") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "PreconfiguredExpressionSets") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesWafConfig struct { - WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WafRules") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "WafRules") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesWafConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicy: Represents a Google Cloud Armor security policy -// resource. Only external backend services that use load balancers can -// reference a security policy. For more information, see Google Cloud -// Armor security policy overview. -type SecurityPolicy struct { - AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` - - AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Specifies a fingerprint for this resource, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata, otherwise the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make get() request to - // the security policy. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output only] Type of the resource. Always - // compute#securityPolicyfor security policies - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` - - // Rules: A list of rules that belong to this policy. There must always - // be a default rule (rule with priority 2147483647 and match "*"). If - // no rules are provided when creating a security policy, a default rule - // with action "allow" will be added. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Type: The type indicates the intended use of the security policy. - - // CLOUD_ARMOR: Cloud Armor backend security policies can be configured - // to filter incoming HTTP requests targeting backend services. They - // filter requests before they hit the origin servers. - - // CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be - // configured to filter incoming HTTP requests targeting backend - // services (including Cloud CDN-enabled) as well as backend buckets - // (Cloud Storage). They filter requests before the request is served - // from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor - // internal service policies can be configured to filter HTTP requests - // targeting services managed by Traffic Director in a service mesh. - // They filter requests before the request is served from the - // application. This field can be set only at resource creation time. - // - // Possible values: - // "CLOUD_ARMOR" - // "CLOUD_ARMOR_EDGE" - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AdaptiveProtectionConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdaptiveProtectionConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfig: Configuration options for -// Cloud Armor Adaptive Protection (CAAP). -type SecurityPolicyAdaptiveProtectionConfig struct { - // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine - // Learning. - Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "Layer7DdosDefenseConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Layer7DdosDefenseConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: -// Configuration options for L7 DDoS detection. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { - // Enable: If set to true, enables CAAP for L7 DDoS detection. - Enable bool `json:"enable,omitempty"` - - // RuleVisibility: Rule visibility can be one of the following: STANDARD - // - opaque rules. (default) PREMIUM - transparent rules. - // - // Possible values: - // "PREMIUM" - // "STANDARD" - RuleVisibility string `json:"ruleVisibility,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 *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdvancedOptionsConfig struct { - // Possible values: - // "DISABLED" - // "STANDARD" - JsonParsing string `json:"jsonParsing,omitempty"` - - // Possible values: - // "NORMAL" - // "VERBOSE" - LogLevel string `json:"logLevel,omitempty"` - - // ForceSendFields is a list of field names (e.g. "JsonParsing") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "JsonParsing") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type SecurityPoliciesAggregatedList struct { + Etag string `json:"etag,omitempty"` -type SecurityPolicyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of SecurityPolicy resources. - Items []*SecurityPolicy `json:"items,omitempty"` + // Items: A list of SecurityPoliciesScopedList resources. + Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#securityPolicyList for listsof securityPolicies + // compute#securityPolicyAggregatedList for lists of Security Policies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -40732,14 +41076,20 @@ type SecurityPolicyList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *SecurityPolicyListWarning `json:"warning,omitempty"` + Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -40747,7 +41097,7 @@ type SecurityPolicyList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -40756,15 +41106,659 @@ type SecurityPolicyList struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyList +func (s *SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicyListWarning: [Output Only] Informational warning -// message. -type SecurityPolicyListWarning struct { +// SecurityPoliciesAggregatedListWarning: [Output Only] Informational +// warning message. +type SecurityPoliciesAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { + PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "PreconfiguredExpressionSets") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "PreconfiguredExpressionSets") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesScopedList struct { + // SecurityPolicies: A list of SecurityPolicies contained in this scope. + SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` + + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SecurityPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPoliciesScopedListWarning: Informational warning which +// replaces the list of security policies when the list is empty. +type SecurityPoliciesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesWafConfig struct { + WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WafRules") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "WafRules") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesWafConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicy: Represents a Google Cloud Armor security policy +// resource. Only external backend services that use load balancers can +// reference a security policy. For more information, see Google Cloud +// Armor security policy overview. +type SecurityPolicy struct { + AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` + + AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Specifies a fingerprint for this resource, which is + // essentially a hash of the metadata's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update metadata. You must + // always provide an up-to-date fingerprint hash in order to update or + // change metadata, otherwise the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make get() request to + // the security policy. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyfor security policies + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` + + // Region: [Output Only] URL of the region where the regional security + // policy resides. This field is not applicable to global security + // policies. + Region string `json:"region,omitempty"` + + // Rules: A list of rules that belong to this policy. There must always + // be a default rule (rule with priority 2147483647 and match "*"). If + // no rules are provided when creating a security policy, a default rule + // with action "allow" will be added. + Rules []*SecurityPolicyRule `json:"rules,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Type: The type indicates the intended use of the security policy. - + // CLOUD_ARMOR: Cloud Armor backend security policies can be configured + // to filter incoming HTTP requests targeting backend services. They + // filter requests before they hit the origin servers. - + // CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be + // configured to filter incoming HTTP requests targeting backend + // services (including Cloud CDN-enabled) as well as backend buckets + // (Cloud Storage). They filter requests before the request is served + // from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor + // internal service policies can be configured to filter HTTP requests + // targeting services managed by Traffic Director in a service mesh. + // They filter requests before the request is served from the + // application. This field can be set only at resource creation time. + // + // Possible values: + // "CLOUD_ARMOR" + // "CLOUD_ARMOR_EDGE" + // "CLOUD_ARMOR_NETWORK" + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AdaptiveProtectionConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdaptiveProtectionConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyAdaptiveProtectionConfig: Configuration options for +// Cloud Armor Adaptive Protection (CAAP). +type SecurityPolicyAdaptiveProtectionConfig struct { + // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine + // Learning. + Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "Layer7DdosDefenseConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Layer7DdosDefenseConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdaptiveProtectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: +// Configuration options for L7 DDoS detection. +type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { + // Enable: If set to true, enables CAAP for L7 DDoS detection. + Enable bool `json:"enable,omitempty"` + + // RuleVisibility: Rule visibility can be one of the following: STANDARD + // - opaque rules. (default) PREMIUM - transparent rules. + // + // Possible values: + // "PREMIUM" + // "STANDARD" + RuleVisibility string `json:"ruleVisibility,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 *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyAdvancedOptionsConfig struct { + // Possible values: + // "DISABLED" + // "STANDARD" + JsonParsing string `json:"jsonParsing,omitempty"` + + // Possible values: + // "NORMAL" + // "VERBOSE" + LogLevel string `json:"logLevel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JsonParsing") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JsonParsing") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdvancedOptionsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyDdosProtectionConfig struct { + // Possible values: + // "ADVANCED" + // "STANDARD" + DdosProtection string `json:"ddosProtection,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DdosProtection") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DdosProtection") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyDdosProtectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SecurityPolicy resources. + Items []*SecurityPolicy `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#securityPolicyList for listsof securityPolicies + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SecurityPolicyListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyListWarning: [Output Only] Informational warning +// message. +type SecurityPolicyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -44324,8 +45318,8 @@ type Subnetwork struct { // INTERNAL_HTTPS_LOAD_BALANCER. EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` - // ExternalIpv6Prefix: [Output Only] The range of external IPv6 - // addresses that are owned by this subnetwork. + // ExternalIpv6Prefix: [Output Only] The external IPv6 address range + // that is assigned to this subnetwork. ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -44345,10 +45339,8 @@ type Subnetwork struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: [Output Only] The range of internal IPv6 - // addresses that are owned by this subnetwork. Note this is for general - // VM to VM communication, not to be confused with the ipv6_cidr_range - // field. + // InternalIpv6Prefix: [Output Only] The internal IPv6 address range + // that is assigned to this subnetwork. InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` // IpCidrRange: The range of internal addresses that are owned by this @@ -44362,19 +45354,16 @@ type Subnetwork struct { // Ipv6AccessType: The access type of IPv6 address this subnet holds. // It's immutable and can only be specified during creation or the first - // time the subnet is updated into IPV4_IPV6 dual stack. If the - // ipv6_type is EXTERNAL then this subnet cannot enable direct path. + // time the subnet is updated into IPV4_IPV6 dual stack. // // Possible values: // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses - // that are accesible via the Internet, as well as the VPC network. + // that are accessible via the Internet, as well as the VPC network. // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses // that are only accessible over the VPC network. Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Ipv6CidrRange: [Output Only] The range of internal IPv6 addresses - // that are owned by this subnetwork. Note this will be for private - // google access only eventually. + // Ipv6CidrRange: [Output Only] This field is for internal use. Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#subnetwork @@ -44406,11 +45395,8 @@ type Subnetwork struct { // setPrivateIpGoogleAccess. PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for the - // VMs in this subnet. This is an expanded field of - // enablePrivateV6Access. If both fields are set, - // privateIpv6GoogleAccess will take priority. This field can be both - // set at resource creation time and updated using patch. + // PrivateIpv6GoogleAccess: This field is for internal use. This field + // can be both set at resource creation time and updated using patch. // // Possible values: // "DISABLE_GOOGLE_ACCESS" - Disable private IPv6 access to/from @@ -105261,9 +106247,9 @@ func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeLis } } -// method id "compute.networkEndpointGroups.aggregatedList": +// method id "compute.networkEdgeSecurityServices.aggregatedList": -type NetworkEndpointGroupsAggregatedListCall struct { +type NetworkEdgeSecurityServicesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -105272,12 +106258,12 @@ type NetworkEndpointGroupsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of network endpoint groups and -// sorts them by zone. +// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService +// resources available to the specified project. // -// - project: Project ID for this request. -func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { - c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { + c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -105304,7 +106290,7 @@ func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEn // can include `AND` and `OR` expressions explicitly. For example: ``` // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") // AND (scheduling.automaticRestart = true) ``` -func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -105317,7 +106303,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *Network // response. For resource types which predate this field, if this flag // is omitted or false, only scopes of the scope types where the // resource type is expected to be found will be included. -func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -105328,7 +106314,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllSco // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -105342,7 +106328,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) * // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -105350,7 +106336,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *Netwo // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -105359,7 +106345,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *N // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -105367,7 +106353,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPar // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -105377,7 +106363,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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 *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -105385,21 +106371,21 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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 *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { 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 *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) 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_ { @@ -105412,7 +106398,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) 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, "projects/{project}/aggregated/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -105425,15 +106411,16 @@ func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.aggregatedList" call. -// Exactly one of *NetworkEndpointGroupAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. +// Exactly one of *NetworkEdgeSecurityServiceAggregatedList or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *NetworkEdgeSecurityServiceAggregatedList.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -105452,7 +106439,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &NetworkEndpointGroupAggregatedList{ + ret := &NetworkEdgeSecurityServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -105464,10 +106451,10 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", - // "flatPath": "projects/{project}/aggregated/networkEndpointGroups", + // "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to the specified project.", + // "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", // "httpMethod": "GET", - // "id": "compute.networkEndpointGroups.aggregatedList", + // "id": "compute.networkEdgeSecurityServices.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -105501,7 +106488,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -105513,9 +106500,9 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/networkEndpointGroups", + // "path": "projects/{project}/aggregated/networkEdgeSecurityServices", // "response": { - // "$ref": "NetworkEndpointGroupAggregatedList" + // "$ref": "NetworkEdgeSecurityServiceAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -105529,7 +106516,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // 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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -105547,223 +106534,29 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f f } } -// method id "compute.networkEndpointGroups.attachNetworkEndpoints": - -type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the -// specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where -// you are attaching network endpoints to. It should comply with -// RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is -// located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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.networkendpointgroupsattachendpointsrequest) - 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, 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": "Attach a list of network endpoints to the specified network endpoint group.", - // "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - // "httpMethod": "POST", - // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", - // "parameterOrder": [ - // "project", - // "zone", - // "networkEndpointGroup" - // ], - // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - // "request": { - // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networkEndpointGroups.delete": +// method id "compute.networkEdgeSecurityServices.delete": -type NetworkEndpointGroupsDeleteCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesDeleteCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network endpoint group. The network -// endpoints in the NEG and the VM instances they belong to are not -// terminated when the NEG is deleted. Note that the NEG cannot be -// deleted if there are backend services referencing it. +// Delete: Deletes the specified service. // -// - networkEndpointGroup: The name of the network endpoint group to -// delete. It should comply with RFC1035. +// - networkEdgeSecurityService: Name of the network edge security +// service to delete. // - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is -// located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { - c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { + c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService return c } @@ -105778,7 +106571,7 @@ func (r *NetworkEndpointGroupsService) Delete(project string, zone string, netwo // 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -105786,7 +106579,7 @@ func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -105794,21 +106587,21 @@ func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkE // 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 *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { 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 *NetworkEndpointGroupsDeleteCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesDeleteCall) 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_ { @@ -105818,7 +106611,7 @@ func (c *NetworkEndpointGroupsDeleteCall) 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -105826,21 +106619,1256 @@ func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.delete" call. +// Do executes the "compute.networkEdgeSecurityServices.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 *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEdgeSecurityServicesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 the specified service.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "DELETE", + // "id": "compute.networkEdgeSecurityServices.delete", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.get": + +type NetworkEdgeSecurityServicesGetCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a specified NetworkEdgeSecurityService. +// +// - networkEdgeSecurityService: Name of the network edge security +// service to get. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { + c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService + 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 *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { + 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 *NetworkEdgeSecurityServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesGetCall) 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + 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{ + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.get" call. +// Exactly one of *NetworkEdgeSecurityService or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEdgeSecurityService.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEdgeSecurityService{ + 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 specified NetworkEdgeSecurityService.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "GET", + // "id": "compute.networkEdgeSecurityServices.get", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to get.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "response": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.insert": + +type NetworkEdgeSecurityServicesInsertCall struct { + s *Service + project string + region string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new service in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { + c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkedgesecurityservice = networkedgesecurityservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { + 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 *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesInsertCall) 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.networkedgesecurityservice) + 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.insert" 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 *NetworkEdgeSecurityServicesInsertCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 service in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + // "httpMethod": "POST", + // "id": "compute.networkEdgeSecurityServices.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "validateOnly": { + // "description": "If true, the request will not be committed.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", + // "request": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEdgeSecurityServices.patch": + +type NetworkEdgeSecurityServicesPatchCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the +// request. +// +// - networkEdgeSecurityService: Name of the network edge security +// service to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { + c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService + c.networkedgesecurityservice = networkedgesecurityservice + return c +} + +// Paths sets the optional parameter "paths": +func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates fields +// to be updated as part of this request. +func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { + 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 *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEdgeSecurityServicesPatchCall) 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.networkedgesecurityservice) + 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEdgeSecurityServices.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 *NetworkEdgeSecurityServicesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Patches the specified policy with the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "httpMethod": "PATCH", + // "id": "compute.networkEdgeSecurityServices.patch", + // "parameterOrder": [ + // "project", + // "region", + // "networkEdgeSecurityService" + // ], + // "parameters": { + // "networkEdgeSecurityService": { + // "description": "Name of the network edge security service to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "paths": { + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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": "Indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", + // "request": { + // "$ref": "NetworkEdgeSecurityService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.aggregatedList": + +type NetworkEndpointGroupsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of network endpoint groups and +// sorts them by zone. +// +// - project: Project ID for this request. +func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { + c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { + 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 *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAggregatedListCall) 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, "projects/{project}/aggregated/networkEndpointGroups") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.aggregatedList" call. +// Exactly one of *NetworkEndpointGroupAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *NetworkEndpointGroupAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NetworkEndpointGroupAggregatedList{ + 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": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "flatPath": "projects/{project}/aggregated/networkEndpointGroups", + // "httpMethod": "GET", + // "id": "compute.networkEndpointGroups.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/networkEndpointGroups", + // "response": { + // "$ref": "NetworkEndpointGroupAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) 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 "compute.networkEndpointGroups.attachNetworkEndpoints": + +type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AttachNetworkEndpoints: Attach a list of network endpoints to the +// specified network endpoint group. +// +// - networkEndpointGroup: The name of the network endpoint group where +// you are attaching network endpoints to. It should comply with +// RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is +// located. It should comply with RFC1035. +func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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.networkendpointgroupsattachendpointsrequest) + 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Attach a list of network endpoints to the specified network endpoint group.", + // "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "httpMethod": "POST", + // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", + // "parameterOrder": [ + // "project", + // "zone", + // "networkEndpointGroup" + // ], + // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the network endpoint group is located. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "request": { + // "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networkEndpointGroups.delete": + +type NetworkEndpointGroupsDeleteCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified network endpoint group. The network +// endpoints in the NEG and the VM instances they belong to are not +// terminated when the NEG is deleted. Note that the NEG cannot be +// deleted if there are backend services referencing it. +// +// - networkEndpointGroup: The name of the network endpoint group to +// delete. It should comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is +// located. It should comply with RFC1035. +func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { + c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { + 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 *NetworkEndpointGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsDeleteCall) 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, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + 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{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.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 *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -142456,6 +144484,1014 @@ func (c *RegionOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } +// method id "compute.regionSecurityPolicies.delete": + +type RegionSecurityPoliciesDeleteCall struct { + s *Service + project string + region string + securityPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified policy. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to delete. +func (r *RegionSecurityPoliciesService) Delete(project string, region string, securityPolicy string) *RegionSecurityPoliciesDeleteCall { + c := &RegionSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesDeleteCall) RequestId(requestId string) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Context(ctx context.Context) *RegionSecurityPoliciesDeleteCall { + 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 *RegionSecurityPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesDeleteCall) 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + 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{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.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 *RegionSecurityPoliciesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 the specified policy.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "DELETE", + // "id": "compute.regionSecurityPolicies.delete", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.get": + +type RegionSecurityPoliciesGetCall struct { + s *Service + project string + region string + securityPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: List all of the ordered rules present in a single specified +// policy. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to get. +func (r *RegionSecurityPoliciesService) Get(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetCall { + c := &RegionSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + 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 *RegionSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) Context(ctx context.Context) *RegionSecurityPoliciesGetCall { + 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 *RegionSecurityPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesGetCall) 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + 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{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.get" call. +// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecurityPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPolicy{ + 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 all of the ordered rules present in a single specified policy.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "GET", + // "id": "compute.regionSecurityPolicies.get", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to get.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "response": { + // "$ref": "SecurityPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.insert": + +type RegionSecurityPoliciesInsertCall struct { + s *Service + project string + region string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new policy in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionSecurityPoliciesService) Insert(project string, region string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesInsertCall { + c := &RegionSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesInsertCall) RequestId(requestId string) *RegionSecurityPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *RegionSecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Context(ctx context.Context) *RegionSecurityPoliciesInsertCall { + 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 *RegionSecurityPoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesInsertCall) 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.securitypolicy) + 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, "projects/{project}/regions/{region}/securityPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.insert" 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 *RegionSecurityPoliciesInsertCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 policy in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies", + // "httpMethod": "POST", + // "id": "compute.regionSecurityPolicies.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "validateOnly": { + // "description": "If true, the request will not be committed.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSecurityPolicies.list": + +type RegionSecurityPoliciesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all the policies that have been configured for the +// specified project and region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionSecurityPoliciesService) List(project string, region string) *RegionSecurityPoliciesListCall { + c := &RegionSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *RegionSecurityPoliciesListCall) Filter(filter string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionSecurityPoliciesListCall) MaxResults(maxResults int64) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *RegionSecurityPoliciesListCall) OrderBy(orderBy string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionSecurityPoliciesListCall) PageToken(pageToken string) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSecurityPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSecurityPoliciesListCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) Context(ctx context.Context) *RegionSecurityPoliciesListCall { + 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 *RegionSecurityPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesListCall) 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, "projects/{project}/regions/{region}/securityPolicies") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.list" call. +// Exactly one of *SecurityPolicyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SecurityPolicyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPolicyList{ + 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 all the policies that have been configured for the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies", + // "httpMethod": "GET", + // "id": "compute.regionSecurityPolicies.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies", + // "response": { + // "$ref": "SecurityPolicyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *RegionSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) 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 "compute.regionSecurityPolicies.patch": + +type RegionSecurityPoliciesPatchCall struct { + s *Service + project string + region string + securityPolicy string + securitypolicy *SecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the +// request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - securityPolicy: Name of the security policy to update. +func (r *RegionSecurityPoliciesService) Patch(project string, region string, securityPolicy string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesPatchCall { + c := &RegionSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.securityPolicy = securityPolicy + c.securitypolicy = securitypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionSecurityPoliciesPatchCall) RequestId(requestId string) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchCall { + 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 *RegionSecurityPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesPatchCall) 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.securitypolicy) + 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, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "securityPolicy": c.securityPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.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 *RegionSecurityPoliciesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Patches the specified policy with the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "httpMethod": "PATCH", + // "id": "compute.regionSecurityPolicies.patch", + // "parameterOrder": [ + // "project", + // "region", + // "securityPolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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" + // }, + // "securityPolicy": { + // "description": "Name of the security policy to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", + // "request": { + // "$ref": "SecurityPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionSslCertificates.delete": type RegionSslCertificatesDeleteCall struct { @@ -154046,6 +157082,291 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } +// method id "compute.securityPolicies.aggregatedList": + +type SecurityPoliciesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all SecurityPolicy resources, +// regional and global, available to the specified project. +// +// - project: Name of the project scoping this request. +func (r *SecurityPoliciesService) AggregatedList(project string) *SecurityPoliciesAggregatedListCall { + c := &SecurityPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, an operator, and the value that you want to use for +// filtering. The value must be a string, a number, or a boolean. The +// operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For +// example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:` operator can be used with string fields to +// match substrings. For non-string fields it is equivalent to the `=` +// operator. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label +// use: ``` labels.owner:* ``` You can also filter nested fields. For +// example, you could specify `scheduling.automaticRestart = false` to +// include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` +func (c *SecurityPoliciesAggregatedListCall) Filter(filter string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *SecurityPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *SecurityPoliciesAggregatedListCall) MaxResults(maxResults int64) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *SecurityPoliciesAggregatedListCall) OrderBy(orderBy string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *SecurityPoliciesAggregatedListCall) PageToken(pageToken string) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *SecurityPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SecurityPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) Context(ctx context.Context) *SecurityPoliciesAggregatedListCall { + 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 *SecurityPoliciesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SecurityPoliciesAggregatedListCall) 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, "projects/{project}/aggregated/securityPolicies") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.securityPolicies.aggregatedList" call. +// Exactly one of *SecurityPoliciesAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SecurityPoliciesAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SecurityPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityPoliciesAggregatedList{ + 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": "Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/securityPolicies", + // "httpMethod": "GET", + // "id": "compute.securityPolicies.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ```", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/securityPolicies", + // "response": { + // "$ref": "SecurityPoliciesAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.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 *SecurityPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SecurityPoliciesAggregatedList) 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 "compute.securityPolicies.delete": type SecurityPoliciesDeleteCall struct { diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 3edc67306d5..f92030af5f8 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1275,7 +1275,7 @@ } } }, - "revision": "20220107", + "revision": "20220319", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -3529,7 +3529,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 170c32f08e0..7c3d899dae7 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -4018,8 +4018,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 5467072ea02..c160c499230 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2459,7 +2459,7 @@ } } }, - "revision": "20220215", + "revision": "20220312", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4190,7 +4190,7 @@ "type": "object" }, "NodeConfig": { - "description": "Parameters that describe the nodes in a cluster.", + "description": "Parameters that describe the nodes in a cluster. *Note: *GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.", "id": "NodeConfig", "properties": { "accelerators": { diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 7277edb0d8b..ecee43dacf4 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -3336,7 +3336,9 @@ func (s *NetworkTags) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeConfig: Parameters that describe the nodes in a cluster. +// NodeConfig: Parameters that describe the nodes in a cluster. *Note: +// *GKE Autopilot clusters do not recognize parameters in `NodeConfig`. +// Use AutoprovisioningNodePoolDefaults instead. type NodeConfig struct { // Accelerators: A list of hardware accelerators to be attached to each // node. See https://cloud.google.com/compute/docs/gpus for more diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 8bdd1849f58..bff876ee66e 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20220215", + "revision": "20220308", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3541,7 +3541,7 @@ "type": "object" }, "Date": { - "description": "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 (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "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", "id": "Date", "properties": { "day": { @@ -4337,7 +4337,7 @@ "enumDescriptions": [ "Default value. This shouldn't be used.", "system components", - "workloads" + "Deprecated: Use Google Cloud Managed Service for Prometheus." ], "type": "string" }, @@ -4475,7 +4475,7 @@ "type": "object" }, "NodeConfig": { - "description": "Parameters that describe the nodes in a cluster.", + "description": "Parameters that describe the nodes in a cluster. *Note:* GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.", "id": "NodeConfig", "properties": { "accelerators": { @@ -4493,6 +4493,10 @@ "description": " The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption", "type": "string" }, + "confidentialNodes": { + "$ref": "ConfidentialNodes", + "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." + }, "diskSizeGb": { "description": "Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.", "format": "int32", @@ -6103,6 +6107,10 @@ "description": "Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", "type": "string" }, + "confidentialNodes": { + "$ref": "ConfidentialNodes", + "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." + }, "gcfsConfig": { "$ref": "GcfsConfig", "description": "GCFS config." diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index c7ec7d45654..055a4bf2a96 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1943,11 +1943,12 @@ func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { // 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 (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// 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 Date 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 @@ -3544,7 +3545,8 @@ type MonitoringComponentConfig struct { // Possible values: // "COMPONENT_UNSPECIFIED" - Default value. This shouldn't be used. // "SYSTEM_COMPONENTS" - system components - // "WORKLOADS" - workloads + // "WORKLOADS" - Deprecated: Use Google Cloud Managed Service for + // Prometheus. EnableComponents []string `json:"enableComponents,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableComponents") to @@ -3791,7 +3793,9 @@ func (s *NetworkTags) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeConfig: Parameters that describe the nodes in a cluster. +// NodeConfig: Parameters that describe the nodes in a cluster. *Note:* +// GKE Autopilot clusters do not recognize parameters in `NodeConfig`. +// Use AutoprovisioningNodePoolDefaults instead. type NodeConfig struct { // Accelerators: A list of hardware accelerators to be attached to each // node. See https://cloud.google.com/compute/docs/gpus for more @@ -3810,6 +3814,10 @@ type NodeConfig struct { // https://cloud.google.com/compute/docs/disks/customer-managed-encryption BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` + // ConfidentialNodes: Confidential nodes config. All the nodes in the + // node pool will be Confidential VM once enabled. + ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` + // DiskSizeGb: Size of the disk attached to each node, specified in GB. // The smallest allowed disk size is 10GB. If unspecified, the default // disk size is 100GB. @@ -6530,6 +6538,10 @@ type UpdateNodePoolRequest struct { // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` + // ConfidentialNodes: Confidential nodes config. All the nodes in the + // node pool will be Confidential VM once enabled. + ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` + // GcfsConfig: GCFS config. GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index d1b21fc58e7..88199457b68 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20220202", + "revision": "20220318", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -1505,6 +1505,10 @@ "description": "Describes the CIS benchmark version that is applicable to a given OS and os version.", "id": "ComplianceVersion", "properties": { + "benchmarkDocument": { + "description": "The name of the document that defines this benchmark, e.g. \"CIS Container-Optimized OS\".", + "type": "string" + }, "cpeUri": { "description": "The CPE URI (https://cpe.mitre.org/specification/) this benchmark is applicable to.", "type": "string" @@ -2788,7 +2792,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index 9fc4517fac9..767ef49f5e1 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -1229,6 +1229,10 @@ func (s *ComplianceOccurrence) MarshalJSON() ([]byte, error) { // ComplianceVersion: Describes the CIS benchmark version that is // applicable to a given OS and os version. type ComplianceVersion struct { + // BenchmarkDocument: The name of the document that defines this + // benchmark, e.g. "CIS Container-Optimized OS". + BenchmarkDocument string `json:"benchmarkDocument,omitempty"` + // CpeUri: The CPE URI (https://cpe.mitre.org/specification/) this // benchmark is applicable to. CpeUri string `json:"cpeUri,omitempty"` @@ -1237,20 +1241,21 @@ type ComplianceVersion struct { // the OS-specific CIS document the benchmark is defined in. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpeUri") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "BenchmarkDocument") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpeUri") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "BenchmarkDocument") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -3082,8 +3087,7 @@ func (s *Distribution) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index ccf1a81b899..ffc38014c4c 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -1229,7 +1229,7 @@ } } }, - "revision": "20220202", + "revision": "20220318", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "Artifact": { @@ -3170,7 +3170,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/containeranalysis/v1alpha1/containeranalysis-gen.go b/containeranalysis/v1alpha1/containeranalysis-gen.go index aafbace4ded..7d738ab7bae 100644 --- a/containeranalysis/v1alpha1/containeranalysis-gen.go +++ b/containeranalysis/v1alpha1/containeranalysis-gen.go @@ -3098,8 +3098,7 @@ func (s *DocumentOccurrence) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index ced6d82ff53..9dc31eaa7ff 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -853,7 +853,7 @@ } } }, - "revision": "20220202", + "revision": "20220318", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -2701,7 +2701,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index ef700d32653..bfbcf7a6d05 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -2900,8 +2900,7 @@ func (s *DocumentOccurrence) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index c55c1bb0099..18b6ef6fbac 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -1962,7 +1962,7 @@ ] }, "requestreview": { - "description": "Requests a review for Free Listings program in the provided region. Important: This method is only whitelisted for selected merchants.", + "description": "Requests a review of free listings in a specific region Important: This method is only whitelisted for selected merchants.", "flatPath": "{merchantId}/freelistingsprogram/requestreview", "httpMethod": "POST", "id": "content.freelistingsprogram.requestreview", @@ -5788,7 +5788,7 @@ ] }, "requestreview": { - "description": "Requests a review for Shopping Ads program in the provided country.", + "description": "Requests a review of Shopping ads in a specific region.", "flatPath": "{merchantId}/shoppingadsprogram/requestreview", "httpMethod": "POST", "id": "content.shoppingadsprogram.requestreview", @@ -5815,7 +5815,7 @@ } } }, - "revision": "20220303", + "revision": "20220325", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -8132,7 +8132,7 @@ "id": "FreeListingsProgramStatus", "properties": { "globalState": { - "description": "State of the program, It is set to enabled if there are offers for at least one region.", + "description": "State of the program. `ENABLED` if there are offers for at least one region.", "enum": [ "PROGRAM_STATE_UNSPECIFIED", "NOT_ENABLED", @@ -8140,9 +8140,9 @@ "ENABLED" ], "enumDescriptions": [ - "State is not known.", + "State is unknown.", "Program is not enabled for any country.", - "Offers are not uploaded targeting even a single country for this program.", + "No products have been uploaded for any region. Upload products to Merchant Center.", "Program is enabled and offers are uploaded for at least one country." ], "type": "string" @@ -8162,7 +8162,7 @@ "id": "FreeListingsProgramStatusRegionStatus", "properties": { "disapprovalDate": { - "description": "Date by which `eligibility_status` will go from `WARNING` to `DISAPPROVED`. It will be present when `eligibility_status` is `WARNING`. Date will be provided in ISO 8601 format: YYYY-MM-DD", + "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", "type": "string" }, "eligibilityStatus": { @@ -8181,14 +8181,14 @@ "If the account has no issues and review is completed successfully.", "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", - "Account is under review. Deprecated: This state is not created.", + "Account is under review.", "Account is waiting for review to start.", "Program is currently onboarding. Upload valid offers to complete onboarding." ], "type": "string" }, "onboardingIssues": { - "description": "These issues must be fixed to become eligible for the review.", + "description": "Issues that must be fixed to be eligible for review.", "items": { "type": "string" }, @@ -8202,14 +8202,14 @@ "type": "array" }, "reviewEligibilityStatus": { - "description": "If a program in a given country is eligible for review. It will be present only if eligibility status is `DISAPPROVED`.", + "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", "enum": [ "REVIEW_ELIGIBILITY_UNSPECIFIED", "ELIGIBLE", "INELIGIBLE" ], "enumDescriptions": [ - "Review eligibility reason state is unknown.", + "Review eligibility state is unknown.", "Account is eligible for review for a specified region code.", "Account is not eligible for review for a specified region code." ], @@ -8223,7 +8223,10 @@ "NOT_ENOUGH_OFFERS", "IN_COOLDOWN_PERIOD", "ALREADY_UNDER_REVIEW", - "NO_REVIEW_REQUIRED" + "NO_REVIEW_REQUIRED", + "WILL_BE_REVIEWED_AUTOMATICALLY", + "IS_RETIRED", + "ALREADY_REVIEWED" ], "enumDescriptions": [ "Requesting a review from Google is not possible.", @@ -8231,20 +8234,23 @@ "Not enough offers uploaded for this country.", "Cooldown period applies. Wait until cooldown period ends.", "Account is already under review.", - "No issues available to review." + "No issues available to review.", + "Account will be automatically reviewed at the end of the grace period.", + "Account is retired. Should not appear in MC.", + "Account was already reviewd." ], "type": "string" }, "reviewIneligibilityReasonDescription": { - "description": "Reason if a program in a given country is not eligible for review. Populated only if `review_eligibility_status` is `INELIGIBLE`.", + "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", "type": "string" }, "reviewIneligibilityReasonDetails": { "$ref": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", - "description": "This contains additional information specific to review ineligibility reasons. If review is ineligible because of `IN_COOLDOWN_PERIOD`, it will contain timestamp for cooldown period." + "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." }, "reviewIssues": { - "description": "These issues will be evaluated in review process. Fix all the issues before requesting the review.", + "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", "items": { "type": "string" }, @@ -12415,6 +12421,10 @@ "description": "Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in `productstatuses` as `googleExpirationDate` and might be earlier if `expirationDate` is too far in the future.", "type": "string" }, + "externalSellerId": { + "description": "Required for multi-seller accounts. Use this attribute if you're a marketplace uploading products for various sellers to your multi-seller account.", + "type": "string" + }, "gender": { "description": "Target gender of the item.", "type": "string" @@ -13185,6 +13195,7 @@ "type": "array" }, "includeAttributes": { + "description": "Deprecated: Setting this field has no effect and attributes are never included.", "type": "boolean" }, "merchantId": { @@ -13283,7 +13294,7 @@ "type": "array" }, "contentLanguage": { - "description": "Required. The content language used as part of the unique identifier.", + "description": "Required. The content language used as part of the unique identifier. Currently only en value is supported.", "type": "string" }, "couponValueType": { @@ -13508,7 +13519,7 @@ "type": "array" }, "targetCountry": { - "description": "Required. The target country used as part of the unique identifier.", + "description": "Required. The target country used as part of the unique identifier. Currently only US and CA are supported.", "type": "string" } }, @@ -15542,7 +15553,7 @@ "id": "ShoppingAdsProgramStatus", "properties": { "globalState": { - "description": "State of the program, It is set to enabled if there are offers for at least one region.", + "description": "State of the program. `ENABLED` if there are offers for at least one region.", "enum": [ "PROGRAM_STATE_UNSPECIFIED", "NOT_ENABLED", @@ -15550,9 +15561,9 @@ "ENABLED" ], "enumDescriptions": [ - "State is not known.", + "State is unknown.", "Program is not enabled for any country.", - "Offers are not uploaded targeting even a single country for this program.", + "No products have been uploaded for any region. Upload products to Merchant Center.", "Program is enabled and offers are uploaded for at least one country." ], "type": "string" @@ -15572,7 +15583,7 @@ "id": "ShoppingAdsProgramStatusRegionStatus", "properties": { "disapprovalDate": { - "description": "Date by which `eligibility_status` will go from `WARNING` to `DISAPPROVED`. It will be present when `eligibility_status` is `WARNING`. Date will be provided in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: YYYY-MM-DD", + "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", "type": "string" }, "eligibilityStatus": { @@ -15591,14 +15602,14 @@ "If the account has no issues and review is completed successfully.", "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", - "Account is under review. Deprecated: This state is not created.", + "Account is under review.", "Account is waiting for review to start.", "Program is currently onboarding. Upload valid offers to complete onboarding." ], "type": "string" }, "onboardingIssues": { - "description": "These issues must be fixed to become eligible for the review.", + "description": "Issues that must be fixed to be eligible for review.", "items": { "type": "string" }, @@ -15612,14 +15623,14 @@ "type": "array" }, "reviewEligibilityStatus": { - "description": "If a program in a given country is eligible for review. It will be present only if eligibility status is `DISAPPROVED`.", + "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", "enum": [ "REVIEW_ELIGIBILITY_UNSPECIFIED", "ELIGIBLE", "INELIGIBLE" ], "enumDescriptions": [ - "Review eligibility reason state is unknown.", + "Review eligibility state is unknown.", "Account is eligible for review for a specified region code.", "Account is not eligible for review for a specified region code." ], @@ -15633,7 +15644,10 @@ "NOT_ENOUGH_OFFERS", "IN_COOLDOWN_PERIOD", "ALREADY_UNDER_REVIEW", - "NO_REVIEW_REQUIRED" + "NO_REVIEW_REQUIRED", + "WILL_BE_REVIEWED_AUTOMATICALLY", + "IS_RETIRED", + "ALREADY_REVIEWED" ], "enumDescriptions": [ "Requesting a review from Google is not possible.", @@ -15641,20 +15655,23 @@ "Not enough offers uploaded for this country.", "Cooldown period applies. Wait until cooldown period ends.", "Account is already under review.", - "No issues available to review." + "No issues available to review.", + "Account will be automatically reviewed at the end of the grace period.", + "Account is retired. Should not appear in MC.", + "Account was already reviewd." ], "type": "string" }, "reviewIneligibilityReasonDescription": { - "description": "Reason if a program in a given country is not eligible for review. Populated only if `review_eligibility_status` is `INELIGIBLE`.", + "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", "type": "string" }, "reviewIneligibilityReasonDetails": { "$ref": "ShoppingAdsProgramStatusReviewIneligibilityReasonDetails", - "description": "This contains additional information specific to review ineligibility reasons. If review is ineligible because of `IN_COOLDOWN_PERIOD`, it will contain timestamp for cooldown period." + "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." }, "reviewIssues": { - "description": "These issues will be evaluated in review process. Fix all the issues before requesting the review.", + "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", "items": { "type": "string" }, diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index e77507da6e8..5b6ad50e476 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -4475,14 +4475,14 @@ func (s *Errors) MarshalJSON() ([]byte, error) { // FreeListingsProgramStatus: Response message for // GetFreeListingsProgramStatus. type FreeListingsProgramStatus struct { - // GlobalState: State of the program, It is set to enabled if there are - // offers for at least one region. + // GlobalState: State of the program. `ENABLED` if there are offers for + // at least one region. // // Possible values: - // "PROGRAM_STATE_UNSPECIFIED" - State is not known. + // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. // "NOT_ENABLED" - Program is not enabled for any country. - // "NO_OFFERS_UPLOADED" - Offers are not uploaded targeting even a - // single country for this program. + // "NO_OFFERS_UPLOADED" - No products have been uploaded for any + // region. Upload products to Merchant Center. // "ENABLED" - Program is enabled and offers are uploaded for at least // one country. GlobalState string `json:"globalState,omitempty"` @@ -4521,10 +4521,10 @@ func (s *FreeListingsProgramStatus) MarshalJSON() ([]byte, error) { // FreeListingsProgramStatusRegionStatus: Status of program and region. type FreeListingsProgramStatusRegionStatus struct { - // DisapprovalDate: Date by which `eligibility_status` will go from - // `WARNING` to `DISAPPROVED`. It will be present when - // `eligibility_status` is `WARNING`. Date will be provided in ISO 8601 - // format: YYYY-MM-DD + // DisapprovalDate: Date by which eligibilityStatus will go from + // `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus + // is WARNING. In ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) + // format: `YYYY-MM-DD`. DisapprovalDate string `json:"disapprovalDate,omitempty"` // EligibilityStatus: Eligibility status of the standard free listing @@ -4541,15 +4541,14 @@ type FreeListingsProgramStatusRegionStatus struct { // ence/rest/v2.1/accountstatuses) API. // "WARNING" - If account has issues but offers are servable. Some of // the issue can make account DISAPPROVED after a certain deadline. - // "UNDER_REVIEW" - Account is under review. Deprecated: This state is - // not created. + // "UNDER_REVIEW" - Account is under review. // "PENDING_REVIEW" - Account is waiting for review to start. // "ONBOARDING" - Program is currently onboarding. Upload valid offers // to complete onboarding. EligibilityStatus string `json:"eligibilityStatus,omitempty"` - // OnboardingIssues: These issues must be fixed to become eligible for - // the review. + // OnboardingIssues: Issues that must be fixed to be eligible for + // review. OnboardingIssues []string `json:"onboardingIssues,omitempty"` // RegionCodes: The two-letter ISO 3166-1 alpha-2 @@ -4557,13 +4556,13 @@ type FreeListingsProgramStatusRegionStatus struct { // regions with the same `eligibilityStatus` and `reviewEligibility`. RegionCodes []string `json:"regionCodes,omitempty"` - // ReviewEligibilityStatus: If a program in a given country is eligible - // for review. It will be present only if eligibility status is + // ReviewEligibilityStatus: If a program is eligible for review in a + // specific region. Only visible if `eligibilityStatus` is // `DISAPPROVED`. // // Possible values: - // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility reason state - // is unknown. + // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is + // unknown. // "ELIGIBLE" - Account is eligible for review for a specified region // code. // "INELIGIBLE" - Account is not eligible for review for a specified @@ -4582,21 +4581,25 @@ type FreeListingsProgramStatusRegionStatus struct { // period ends. // "ALREADY_UNDER_REVIEW" - Account is already under review. // "NO_REVIEW_REQUIRED" - No issues available to review. + // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically + // reviewed at the end of the grace period. + // "IS_RETIRED" - Account is retired. Should not appear in MC. + // "ALREADY_REVIEWED" - Account was already reviewd. ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` - // ReviewIneligibilityReasonDescription: Reason if a program in a given - // country is not eligible for review. Populated only if - // `review_eligibility_status` is `INELIGIBLE`. + // ReviewIneligibilityReasonDescription: Reason a program in a specific + // region isn’t eligible for review. Only visible if + // `reviewEligibilityStatus` is `INELIGIBLE`. ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` - // ReviewIneligibilityReasonDetails: This contains additional - // information specific to review ineligibility reasons. If review is - // ineligible because of `IN_COOLDOWN_PERIOD`, it will contain timestamp - // for cooldown period. + // ReviewIneligibilityReasonDetails: Additional information for + // ineligibility. If `reviewIneligibilityReason` is + // `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period + // is provided. ReviewIneligibilityReasonDetails *FreeListingsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` - // ReviewIssues: These issues will be evaluated in review process. Fix - // all the issues before requesting the review. + // ReviewIssues: Issues evaluated in the review process. Fix all issues + // before requesting a review. ReviewIssues []string `json:"reviewIssues,omitempty"` // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to @@ -11903,6 +11906,11 @@ type Product struct { // too far in the future. ExpirationDate string `json:"expirationDate,omitempty"` + // ExternalSellerId: Required for multi-seller accounts. Use this + // attribute if you're a marketplace uploading products for various + // sellers to your multi-seller account. + ExternalSellerId string `json:"externalSellerId,omitempty"` + // Gender: Target gender of the item. Gender string `json:"gender,omitempty"` @@ -13071,6 +13079,8 @@ type ProductstatusesCustomBatchRequestEntry struct { // returned, otherwise only issues for the Shopping destination. Destinations []string `json:"destinations,omitempty"` + // IncludeAttributes: Deprecated: Setting this field has no effect and + // attributes are never included. IncludeAttributes bool `json:"includeAttributes,omitempty"` // MerchantId: The ID of the managing account. @@ -13237,7 +13247,7 @@ type Promotion struct { BrandExclusion []string `json:"brandExclusion,omitempty"` // ContentLanguage: Required. The content language used as part of the - // unique identifier. + // unique identifier. Currently only en value is supported. ContentLanguage string `json:"contentLanguage,omitempty"` // CouponValueType: Required. Coupon value type for the promotion. @@ -13399,7 +13409,7 @@ type Promotion struct { ShippingServiceNames []string `json:"shippingServiceNames,omitempty"` // TargetCountry: Required. The target country used as part of the - // unique identifier. + // unique identifier. Currently only US and CA are supported. TargetCountry string `json:"targetCountry,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -16906,14 +16916,14 @@ func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { // ShoppingAdsProgramStatus: Response message for // GetShoppingAdsProgramStatus. type ShoppingAdsProgramStatus struct { - // GlobalState: State of the program, It is set to enabled if there are - // offers for at least one region. + // GlobalState: State of the program. `ENABLED` if there are offers for + // at least one region. // // Possible values: - // "PROGRAM_STATE_UNSPECIFIED" - State is not known. + // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. // "NOT_ENABLED" - Program is not enabled for any country. - // "NO_OFFERS_UPLOADED" - Offers are not uploaded targeting even a - // single country for this program. + // "NO_OFFERS_UPLOADED" - No products have been uploaded for any + // region. Upload products to Merchant Center. // "ENABLED" - Program is enabled and offers are uploaded for at least // one country. GlobalState string `json:"globalState,omitempty"` @@ -16952,10 +16962,10 @@ func (s *ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { // ShoppingAdsProgramStatusRegionStatus: Status of program and region. type ShoppingAdsProgramStatusRegionStatus struct { - // DisapprovalDate: Date by which `eligibility_status` will go from - // `WARNING` to `DISAPPROVED`. It will be present when - // `eligibility_status` is `WARNING`. Date will be provided in ISO 8601 - // (https://en.wikipedia.org/wiki/ISO_8601) format: YYYY-MM-DD + // DisapprovalDate: Date by which eligibilityStatus will go from + // `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus + // is WARNING. In ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) + // format: `YYYY-MM-DD`. DisapprovalDate string `json:"disapprovalDate,omitempty"` // EligibilityStatus: Eligibility status of the Shopping Ads program. @@ -16971,15 +16981,14 @@ type ShoppingAdsProgramStatusRegionStatus struct { // ence/rest/v2.1/accountstatuses) API. // "WARNING" - If account has issues but offers are servable. Some of // the issue can make account DISAPPROVED after a certain deadline. - // "UNDER_REVIEW" - Account is under review. Deprecated: This state is - // not created. + // "UNDER_REVIEW" - Account is under review. // "PENDING_REVIEW" - Account is waiting for review to start. // "ONBOARDING" - Program is currently onboarding. Upload valid offers // to complete onboarding. EligibilityStatus string `json:"eligibilityStatus,omitempty"` - // OnboardingIssues: These issues must be fixed to become eligible for - // the review. + // OnboardingIssues: Issues that must be fixed to be eligible for + // review. OnboardingIssues []string `json:"onboardingIssues,omitempty"` // RegionCodes: The two-letter ISO 3166-1 alpha-2 @@ -16987,13 +16996,13 @@ type ShoppingAdsProgramStatusRegionStatus struct { // regions with the same `eligibilityStatus` and `reviewEligibility`. RegionCodes []string `json:"regionCodes,omitempty"` - // ReviewEligibilityStatus: If a program in a given country is eligible - // for review. It will be present only if eligibility status is + // ReviewEligibilityStatus: If a program is eligible for review in a + // specific region. Only visible if `eligibilityStatus` is // `DISAPPROVED`. // // Possible values: - // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility reason state - // is unknown. + // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is + // unknown. // "ELIGIBLE" - Account is eligible for review for a specified region // code. // "INELIGIBLE" - Account is not eligible for review for a specified @@ -17012,21 +17021,25 @@ type ShoppingAdsProgramStatusRegionStatus struct { // period ends. // "ALREADY_UNDER_REVIEW" - Account is already under review. // "NO_REVIEW_REQUIRED" - No issues available to review. + // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically + // reviewed at the end of the grace period. + // "IS_RETIRED" - Account is retired. Should not appear in MC. + // "ALREADY_REVIEWED" - Account was already reviewd. ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` - // ReviewIneligibilityReasonDescription: Reason if a program in a given - // country is not eligible for review. Populated only if - // `review_eligibility_status` is `INELIGIBLE`. + // ReviewIneligibilityReasonDescription: Reason a program in a specific + // region isn’t eligible for review. Only visible if + // `reviewEligibilityStatus` is `INELIGIBLE`. ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` - // ReviewIneligibilityReasonDetails: This contains additional - // information specific to review ineligibility reasons. If review is - // ineligible because of `IN_COOLDOWN_PERIOD`, it will contain timestamp - // for cooldown period. + // ReviewIneligibilityReasonDetails: Additional information for + // ineligibility. If `reviewIneligibilityReason` is + // `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period + // is provided. ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` - // ReviewIssues: These issues will be evaluated in review process. Fix - // all the issues before requesting the review. + // ReviewIssues: Issues evaluated in the review process. Fix all issues + // before requesting a review. ReviewIssues []string `json:"reviewIssues,omitempty"` // ForceSendFields is a list of field names (e.g. "DisapprovalDate") to @@ -26698,9 +26711,9 @@ type FreelistingsprogramRequestreviewCall struct { header_ http.Header } -// Requestreview: Requests a review for Free Listings program in the -// provided region. Important: This method is only whitelisted for -// selected merchants. +// Requestreview: Requests a review of free listings in a specific +// region Important: This method is only whitelisted for selected +// merchants. // // - merchantId: The ID of the account. func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { @@ -26776,7 +26789,7 @@ func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) } return nil // { - // "description": "Requests a review for Free Listings program in the provided region. Important: This method is only whitelisted for selected merchants.", + // "description": "Requests a review of free listings in a specific region Important: This method is only whitelisted for selected merchants.", // "flatPath": "{merchantId}/freelistingsprogram/requestreview", // "httpMethod": "POST", // "id": "content.freelistingsprogram.requestreview", @@ -44035,8 +44048,8 @@ type ShoppingadsprogramRequestreviewCall struct { header_ http.Header } -// Requestreview: Requests a review for Shopping Ads program in the -// provided country. +// Requestreview: Requests a review of Shopping ads in a specific +// region. // // - merchantId: The ID of the account. func (r *ShoppingadsprogramService) Requestreview(merchantId int64, requestreviewshoppingadsrequest *RequestReviewShoppingAdsRequest) *ShoppingadsprogramRequestreviewCall { @@ -44112,7 +44125,7 @@ func (c *ShoppingadsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) e } return nil // { - // "description": "Requests a review for Shopping Ads program in the provided country.", + // "description": "Requests a review of Shopping ads in a specific region.", // "flatPath": "{merchantId}/shoppingadsprogram/requestreview", // "httpMethod": "POST", // "id": "content.shoppingadsprogram.requestreview", diff --git a/content/v2/content-api.json b/content/v2/content-api.json index 6190a97676d..7793301520f 100644 --- a/content/v2/content-api.json +++ b/content/v2/content-api.json @@ -992,81 +992,6 @@ } } }, - "inventory": { - "methods": { - "custombatch": { - "description": "Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.", - "flatPath": "inventory/batch", - "httpMethod": "POST", - "id": "content.inventory.custombatch", - "parameterOrder": [], - "parameters": { - "dryRun": { - "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - "location": "query", - "type": "boolean" - } - }, - "path": "inventory/batch", - "request": { - "$ref": "InventoryCustomBatchRequest" - }, - "response": { - "$ref": "InventoryCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "set": { - "description": "Updates price and availability of a product in your Merchant Center account.", - "flatPath": "{merchantId}/inventory/{storeCode}/products/{productId}", - "httpMethod": "POST", - "id": "content.inventory.set", - "parameterOrder": [ - "merchantId", - "storeCode", - "productId" - ], - "parameters": { - "dryRun": { - "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - "location": "query", - "type": "boolean" - }, - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "productId": { - "description": "The REST ID of the product for which to update price and availability.", - "location": "path", - "required": true, - "type": "string" - }, - "storeCode": { - "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/inventory/{storeCode}/products/{productId}", - "request": { - "$ref": "InventorySetRequest" - }, - "response": { - "$ref": "InventorySetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "liasettings": { "methods": { "custombatch": { @@ -3298,7 +3223,7 @@ } } }, - "revision": "20220111", + "revision": "20220317", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -5118,249 +5043,6 @@ }, "type": "object" }, - "Inventory": { - "id": "Inventory", - "properties": { - "availability": { - "description": "The availability of the product. Acceptable values are: - \"`in stock`\" - \"`out of stock`\" - \"`preorder`\" ", - "type": "string" - }, - "customLabel0": { - "description": "Custom label 0 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel1": { - "description": "Custom label 1 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel2": { - "description": "Custom label 2 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel3": { - "description": "Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel4": { - "description": "Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "installment": { - "$ref": "Installment", - "description": "Number and amount of installments to pay for an item. Brazil only." - }, - "instoreProductLocation": { - "description": "The instore product location. Supported only for local products.", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#inventory`\"", - "type": "string" - }, - "loyaltyPoints": { - "$ref": "LoyaltyPoints", - "description": "Loyalty points that users receive after purchasing the item. Japan only." - }, - "pickup": { - "$ref": "InventoryPickup", - "description": "Store pickup information. Only supported for local inventory. Not setting `pickup` means \"don't update\" while setting it to the empty value (`{}` in JSON) means \"delete\". Otherwise, `pickupMethod` and `pickupSla` must be set together, unless `pickupMethod` is \"not supported\"." - }, - "price": { - "$ref": "Price", - "description": "The price of the product." - }, - "quantity": { - "description": "The quantity of the product. Must be equal to or greater than zero. Supported only for local products.", - "format": "uint32", - "type": "integer" - }, - "salePrice": { - "$ref": "Price", - "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." - }, - "salePriceEffectiveDate": { - "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided.", - "type": "string" - }, - "sellOnGoogleQuantity": { - "description": "The quantity of the product that is available for selling on Google. Supported only for online products.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InventoryCustomBatchRequest": { - "id": "InventoryCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "InventoryCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "InventoryCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch inventory request.", - "id": "InventoryCustomBatchRequestEntry", - "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "inventory": { - "$ref": "Inventory", - "description": "Price and availability of the product." - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "productId": { - "description": "The ID of the product for which to update price and availability.", - "type": "string" - }, - "storeCode": { - "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", - "type": "string" - } - }, - "type": "object" - }, - "InventoryCustomBatchResponse": { - "id": "InventoryCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "InventoryCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#inventoryCustomBatchResponse\".", - "type": "string" - } - }, - "type": "object" - }, - "InventoryCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch inventory response.", - "id": "InventoryCustomBatchResponseEntry", - "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if and only if the request failed." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#inventoryCustomBatchResponseEntry`\"", - "type": "string" - } - }, - "type": "object" - }, - "InventoryPickup": { - "id": "InventoryPickup", - "properties": { - "pickupMethod": { - "description": "Whether store pickup is available for this offer and whether the pickup option should be shown as buy, reserve, or not supported. Only supported for local inventory. Unless the value is \"not supported\", must be submitted together with `pickupSla`. Acceptable values are: - \"`buy`\" - \"`not supported`\" - \"`reserve`\" - \"`ship to store`\" ", - "type": "string" - }, - "pickupSla": { - "description": "The expected date that an order will be ready for pickup, relative to when the order is placed. Only supported for local inventory. Must be submitted together with `pickupMethod`. Acceptable values are: - \"`five day`\" - \"`four day`\" - \"`multi day`\" - \"`multi week`\" - \"`next day`\" - \"`same day`\" - \"`seven day`\" - \"`six day`\" - \"`three day`\" - \"`two day`\" ", - "type": "string" - } - }, - "type": "object" - }, - "InventorySetRequest": { - "id": "InventorySetRequest", - "properties": { - "availability": { - "description": "The availability of the product. Acceptable values are: - \"`in stock`\" - \"`out of stock`\" - \"`preorder`\" ", - "type": "string" - }, - "customLabel0": { - "description": "Custom label 0 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel1": { - "description": "Custom label 1 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel2": { - "description": "Custom label 2 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel3": { - "description": "Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "customLabel4": { - "description": "Custom label 3 for custom grouping of items in a Shopping campaign. Only supported for online products.", - "type": "string" - }, - "installment": { - "$ref": "Installment", - "description": "Number and amount of installments to pay for an item. Brazil only." - }, - "instoreProductLocation": { - "description": "The instore product location. Supported only for local products.", - "type": "string" - }, - "loyaltyPoints": { - "$ref": "LoyaltyPoints", - "description": "Loyalty points that users receive after purchasing the item. Japan only." - }, - "pickup": { - "$ref": "InventoryPickup", - "description": "Store pickup information. Only supported for local inventory. Not setting `pickup` means \"don't update\" while setting it to the empty value (`{}` in JSON) means \"delete\". Otherwise, `pickupMethod` and `pickupSla` must be set together, unless `pickupMethod` is \"not supported\"." - }, - "price": { - "$ref": "Price", - "description": "The price of the product." - }, - "quantity": { - "description": "The quantity of the product. Must be equal to or greater than zero. Supported only for local products.", - "format": "uint32", - "type": "integer" - }, - "salePrice": { - "$ref": "Price", - "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." - }, - "salePriceEffectiveDate": { - "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided.", - "type": "string" - }, - "sellOnGoogleQuantity": { - "description": "The quantity of the product that is available for selling on Google. Supported only for online products.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InventorySetResponse": { - "id": "InventorySetResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"content#inventorySetResponse\".", - "type": "string" - } - }, - "type": "object" - }, "InvoiceSummary": { "id": "InvoiceSummary", "properties": { diff --git a/content/v2/content-gen.go b/content/v2/content-gen.go index 3bb94925737..d61683f9bee 100644 --- a/content/v2/content-gen.go +++ b/content/v2/content-gen.go @@ -122,7 +122,6 @@ func New(client *http.Client) (*APIService, error) { s.Accounttax = NewAccounttaxService(s) s.Datafeeds = NewDatafeedsService(s) s.Datafeedstatuses = NewDatafeedstatusesService(s) - s.Inventory = NewInventoryService(s) s.Liasettings = NewLiasettingsService(s) s.Orderinvoices = NewOrderinvoicesService(s) s.Orderreports = NewOrderreportsService(s) @@ -150,8 +149,6 @@ type APIService struct { Datafeedstatuses *DatafeedstatusesService - Inventory *InventoryService - Liasettings *LiasettingsService Orderinvoices *OrderinvoicesService @@ -223,15 +220,6 @@ type DatafeedstatusesService struct { s *APIService } -func NewInventoryService(s *APIService) *InventoryService { - rs := &InventoryService{s: s} - return rs -} - -type InventoryService struct { - s *APIService -} - func NewLiasettingsService(s *APIService) *LiasettingsService { rs := &LiasettingsService{s: s} return rs @@ -3342,75 +3330,60 @@ func (s *Installment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type Inventory struct { - // Availability: The availability of the product. Acceptable values are: - // - "in stock" - "out of stock" - "preorder" - Availability string `json:"availability,omitempty"` - - // CustomLabel0: Custom label 0 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel0 string `json:"customLabel0,omitempty"` - - // CustomLabel1: Custom label 1 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel1 string `json:"customLabel1,omitempty"` - - // CustomLabel2: Custom label 2 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel2 string `json:"customLabel2,omitempty"` - - // CustomLabel3: Custom label 3 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel3 string `json:"customLabel3,omitempty"` - - // CustomLabel4: Custom label 3 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel4 string `json:"customLabel4,omitempty"` +type InvoiceSummary struct { + // AdditionalChargeSummaries: Summary of the total amounts of the + // additional charges. + AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` - // Installment: Number and amount of installments to pay for an item. - // Brazil only. - Installment *Installment `json:"installment,omitempty"` + // CustomerBalance: Deprecated. + CustomerBalance *Amount `json:"customerBalance,omitempty"` - // InstoreProductLocation: The instore product location. Supported only - // for local products. - InstoreProductLocation string `json:"instoreProductLocation,omitempty"` + // GoogleBalance: Deprecated. + GoogleBalance *Amount `json:"googleBalance,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#inventory" - Kind string `json:"kind,omitempty"` + // MerchantBalance: Deprecated. + MerchantBalance *Amount `json:"merchantBalance,omitempty"` - // LoyaltyPoints: Loyalty points that users receive after purchasing the - // item. Japan only. - LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` + // ProductTotal: [required] Total price for the product. + ProductTotal *Amount `json:"productTotal,omitempty"` - // Pickup: Store pickup information. Only supported for local inventory. - // Not setting `pickup` means "don't update" while setting it to the - // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` - // and `pickupSla` must be set together, unless `pickupMethod` is "not - // supported". - Pickup *InventoryPickup `json:"pickup,omitempty"` + // PromotionSummaries: Deprecated. + PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` - // Price: The price of the product. - Price *Price `json:"price,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalChargeSummaries") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // Quantity: The quantity of the product. Must be equal to or greater - // than zero. Supported only for local products. - Quantity int64 `json:"quantity,omitempty"` + // NullFields is a list of field names (e.g. + // "AdditionalChargeSummaries") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} - // SalePrice: The sale price of the product. Mandatory if - // `sale_price_effective_date` is defined. - SalePrice *Price `json:"salePrice,omitempty"` +func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { + type NoMethod InvoiceSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // SalePriceEffectiveDate: A date range represented by a pair of ISO - // 8601 dates separated by a space, comma, or slash. Both dates might be - // specified as 'null' if undecided. - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` +type InvoiceSummaryAdditionalChargeSummary struct { + // TotalAmount: [required] Total additional charge for this type. + TotalAmount *Amount `json:"totalAmount,omitempty"` - // SellOnGoogleQuantity: The quantity of the product that is available - // for selling on Google. Supported only for online products. - SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` + // Type: [required] Type of the additional charge. Acceptable values + // are: - "shipping" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Availability") to + // ForceSendFields is a list of field names (e.g. "TotalAmount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3418,7 +3391,7 @@ type Inventory struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Availability") to include + // NullFields is a list of field names (e.g. "TotalAmount") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -3427,17 +3400,21 @@ type Inventory struct { NullFields []string `json:"-"` } -func (s *Inventory) MarshalJSON() ([]byte, error) { - type NoMethod Inventory +func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { + type NoMethod InvoiceSummaryAdditionalChargeSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InventoryCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"` +type LiaAboutPageSettings struct { + // Status: The status of the verification process for the About page. + // Acceptable values are: - "active" - "inactive" - "pending" + Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to + // Url: The URL for the About page. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Status") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3445,8 +3422,8 @@ type InventoryCustomBatchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Status") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3454,34 +3431,36 @@ type InventoryCustomBatchRequest struct { NullFields []string `json:"-"` } -func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod InventoryCustomBatchRequest +func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { + type NoMethod LiaAboutPageSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InventoryCustomBatchRequestEntry: A batch entry encoding a single -// non-batch inventory request. -type InventoryCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` +type LiaCountrySettings struct { + // About: The settings for the About page. + About *LiaAboutPageSettings `json:"about,omitempty"` - // Inventory: Price and availability of the product. - Inventory *Inventory `json:"inventory,omitempty"` + // Country: Required. CLDR country code (e.g. "US"). + Country string `json:"country,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` + // HostedLocalStorefrontActive: The status of the "Merchant hosted local + // storefront" feature. + HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` - // ProductId: The ID of the product for which to update price and - // availability. - ProductId string `json:"productId,omitempty"` + // Inventory: LIA inventory verification settings. + Inventory *LiaInventorySettings `json:"inventory,omitempty"` - // StoreCode: The code of the store for which to update price and - // availability. Use `online` to update price and availability of an - // online product. - StoreCode string `json:"storeCode,omitempty"` + // OnDisplayToOrder: LIA "On Display To Order" settings. + OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to + // PosDataProvider: The POS data provider linked with this country. + PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"` + + // StorePickupActive: The status of the "Store pickup" feature. + StorePickupActive bool `json:"storePickupActive,omitempty"` + + // ForceSendFields is a list of field names (e.g. "About") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3489,8 +3468,8 @@ type InventoryCustomBatchRequestEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "About") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3498,188 +3477,139 @@ type InventoryCustomBatchRequestEntry struct { NullFields []string `json:"-"` } -func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod InventoryCustomBatchRequestEntry +func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { + type NoMethod LiaCountrySettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InventoryCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"` +type LiaInventorySettings struct { + // InventoryVerificationContactEmail: The email of the contact for the + // inventory verification process. + InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#inventoryCustomBatchResponse". - Kind string `json:"kind,omitempty"` + // InventoryVerificationContactName: The name of the contact for the + // inventory verification process. + InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // InventoryVerificationContactStatus: The status of the verification + // contact. Acceptable values are: - "active" - "inactive" - + // "pending" + InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // Status: The status of the inventory verification process. Acceptable + // values are: - "active" - "inactive" - "pending" + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InventoryVerificationContactEmail") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "InventoryVerificationContactEmail") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod InventoryCustomBatchResponse +func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { + type NoMethod LiaInventorySettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InventoryCustomBatchResponseEntry: A batch entry encoding a single -// non-batch inventory response. -type InventoryCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - - // Errors: A list of errors defined if and only if the request failed. - Errors *Errors `json:"errors,omitempty"` +type LiaOnDisplayToOrderSettings struct { + // ShippingCostPolicyUrl: Shipping cost and policy URL. + ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#inventoryCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` + // Status: The status of the ?On display to order? feature. Acceptable + // values are: - "active" - "inactive" - "pending" + Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent 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. + // "ShippingCostPolicyUrl") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ShippingCostPolicyUrl") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod InventoryCustomBatchResponseEntry +func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { + type NoMethod LiaOnDisplayToOrderSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InventoryPickup struct { - // PickupMethod: Whether store pickup is available for this offer and - // whether the pickup option should be shown as buy, reserve, or not - // supported. Only supported for local inventory. Unless the value is - // "not supported", must be submitted together with `pickupSla`. - // Acceptable values are: - "buy" - "not supported" - "reserve" - - // "ship to store" - PickupMethod string `json:"pickupMethod,omitempty"` +type LiaPosDataProvider struct { + // PosDataProviderId: The ID of the POS data provider. + PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` - // PickupSla: The expected date that an order will be ready for pickup, - // relative to when the order is placed. Only supported for local - // inventory. Must be submitted together with `pickupMethod`. Acceptable - // values are: - "five day" - "four day" - "multi day" - "multi - // week" - "next day" - "same day" - "seven day" - "six day" - - // "three day" - "two day" - PickupSla string `json:"pickupSla,omitempty"` + // PosExternalAccountId: The account ID by which this merchant is known + // to the POS data provider. + PosExternalAccountId string `json:"posExternalAccountId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PickupMethod") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "PosDataProviderId") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PickupMethod") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "PosDataProviderId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *InventoryPickup) MarshalJSON() ([]byte, error) { - type NoMethod InventoryPickup +func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) { + type NoMethod LiaPosDataProvider raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InventorySetRequest struct { - // Availability: The availability of the product. Acceptable values are: - // - "in stock" - "out of stock" - "preorder" - Availability string `json:"availability,omitempty"` +// LiaSettings: Local Inventory ads (LIA) settings. All methods except +// listposdataproviders require the admin role. +type LiaSettings struct { + // AccountId: The ID of the account to which these LIA settings belong. + // Ignored upon update, always present in get request responses. + AccountId uint64 `json:"accountId,omitempty,string"` - // CustomLabel0: Custom label 0 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel0 string `json:"customLabel0,omitempty"` + // CountrySettings: The LIA settings for each country. + CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel1 string `json:"customLabel1,omitempty"` - - // CustomLabel2: Custom label 2 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel2 string `json:"customLabel2,omitempty"` - - // CustomLabel3: Custom label 3 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel3 string `json:"customLabel3,omitempty"` - - // CustomLabel4: Custom label 3 for custom grouping of items in a - // Shopping campaign. Only supported for online products. - CustomLabel4 string `json:"customLabel4,omitempty"` - - // Installment: Number and amount of installments to pay for an item. - // Brazil only. - Installment *Installment `json:"installment,omitempty"` - - // InstoreProductLocation: The instore product location. Supported only - // for local products. - InstoreProductLocation string `json:"instoreProductLocation,omitempty"` - - // LoyaltyPoints: Loyalty points that users receive after purchasing the - // item. Japan only. - LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` - - // Pickup: Store pickup information. Only supported for local inventory. - // Not setting `pickup` means "don't update" while setting it to the - // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` - // and `pickupSla` must be set together, unless `pickupMethod` is "not - // supported". - Pickup *InventoryPickup `json:"pickup,omitempty"` - - // Price: The price of the product. - Price *Price `json:"price,omitempty"` - - // Quantity: The quantity of the product. Must be equal to or greater - // than zero. Supported only for local products. - Quantity int64 `json:"quantity,omitempty"` - - // SalePrice: The sale price of the product. Mandatory if - // `sale_price_effective_date` is defined. - SalePrice *Price `json:"salePrice,omitempty"` - - // SalePriceEffectiveDate: A date range represented by a pair of ISO - // 8601 dates separated by a space, comma, or slash. Both dates might be - // specified as 'null' if undecided. - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liaSettings" + Kind string `json:"kind,omitempty"` - // SellOnGoogleQuantity: The quantity of the product that is available - // for selling on Google. Supported only for online products. - SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Availability") to + // ForceSendFields is a list of field names (e.g. "AccountId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3687,31 +3617,26 @@ type InventorySetRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Availability") to include - // in API requests with the JSON null value. By default, fields with - // 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. "AccountId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InventorySetRequest) MarshalJSON() ([]byte, error) { - type NoMethod InventorySetRequest +func (s *LiaSettings) MarshalJSON() ([]byte, error) { + type NoMethod LiaSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InventorySetResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#inventorySetResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type LiasettingsCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. "Entries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3719,8 +3644,8 @@ type InventorySetResponse struct { // 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 + // NullFields is a list of field names (e.g. "Entries") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3728,66 +3653,57 @@ type InventorySetResponse struct { NullFields []string `json:"-"` } -func (s *InventorySetResponse) MarshalJSON() ([]byte, error) { - type NoMethod InventorySetResponse +func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsCustomBatchRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InvoiceSummary struct { - // AdditionalChargeSummaries: Summary of the total amounts of the - // additional charges. - AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` +type LiasettingsCustomBatchRequestEntry struct { + // AccountId: The ID of the account for which to get/update account LIA + // settings. + AccountId uint64 `json:"accountId,omitempty,string"` - // CustomerBalance: Deprecated. - CustomerBalance *Amount `json:"customerBalance,omitempty"` + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` - // GoogleBalance: Deprecated. - GoogleBalance *Amount `json:"googleBalance,omitempty"` + // ContactEmail: Inventory validation contact email. Required only for + // SetInventoryValidationContact. + ContactEmail string `json:"contactEmail,omitempty"` - // MerchantBalance: Deprecated. - MerchantBalance *Amount `json:"merchantBalance,omitempty"` + // ContactName: Inventory validation contact name. Required only for + // SetInventoryValidationContact. + ContactName string `json:"contactName,omitempty"` - // ProductTotal: [required] Total price for the product. - ProductTotal *Amount `json:"productTotal,omitempty"` + // Country: The country code. Required only for + // RequestInventoryVerification. + Country string `json:"country,omitempty"` - // PromotionSummaries: Deprecated. - PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` + // GmbEmail: The GMB account. Required only for RequestGmbAccess. + GmbEmail string `json:"gmbEmail,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdditionalChargeSummaries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` + // LiaSettings: The account Lia settings to update. Only defined if the + // method is `update`. + LiaSettings *LiaSettings `json:"liaSettings,omitempty"` - // NullFields is a list of field names (e.g. - // "AdditionalChargeSummaries") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` -func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Method: The method of the batch entry. Acceptable values are: - + // "get" - "getAccessibleGmbAccounts" - "requestGmbAccess" - + // "requestInventoryVerification" - + // "setInventoryVerificationContact" - "update" + Method string `json:"method,omitempty"` -type InvoiceSummaryAdditionalChargeSummary struct { - // TotalAmount: [required] Total additional charge for this type. - TotalAmount *Amount `json:"totalAmount,omitempty"` + // PosDataProviderId: The ID of POS data provider. Required only for + // SetPosProvider. + PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` - // Type: [required] Type of the additional charge. Acceptable values - // are: - "shipping" - Type string `json:"type,omitempty"` + // PosExternalAccountId: The account ID by which this merchant is known + // to the POS provider. + PosExternalAccountId string `json:"posExternalAccountId,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalAmount") to + // ForceSendFields is a list of field names (e.g. "AccountId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3795,30 +3711,34 @@ type InvoiceSummaryAdditionalChargeSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalAmount") to include - // in API requests with the JSON null value. By default, fields with - // 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. "AccountId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummaryAdditionalChargeSummary +func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsCustomBatchRequestEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiaAboutPageSettings struct { - // Status: The status of the verification process for the About page. - // Acceptable values are: - "active" - "inactive" - "pending" - Status string `json:"status,omitempty"` +type LiasettingsCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` - // Url: The URL for the About page. - Url string `json:"url,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsCustomBatchResponse". + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Status") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Entries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3826,8 +3746,8 @@ type LiaAboutPageSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Status") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Entries") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3835,36 +3755,33 @@ type LiaAboutPageSettings struct { NullFields []string `json:"-"` } -func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { - type NoMethod LiaAboutPageSettings +func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsCustomBatchResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiaCountrySettings struct { - // About: The settings for the About page. - About *LiaAboutPageSettings `json:"about,omitempty"` - - // Country: Required. CLDR country code (e.g. "US"). - Country string `json:"country,omitempty"` +type LiasettingsCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` - // HostedLocalStorefrontActive: The status of the "Merchant hosted local - // storefront" feature. - HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` - // Inventory: LIA inventory verification settings. - Inventory *LiaInventorySettings `json:"inventory,omitempty"` + // GmbAccounts: The list of accessible GMB accounts. + GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` - // OnDisplayToOrder: LIA "On Display To Order" settings. - OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` - // PosDataProvider: The POS data provider linked with this country. - PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"` + // LiaSettings: The retrieved or updated Lia settings. + LiaSettings *LiaSettings `json:"liaSettings,omitempty"` - // StorePickupActive: The status of the "Store pickup" feature. - StorePickupActive bool `json:"storePickupActive,omitempty"` + // PosDataProviders: The list of POS data providers. + PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` - // ForceSendFields is a list of field names (e.g. "About") to + // ForceSendFields is a list of field names (e.g. "BatchId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3872,8 +3789,8 @@ type LiaCountrySettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "About") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BatchId") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3881,139 +3798,103 @@ type LiaCountrySettings struct { NullFields []string `json:"-"` } -func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { - type NoMethod LiaCountrySettings +func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsCustomBatchResponseEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiaInventorySettings struct { - // InventoryVerificationContactEmail: The email of the contact for the - // inventory verification process. - InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` +type LiasettingsGetAccessibleGmbAccountsResponse struct { + // AccountId: The ID of the Merchant Center account. + AccountId uint64 `json:"accountId,omitempty,string"` - // InventoryVerificationContactName: The name of the contact for the - // inventory verification process. - InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` + // GmbAccounts: A list of GMB accounts which are available to the + // merchant. + GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` - // InventoryVerificationContactStatus: The status of the verification - // contact. Acceptable values are: - "active" - "inactive" - - // "pending" - InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsGetAccessibleGmbAccountsResponse". + Kind string `json:"kind,omitempty"` - // Status: The status of the inventory verification process. Acceptable - // values are: - "active" - "inactive" - "pending" - Status string `json:"status,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "InventoryVerificationContactEmail") to unconditionally include in - // API requests. By default, fields with empty or default values are - // omitted from API requests. However, any non-pointer, non-interface - // field appearing in ForceSendFields will be sent 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. "AccountId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "InventoryVerificationContactEmail") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "AccountId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { - type NoMethod LiaInventorySettings +func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsGetAccessibleGmbAccountsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiaOnDisplayToOrderSettings struct { - // ShippingCostPolicyUrl: Shipping cost and policy URL. - ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` - - // Status: The status of the ?On display to order? feature. Acceptable - // values are: - "active" - "inactive" - "pending" - Status string `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ShippingCostPolicyUrl") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { - type NoMethod LiaOnDisplayToOrderSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type LiasettingsListPosDataProvidersResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsListPosDataProvidersResponse". + Kind string `json:"kind,omitempty"` -type LiaPosDataProvider struct { - // PosDataProviderId: The ID of the POS data provider. - PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` + // PosDataProviders: The list of POS data providers for each eligible + // country + PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` - // PosExternalAccountId: The account ID by which this merchant is known - // to the POS data provider. - PosExternalAccountId string `json:"posExternalAccountId,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "PosDataProviderId") - // to unconditionally include in API requests. By default, fields with + // 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. "PosDataProviderId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "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 *LiaPosDataProvider) MarshalJSON() ([]byte, error) { - type NoMethod LiaPosDataProvider +func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsListPosDataProvidersResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LiaSettings: Local Inventory ads (LIA) settings. All methods except -// listposdataproviders require the admin role. -type LiaSettings struct { - // AccountId: The ID of the account to which these LIA settings belong. - // Ignored upon update, always present in get request responses. - AccountId uint64 `json:"accountId,omitempty,string"` - - // CountrySettings: The LIA settings for each country. - CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` - +type LiasettingsListResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liaSettings" + // string "content#liasettingsListResponse". Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of LIA + // settings. + NextPageToken string `json:"nextPageToken,omitempty"` + + Resources []*LiaSettings `json:"resources,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountId") to + // 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 @@ -4021,8 +3902,8 @@ type LiaSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4030,17 +3911,22 @@ type LiaSettings struct { NullFields []string `json:"-"` } -func (s *LiaSettings) MarshalJSON() ([]byte, error) { - type NoMethod LiaSettings +func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsListResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiasettingsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` +type LiasettingsRequestGmbAccessResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsRequestGmbAccessResponse". + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // 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 @@ -4048,8 +3934,8 @@ type LiasettingsCustomBatchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4057,57 +3943,22 @@ type LiasettingsCustomBatchRequest struct { NullFields []string `json:"-"` } -func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsCustomBatchRequest +func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsRequestGmbAccessResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiasettingsCustomBatchRequestEntry struct { - // AccountId: The ID of the account for which to get/update account LIA - // settings. - AccountId uint64 `json:"accountId,omitempty,string"` - - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - - // ContactEmail: Inventory validation contact email. Required only for - // SetInventoryValidationContact. - ContactEmail string `json:"contactEmail,omitempty"` - - // ContactName: Inventory validation contact name. Required only for - // SetInventoryValidationContact. - ContactName string `json:"contactName,omitempty"` - - // Country: The country code. Required only for - // RequestInventoryVerification. - Country string `json:"country,omitempty"` - - // GmbEmail: The GMB account. Required only for RequestGmbAccess. - GmbEmail string `json:"gmbEmail,omitempty"` - - // LiaSettings: The account Lia settings to update. Only defined if the - // method is `update`. - LiaSettings *LiaSettings `json:"liaSettings,omitempty"` - - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - - // Method: The method of the batch entry. Acceptable values are: - - // "get" - "getAccessibleGmbAccounts" - "requestGmbAccess" - - // "requestInventoryVerification" - - // "setInventoryVerificationContact" - "update" - Method string `json:"method,omitempty"` - - // PosDataProviderId: The ID of POS data provider. Required only for - // SetPosProvider. - PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` +type LiasettingsRequestInventoryVerificationResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "content#liasettingsRequestInventoryVerificationResponse". + Kind string `json:"kind,omitempty"` - // PosExternalAccountId: The account ID by which this merchant is known - // to the POS provider. - PosExternalAccountId string `json:"posExternalAccountId,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountId") to + // 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 @@ -4115,8 +3966,8 @@ type LiasettingsCustomBatchRequestEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccountId") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4124,25 +3975,22 @@ type LiasettingsCustomBatchRequestEntry struct { NullFields []string `json:"-"` } -func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsCustomBatchRequestEntry +func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsRequestInventoryVerificationResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiasettingsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` - +type LiasettingsSetInventoryVerificationContactResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsCustomBatchResponse". + // string "content#liasettingsSetInventoryVerificationContactResponse". Kind string `json:"kind,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") to + // 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 @@ -4150,8 +3998,8 @@ type LiasettingsCustomBatchResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4159,33 +4007,22 @@ type LiasettingsCustomBatchResponse struct { NullFields []string `json:"-"` } -func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsCustomBatchResponse +func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsSetInventoryVerificationContactResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiasettingsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - - // GmbAccounts: The list of accessible GMB accounts. - GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` - +type LiasettingsSetPosDataProviderResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsCustomBatchResponseEntry" + // string "content#liasettingsSetPosDataProviderResponse". Kind string `json:"kind,omitempty"` - // LiaSettings: The retrieved or updated Lia settings. - LiaSettings *LiaSettings `json:"liaSettings,omitempty"` - - // PosDataProviders: The list of POS data providers. - PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BatchId") to + // 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 @@ -4193,8 +4030,8 @@ type LiasettingsCustomBatchResponseEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchId") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -4202,257 +4039,16 @@ type LiasettingsCustomBatchResponseEntry struct { NullFields []string `json:"-"` } -func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsCustomBatchResponseEntry +func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) { + type NoMethod LiasettingsSetPosDataProviderResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LiasettingsGetAccessibleGmbAccountsResponse struct { - // AccountId: The ID of the Merchant Center account. - AccountId uint64 `json:"accountId,omitempty,string"` - - // GmbAccounts: A list of GMB accounts which are available to the - // merchant. - GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` - - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsGetAccessibleGmbAccountsResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AccountId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccountId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsGetAccessibleGmbAccountsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsListPosDataProvidersResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsListPosDataProvidersResponse". - Kind string `json:"kind,omitempty"` - - // PosDataProviders: The list of POS data providers for each eligible - // country - PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsListPosDataProvidersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsListResponse". - Kind string `json:"kind,omitempty"` - - // NextPageToken: The token for the retrieval of the next page of LIA - // settings. - NextPageToken string `json:"nextPageToken,omitempty"` - - Resources []*LiaSettings `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsListResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsRequestGmbAccessResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsRequestGmbAccessResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsRequestGmbAccessResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsRequestInventoryVerificationResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsRequestInventoryVerificationResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsRequestInventoryVerificationResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsSetInventoryVerificationContactResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsSetInventoryVerificationContactResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsSetInventoryVerificationContactResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LiasettingsSetPosDataProviderResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "content#liasettingsSetPosDataProviderResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // 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 *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) { - type NoMethod LiasettingsSetPosDataProviderResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LocationIdSet struct { - // LocationIds: A non-empty list of location IDs. They must all be of - // the same location type (e.g., state). - LocationIds []string `json:"locationIds,omitempty"` +type LocationIdSet struct { + // LocationIds: A non-empty list of location IDs. They must all be of + // the same location type (e.g., state). + LocationIds []string `json:"locationIds,omitempty"` // ForceSendFields is a list of field names (e.g. "LocationIds") to // unconditionally include in API requests. By default, fields with @@ -12220,356 +11816,64 @@ type AccountsAuthinfoCall struct { ctx_ context.Context header_ http.Header } - -// Authinfo: Returns information about the authenticated user. -func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { - c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - 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 *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { - 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 *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { - 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 *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { - 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 *AccountsAuthinfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsAuthinfoCall) 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, "accounts/authinfo") - 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 "content.accounts.authinfo" call. -// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AccountsAuthInfoResponse{ - 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 information about the authenticated user.", - // "flatPath": "accounts/authinfo", - // "httpMethod": "GET", - // "id": "content.accounts.authinfo", - // "parameterOrder": [], - // "parameters": {}, - // "path": "accounts/authinfo", - // "response": { - // "$ref": "AccountsAuthInfoResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.accounts.claimwebsite": - -type AccountsClaimwebsiteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Claimwebsite: Claims the website of a Merchant Center sub-account. -// -// - accountId: The ID of the account whose website is claimed. -// - merchantId: The ID of the managing account. If this parameter is -// not the same as accountId, then this account must be a multi-client -// account and `accountId` must be the ID of a sub-account of this -// account. -func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { - c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Overwrite sets the optional parameter "overwrite": Only available to -// selected merchants. When set to `True`, this flag removes any -// existing claim on the requested website by another account and -// replaces it with a claim from this account. -func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { - c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) - 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 *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { - 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 *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { - 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 *AccountsClaimwebsiteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsClaimwebsiteCall) 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, "{merchantId}/accounts/{accountId}/claimwebsite") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.claimwebsite" call. -// Exactly one of *AccountsClaimWebsiteResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AccountsClaimWebsiteResponse{ - 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": "Claims the website of a Merchant Center sub-account.", - // "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", - // "httpMethod": "POST", - // "id": "content.accounts.claimwebsite", - // "parameterOrder": [ - // "merchantId", - // "accountId" - // ], - // "parameters": { - // "accountId": { - // "description": "The ID of the account whose website is claimed.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "merchantId": { - // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "overwrite": { - // "description": "Only available to selected merchants. When set to `True`, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "{merchantId}/accounts/{accountId}/claimwebsite", - // "response": { - // "$ref": "AccountsClaimWebsiteResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.accounts.custombatch": - -type AccountsCustombatchCall struct { - s *APIService - accountscustombatchrequest *AccountsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Custombatch: Retrieves, inserts, updates, and deletes multiple -// Merchant Center (sub-)accounts in a single request. -func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { - c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountscustombatchrequest = accountscustombatchrequest - return c -} - -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) + +// Authinfo: Returns information about the authenticated user. +func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { + c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 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 *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { +func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { 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 *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { + 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 *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { +func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 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 *AccountsCustombatchCall) Header() http.Header { +func (c *AccountsAuthinfoCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAuthinfoCall) 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.accountscustombatchrequest) - 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, "accounts/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -12577,14 +11881,14 @@ func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.custombatch" call. -// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. +// Do executes the "content.accounts.authinfo" call. +// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { +func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12603,7 +11907,7 @@ func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCus if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountsCustomBatchResponse{ + ret := &AccountsAuthInfoResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12615,24 +11919,15 @@ func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCus } return ret, nil // { - // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", - // "flatPath": "accounts/batch", - // "httpMethod": "POST", - // "id": "content.accounts.custombatch", + // "description": "Returns information about the authenticated user.", + // "flatPath": "accounts/authinfo", + // "httpMethod": "GET", + // "id": "content.accounts.authinfo", // "parameterOrder": [], - // "parameters": { - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "accounts/batch", - // "request": { - // "$ref": "AccountsCustomBatchRequest" - // }, + // "parameters": {}, + // "path": "accounts/authinfo", // "response": { - // "$ref": "AccountsCustomBatchResponse" + // "$ref": "AccountsAuthInfoResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -12641,9 +11936,9 @@ func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCus } -// method id "content.accounts.delete": +// method id "content.accounts.claimwebsite": -type AccountsDeleteCall struct { +type AccountsClaimwebsiteCall struct { s *APIService merchantId uint64 accountId uint64 @@ -12652,38 +11947,33 @@ type AccountsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Merchant Center sub-account. +// Claimwebsite: Claims the website of a Merchant Center sub-account. // -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. This must be a -// multi-client account, and accountId must be the ID of a sub-account -// of this account. -func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { - c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account whose website is claimed. +// - merchantId: The ID of the managing account. If this parameter is +// not the same as accountId, then this account must be a multi-client +// account and `accountId` must be the ID of a sub-account of this +// account. +func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { + c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId return c } -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) - return c -} - -// Force sets the optional parameter "force": Flag to delete -// sub-accounts with products. The default value is false. -func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// Overwrite sets the optional parameter "overwrite": Only available to +// selected merchants. When set to `True`, this flag removes any +// existing claim on the requested website by another account and +// replaces it with a claim from this account. +func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { + c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 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 *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { +func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12691,21 +11981,21 @@ func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { // 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 *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { +func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 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 *AccountsDeleteCall) Header() http.Header { +func (c *AccountsClaimwebsiteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsClaimwebsiteCall) 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_ { @@ -12715,9 +12005,9 @@ func (c *AccountsDeleteCall) 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, "{merchantId}/accounts/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -12729,55 +12019,77 @@ func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.delete" call. -func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.claimwebsite" call. +// Exactly one of *AccountsClaimWebsiteResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return err + return nil, err } - return nil + ret := &AccountsClaimWebsiteResponse{ + 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 Merchant Center sub-account.", - // "flatPath": "{merchantId}/accounts/{accountId}", - // "httpMethod": "DELETE", - // "id": "content.accounts.delete", + // "description": "Claims the website of a Merchant Center sub-account.", + // "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", + // "httpMethod": "POST", + // "id": "content.accounts.claimwebsite", // "parameterOrder": [ // "merchantId", // "accountId" // ], // "parameters": { // "accountId": { - // "description": "The ID of the account.", + // "description": "The ID of the account whose website is claimed.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // }, - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - // "location": "query", - // "type": "boolean" - // }, - // "force": { - // "default": "false", - // "description": "Flag to delete sub-accounts with products. The default value is false.", - // "location": "query", - // "type": "boolean" - // }, // "merchantId": { - // "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.", + // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" + // }, + // "overwrite": { + // "description": "Only available to selected merchants. When set to `True`, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "{merchantId}/accounts/{accountId}", + // "path": "{merchantId}/accounts/{accountId}/claimwebsite", + // "response": { + // "$ref": "AccountsClaimWebsiteResponse" + // }, // "scopes": [ // "https://www.googleapis.com/auth/content" // ] @@ -12785,102 +12097,90 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { } -// method id "content.accounts.get": +// method id "content.accounts.custombatch": -type AccountsGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustombatchCall struct { + s *APIService + accountscustombatchrequest *AccountsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a Merchant Center account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is -// not the same as accountId, then this account must be a multi-client -// account and `accountId` must be the ID of a sub-account of this -// account. -func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { - c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId +// Custombatch: Retrieves, inserts, updates, and deletes multiple +// Merchant Center (sub-)accounts in a single request. +func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { + c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountscustombatchrequest = accountscustombatchrequest + return c +} + +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { +func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { 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 *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { - 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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { +func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 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 *AccountsGetCall) Header() http.Header { +func (c *AccountsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustombatchCall) 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.accountscustombatchrequest) + 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, "{merchantId}/accounts/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.get" call. -// Exactly one of *Account or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { +// Do executes the "content.accounts.custombatch" call. +// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12899,7 +12199,7 @@ func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Account{ + ret := &AccountsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12911,33 +12211,24 @@ func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { } return ret, nil // { - // "description": "Retrieves a Merchant Center account.", - // "flatPath": "{merchantId}/accounts/{accountId}", - // "httpMethod": "GET", - // "id": "content.accounts.get", - // "parameterOrder": [ - // "merchantId", - // "accountId" - // ], + // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", + // "flatPath": "accounts/batch", + // "httpMethod": "POST", + // "id": "content.accounts.custombatch", + // "parameterOrder": [], // "parameters": { - // "accountId": { - // "description": "The ID of the account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "merchantId": { - // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "{merchantId}/accounts/{accountId}", + // "path": "accounts/batch", + // "request": { + // "$ref": "AccountsCustomBatchRequest" + // }, // "response": { - // "$ref": "Account" + // "$ref": "AccountsCustomBatchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -12946,40 +12237,49 @@ func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { } -// method id "content.accounts.insert": +// method id "content.accounts.delete": -type AccountsInsertCall struct { +type AccountsDeleteCall struct { s *APIService merchantId uint64 - account *Account + accountId uint64 urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a Merchant Center sub-account. +// Delete: Deletes a Merchant Center sub-account. // +// - accountId: The ID of the account. // - merchantId: The ID of the managing account. This must be a -// multi-client account. -func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { - c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// multi-client account, and accountId must be the ID of a sub-account +// of this account. +func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { + c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.account = account + c.accountId = accountId return c } // DryRun sets the optional parameter "dryRun": Flag to simulate a // request like in a live environment. If set to true, dry-run mode // checks the validity of the request and returns errors (if any). -func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { +func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) return c } +// Force sets the optional parameter "force": Flag to delete +// sub-accounts with products. The default value is false. +func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { + 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 *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { +func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12987,21 +12287,21 @@ func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { // 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 *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { +func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 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 *AccountsInsertCall) Header() http.Header { +func (c *AccountsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsDeleteCall) 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_ { @@ -13009,92 +12309,71 @@ func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) - 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, "{merchantId}/accounts") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.insert" call. -// Exactly one of *Account or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { +// Do executes the "content.accounts.delete" call. +func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return err } - return ret, nil + return nil // { - // "description": "Creates a Merchant Center sub-account.", - // "flatPath": "{merchantId}/accounts", - // "httpMethod": "POST", - // "id": "content.accounts.insert", + // "description": "Deletes a Merchant Center sub-account.", + // "flatPath": "{merchantId}/accounts/{accountId}", + // "httpMethod": "DELETE", + // "id": "content.accounts.delete", // "parameterOrder": [ - // "merchantId" + // "merchantId", + // "accountId" // ], // "parameters": { + // "accountId": { + // "description": "The ID of the account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "dryRun": { // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", // "type": "boolean" // }, + // "force": { + // "default": "false", + // "description": "Flag to delete sub-accounts with products. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, // "merchantId": { - // "description": "The ID of the managing account. This must be a multi-client account.", + // "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "{merchantId}/accounts", - // "request": { - // "$ref": "Account" - // }, - // "response": { - // "$ref": "Account" - // }, + // "path": "{merchantId}/accounts/{accountId}", // "scopes": [ // "https://www.googleapis.com/auth/content" // ] @@ -13102,77 +12381,83 @@ func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) } -// method id "content.accounts.link": +// method id "content.accounts.get": -type AccountsLinkCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountslinkrequest *AccountsLinkRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Link: Performs an action on a link between two Merchant Center -// accounts, namely accountId and linkedAccountId. +// Get: Retrieves a Merchant Center account. // -// - accountId: The ID of the account that should be linked. +// - accountId: The ID of the account. // - merchantId: The ID of the managing account. If this parameter is // not the same as accountId, then this account must be a multi-client // account and `accountId` must be the ID of a sub-account of this // account. -func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { - c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { + c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.accountslinkrequest = accountslinkrequest 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 *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { +func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 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 *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { + 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 *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { +func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 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 *AccountsLinkCall) Header() http.Header { +func (c *AccountsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsGetCall) 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.accountslinkrequest) - 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, "{merchantId}/accounts/{accountId}/link") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -13184,14 +12469,14 @@ func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.link" call. -// Exactly one of *AccountsLinkResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AccountsLinkResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { +// Do executes the "content.accounts.get" call. +// Exactly one of *Account or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Account.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13210,7 +12495,7 @@ func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkRespon if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountsLinkResponse{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13219,20 +12504,20 @@ func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkRespon target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil - // { - // "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", - // "flatPath": "{merchantId}/accounts/{accountId}/link", - // "httpMethod": "POST", - // "id": "content.accounts.link", + } + return ret, nil + // { + // "description": "Retrieves a Merchant Center account.", + // "flatPath": "{merchantId}/accounts/{accountId}", + // "httpMethod": "GET", + // "id": "content.accounts.get", // "parameterOrder": [ // "merchantId", // "accountId" // ], // "parameters": { // "accountId": { - // "description": "The ID of the account that should be linked.", + // "description": "The ID of the account.", // "format": "uint64", // "location": "path", // "required": true, @@ -13246,12 +12531,9 @@ func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkRespon // "type": "string" // } // }, - // "path": "{merchantId}/accounts/{accountId}/link", - // "request": { - // "$ref": "AccountsLinkRequest" - // }, + // "path": "{merchantId}/accounts/{accountId}", // "response": { - // "$ref": "AccountsLinkResponse" + // "$ref": "Account" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -13260,92 +12542,79 @@ func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkRespon } -// method id "content.accounts.list": +// method id "content.accounts.insert": -type AccountsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsInsertCall struct { + s *APIService + merchantId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the sub-accounts in your Merchant Center account. +// Insert: Creates a Merchant Center sub-account. // // - merchantId: The ID of the managing account. This must be a // multi-client account. -func (r *AccountsService) List(merchantId uint64) *AccountsListCall { - c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { + c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.account = account return c } -// MaxResults sets the optional parameter "maxResults": The maximum -// number of accounts to return in the response, used for paging. -func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned -// by the previous request. -func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { - c.urlParams_.Set("pageToken", pageToken) +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { +func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 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 *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { - 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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall { +func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 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 *AccountsListCall) Header() http.Header { +func (c *AccountsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsInsertCall) 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.account) + 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, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -13356,14 +12625,14 @@ func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.list" call. -// Exactly one of *AccountsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AccountsListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { +// Do executes the "content.accounts.insert" call. +// Exactly one of *Account or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Account.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13382,7 +12651,7 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListRespon if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountsListResponse{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13394,19 +12663,18 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListRespon } return ret, nil // { - // "description": "Lists the sub-accounts in your Merchant Center account.", + // "description": "Creates a Merchant Center sub-account.", // "flatPath": "{merchantId}/accounts", - // "httpMethod": "GET", - // "id": "content.accounts.list", + // "httpMethod": "POST", + // "id": "content.accounts.insert", // "parameterOrder": [ // "merchantId" // ], // "parameters": { - // "maxResults": { - // "description": "The maximum number of accounts to return in the response, used for paging.", - // "format": "uint32", + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, // "merchantId": { // "description": "The ID of the managing account. This must be a multi-client account.", @@ -13414,16 +12682,14 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListRespon // "location": "path", // "required": true, // "type": "string" - // }, - // "pageToken": { - // "description": "The token returned by the previous request.", - // "location": "query", - // "type": "string" // } // }, // "path": "{merchantId}/accounts", + // "request": { + // "$ref": "Account" + // }, // "response": { - // "$ref": "AccountsListResponse" + // "$ref": "Account" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -13432,67 +12698,38 @@ func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListRespon } -// 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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) 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 "content.accounts.update": +// method id "content.accounts.link": -type AccountsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLinkCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accountslinkrequest *AccountsLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a Merchant Center account. Any fields that are not -// provided are deleted from the resource. +// Link: Performs an action on a link between two Merchant Center +// accounts, namely accountId and linkedAccountId. // -// - accountId: The ID of the account. +// - accountId: The ID of the account that should be linked. // - merchantId: The ID of the managing account. If this parameter is // not the same as accountId, then this account must be a multi-client // account and `accountId` must be the ID of a sub-account of this // account. -func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { - c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { + c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.account = account - return c -} - -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) + c.accountslinkrequest = accountslinkrequest 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 *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { +func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13500,21 +12737,21 @@ func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { // 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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { +func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { 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 *AccountsUpdateCall) Header() http.Header { +func (c *AccountsLinkCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLinkCall) 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_ { @@ -13522,16 +12759,16 @@ func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) 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, "{merchantId}/accounts/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -13543,14 +12780,14 @@ func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounts.update" call. -// Exactly one of *Account or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Account.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { +// Do executes the "content.accounts.link" call. +// Exactly one of *AccountsLinkResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AccountsLinkResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13569,7 +12806,7 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Account{ + ret := &AccountsLinkResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13581,27 +12818,22 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) } return ret, nil // { - // "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", - // "flatPath": "{merchantId}/accounts/{accountId}", - // "httpMethod": "PUT", - // "id": "content.accounts.update", + // "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", + // "flatPath": "{merchantId}/accounts/{accountId}/link", + // "httpMethod": "POST", + // "id": "content.accounts.link", // "parameterOrder": [ // "merchantId", // "accountId" // ], // "parameters": { // "accountId": { - // "description": "The ID of the account.", + // "description": "The ID of the account that should be linked.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // }, - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - // "location": "query", - // "type": "boolean" - // }, // "merchantId": { // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", // "format": "uint64", @@ -13610,12 +12842,12 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) // "type": "string" // } // }, - // "path": "{merchantId}/accounts/{accountId}", + // "path": "{merchantId}/accounts/{accountId}/link", // "request": { - // "$ref": "Account" + // "$ref": "AccountsLinkRequest" // }, // "response": { - // "$ref": "Account" + // "$ref": "AccountsLinkResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -13624,83 +12856,110 @@ func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) } -// method id "content.accountstatuses.custombatch": - -type AccountstatusesCustombatchCall struct { - s *APIService - accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "content.accounts.list": + +type AccountsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the sub-accounts in your Merchant Center account. +// +// - merchantId: The ID of the managing account. This must be a +// multi-client account. +func (r *AccountsService) List(merchantId uint64) *AccountsListCall { + c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of accounts to return in the response, used for paging. +func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -// Custombatch: Retrieves multiple Merchant Center account statuses in a -// single request. -func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { - c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountstatusescustombatchrequest = accountstatusescustombatchrequest +// PageToken sets the optional parameter "pageToken": The token returned +// by the previous request. +func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { + 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 *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { +func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 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 *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { + 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 *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { +func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 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 *AccountstatusesCustombatchCall) Header() http.Header { +func (c *AccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListCall) 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.accountstatusescustombatchrequest) - 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, "accountstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.custombatch" call. -// Exactly one of *AccountstatusesCustomBatchResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { +// Do executes the "content.accounts.list" call. +// Exactly one of *AccountsListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AccountsListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13719,7 +12978,7 @@ func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Acco if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountstatusesCustomBatchResponse{ + ret := &AccountsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13731,18 +12990,36 @@ func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Acco } return ret, nil // { - // "description": "Retrieves multiple Merchant Center account statuses in a single request.", - // "flatPath": "accountstatuses/batch", - // "httpMethod": "POST", - // "id": "content.accountstatuses.custombatch", - // "parameterOrder": [], - // "parameters": {}, - // "path": "accountstatuses/batch", - // "request": { - // "$ref": "AccountstatusesCustomBatchRequest" + // "description": "Lists the sub-accounts in your Merchant Center account.", + // "flatPath": "{merchantId}/accounts", + // "httpMethod": "GET", + // "id": "content.accounts.list", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "maxResults": { + // "description": "The maximum number of accounts to return in the response, used for paging.", + // "format": "uint32", + // "location": "query", + // "type": "integer" + // }, + // "merchantId": { + // "description": "The ID of the managing account. This must be a multi-client account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageToken": { + // "description": "The token returned by the previous request.", + // "location": "query", + // "type": "string" + // } // }, + // "path": "{merchantId}/accounts", // "response": { - // "$ref": "AccountstatusesCustomBatchResponse" + // "$ref": "AccountsListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -13751,92 +13028,106 @@ func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Acco } -// method id "content.accountstatuses.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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) 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 AccountstatusesGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "content.accounts.update": + +type AccountsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a Merchant Center account. No -// itemLevelIssues are returned for multi-client accounts. +// Update: Updates a Merchant Center account. Any fields that are not +// provided are deleted from the resource. // // - accountId: The ID of the account. // - merchantId: The ID of the managing account. If this parameter is // not the same as accountId, then this account must be a multi-client // account and `accountId` must be the ID of a sub-account of this // account. -func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { - c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { + c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId + c.account = account return c } -// Destinations sets the optional parameter "destinations": If set, only -// issues for the specified destinations are returned, otherwise only -// issues for the Shopping destination. -func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { +func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 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 *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { - 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 *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { +func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 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 *AccountstatusesGetCall) Header() http.Header { +func (c *AccountsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdateCall) 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.account) + 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, "{merchantId}/accountstatuses/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -13848,14 +13139,14 @@ func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.get" call. -// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AccountStatus.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { +// Do executes the "content.accounts.update" call. +// Exactly one of *Account or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Account.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13874,7 +13165,7 @@ func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatu if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountStatus{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13886,10 +13177,10 @@ func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatu } return ret, nil // { - // "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", - // "flatPath": "{merchantId}/accountstatuses/{accountId}", - // "httpMethod": "GET", - // "id": "content.accountstatuses.get", + // "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", + // "flatPath": "{merchantId}/accounts/{accountId}", + // "httpMethod": "PUT", + // "id": "content.accounts.update", // "parameterOrder": [ // "merchantId", // "accountId" @@ -13902,11 +13193,10 @@ func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatu // "required": true, // "type": "string" // }, - // "destinations": { - // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", - // "repeated": true, - // "type": "string" + // "type": "boolean" // }, // "merchantId": { // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", @@ -13915,132 +13205,98 @@ func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatu // "required": true, // "type": "string" // } - // }, - // "path": "{merchantId}/accountstatuses/{accountId}", - // "response": { - // "$ref": "AccountStatus" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.accountstatuses.list": - -type AccountstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} + // }, + // "path": "{merchantId}/accounts/{accountId}", + // "request": { + // "$ref": "Account" + // }, + // "response": { + // "$ref": "Account" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } -// List: Lists the statuses of the sub-accounts in your Merchant Center -// account. -// -// - merchantId: The ID of the managing account. This must be a -// multi-client account. -func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { - c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c } -// Destinations sets the optional parameter "destinations": If set, only -// issues for the specified destinations are returned, otherwise only -// issues for the Shopping destination. -func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c -} +// method id "content.accountstatuses.custombatch": -// MaxResults sets the optional parameter "maxResults": The maximum -// number of account statuses to return in the response, used for -// paging. -func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type AccountstatusesCustombatchCall struct { + s *APIService + accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The token returned -// by the previous request. -func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Custombatch: Retrieves multiple Merchant Center account statuses in a +// single request. +func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { + c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 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 *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { +func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { 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 *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { - 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 *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { +func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 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 *AccountstatusesListCall) Header() http.Header { +func (c *AccountstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesCustombatchCall) 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.accountstatusescustombatchrequest) + 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, "{merchantId}/accountstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accountstatuses.list" call. -// Exactly one of *AccountstatusesListResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesListResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { +// Do executes the "content.accountstatuses.custombatch" call. +// Exactly one of *AccountstatusesCustomBatchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14059,7 +13315,7 @@ func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*Accountstat if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountstatusesListResponse{ + ret := &AccountstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14071,42 +13327,18 @@ func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*Accountstat } return ret, nil // { - // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", - // "flatPath": "{merchantId}/accountstatuses", - // "httpMethod": "GET", - // "id": "content.accountstatuses.list", - // "parameterOrder": [ - // "merchantId" - // ], - // "parameters": { - // "destinations": { - // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "maxResults": { - // "description": "The maximum number of account statuses to return in the response, used for paging.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "merchantId": { - // "description": "The ID of the managing account. This must be a multi-client account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageToken": { - // "description": "The token returned by the previous request.", - // "location": "query", - // "type": "string" - // } + // "description": "Retrieves multiple Merchant Center account statuses in a single request.", + // "flatPath": "accountstatuses/batch", + // "httpMethod": "POST", + // "id": "content.accountstatuses.custombatch", + // "parameterOrder": [], + // "parameters": {}, + // "path": "accountstatuses/batch", + // "request": { + // "$ref": "AccountstatusesCustomBatchRequest" // }, - // "path": "{merchantId}/accountstatuses", // "response": { - // "$ref": "AccountstatusesListResponse" + // "$ref": "AccountstatusesCustomBatchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -14115,111 +13347,111 @@ func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*Accountstat } -// 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 *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) 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 "content.accounttax.custombatch": +// method id "content.accountstatuses.get": -type AccounttaxCustombatchCall struct { - s *APIService - accounttaxcustombatchrequest *AccounttaxCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves and updates tax settings of multiple accounts -// in a single request. -func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { - c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accounttaxcustombatchrequest = accounttaxcustombatchrequest +// Get: Retrieves the status of a Merchant Center account. No +// itemLevelIssues are returned for multi-client accounts. +// +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is +// not the same as accountId, then this account must be a multi-client +// account and `accountId` must be the ID of a sub-account of this +// account. +func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { + c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId return c } -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) +// Destinations sets the optional parameter "destinations": If set, only +// issues for the specified destinations are returned, otherwise only +// issues for the Shopping destination. +func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 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 *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { +func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 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 *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { + 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 *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { +func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 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 *AccounttaxCustombatchCall) Header() http.Header { +func (c *AccountstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesGetCall) 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.accounttaxcustombatchrequest) - 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, "accounttax/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.custombatch" call. -// Exactly one of *AccounttaxCustomBatchResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.accountstatuses.get" call. +// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AccountStatus.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { +func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14238,7 +13470,7 @@ func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*Accountta if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccounttaxCustomBatchResponse{ + ret := &AccountStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14250,24 +13482,39 @@ func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*Accountta } return ret, nil // { - // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", - // "flatPath": "accounttax/batch", - // "httpMethod": "POST", - // "id": "content.accounttax.custombatch", - // "parameterOrder": [], + // "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", + // "flatPath": "{merchantId}/accountstatuses/{accountId}", + // "httpMethod": "GET", + // "id": "content.accountstatuses.get", + // "parameterOrder": [ + // "merchantId", + // "accountId" + // ], // "parameters": { - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "accountId": { + // "description": "The ID of the account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "destinations": { + // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", // "location": "query", - // "type": "boolean" + // "repeated": true, + // "type": "string" + // }, + // "merchantId": { + // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "accounttax/batch", - // "request": { - // "$ref": "AccounttaxCustomBatchRequest" - // }, + // "path": "{merchantId}/accountstatuses/{accountId}", // "response": { - // "$ref": "AccounttaxCustomBatchResponse" + // "$ref": "AccountStatus" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -14276,37 +13523,55 @@ func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*Accountta } -// method id "content.accounttax.get": +// method id "content.accountstatuses.list": -type AccounttaxGetCall struct { +type AccountstatusesListCall struct { s *APIService merchantId uint64 - accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves the tax settings of the account. +// List: Lists the statuses of the sub-accounts in your Merchant Center +// account. // -// - accountId: The ID of the account for which to get/update account -// tax settings. -// - merchantId: The ID of the managing account. If this parameter is -// not the same as accountId, then this account must be a multi-client -// account and `accountId` must be the ID of a sub-account of this -// account. -func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { - c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a +// multi-client account. +func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { + c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId + return c +} + +// Destinations sets the optional parameter "destinations": If set, only +// issues for the specified destinations are returned, otherwise only +// issues for the Shopping destination. +func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of account statuses to return in the response, used for +// paging. +func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned +// by the previous request. +func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { + 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 *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { +func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14316,7 +13581,7 @@ func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { // 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 *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { +func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { c.ifNoneMatch_ = entityTag return c } @@ -14324,21 +13589,21 @@ func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { // 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 *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { +func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 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 *AccounttaxGetCall) Header() http.Header { +func (c *AccountstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesListCall) 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_ { @@ -14351,7 +13616,7 @@ func (c *AccounttaxGetCall) 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, "{merchantId}/accounttax/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14360,19 +13625,18 @@ func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.get" call. -// Exactly one of *AccountTax or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AccountTax.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { +// Do executes the "content.accountstatuses.list" call. +// Exactly one of *AccountstatusesListResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AccountstatusesListResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14391,7 +13655,7 @@ func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccountTax{ + ret := &AccountstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14403,33 +13667,42 @@ func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error } return ret, nil // { - // "description": "Retrieves the tax settings of the account.", - // "flatPath": "{merchantId}/accounttax/{accountId}", + // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", + // "flatPath": "{merchantId}/accountstatuses", // "httpMethod": "GET", - // "id": "content.accounttax.get", + // "id": "content.accountstatuses.list", // "parameterOrder": [ - // "merchantId", - // "accountId" + // "merchantId" // ], // "parameters": { - // "accountId": { - // "description": "The ID of the account for which to get/update account tax settings.", - // "format": "uint64", - // "location": "path", - // "required": true, + // "destinations": { + // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + // "location": "query", + // "repeated": true, // "type": "string" // }, + // "maxResults": { + // "description": "The maximum number of account statuses to return in the response, used for paging.", + // "format": "uint32", + // "location": "query", + // "type": "integer" + // }, // "merchantId": { - // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", + // "description": "The ID of the managing account. This must be a multi-client account.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" + // }, + // "pageToken": { + // "description": "The token returned by the previous request.", + // "location": "query", + // "type": "string" // } // }, - // "path": "{merchantId}/accounttax/{accountId}", + // "path": "{merchantId}/accountstatuses", // "response": { - // "$ref": "AccountTax" + // "$ref": "AccountstatusesListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -14438,111 +13711,111 @@ func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error } -// method id "content.accounttax.list": - -type AccounttaxListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) 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) + } } -// List: Lists the tax settings of the sub-accounts in your Merchant -// Center account. -// -// - merchantId: The ID of the managing account. This must be a -// multi-client account. -func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { - c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +// method id "content.accounttax.custombatch": + +type AccounttaxCustombatchCall struct { + s *APIService + accounttaxcustombatchrequest *AccounttaxCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MaxResults sets the optional parameter "maxResults": The maximum -// number of tax settings to return in the response, used for paging. -func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Custombatch: Retrieves and updates tax settings of multiple accounts +// in a single request. +func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { + c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accounttaxcustombatchrequest = accounttaxcustombatchrequest return c } -// PageToken sets the optional parameter "pageToken": The token returned -// by the previous request. -func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { - c.urlParams_.Set("pageToken", pageToken) +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { +func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { 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 *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { - 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 *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { +func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 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 *AccounttaxListCall) Header() http.Header { +func (c *AccounttaxCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxCustombatchCall) 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.accounttaxcustombatchrequest) + 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, "{merchantId}/accounttax") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.list" call. -// Exactly one of *AccounttaxListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AccounttaxListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.accounttax.custombatch" call. +// Exactly one of *AccounttaxCustomBatchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { +func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14561,7 +13834,7 @@ func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListRe if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AccounttaxListResponse{ + ret := &AccounttaxCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14573,36 +13846,24 @@ func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListRe } return ret, nil // { - // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", - // "flatPath": "{merchantId}/accounttax", - // "httpMethod": "GET", - // "id": "content.accounttax.list", - // "parameterOrder": [ - // "merchantId" - // ], + // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", + // "flatPath": "accounttax/batch", + // "httpMethod": "POST", + // "id": "content.accounttax.custombatch", + // "parameterOrder": [], // "parameters": { - // "maxResults": { - // "description": "The maximum number of tax settings to return in the response, used for paging.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "merchantId": { - // "description": "The ID of the managing account. This must be a multi-client account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageToken": { - // "description": "The token returned by the previous request.", + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "{merchantId}/accounttax", + // "path": "accounttax/batch", + // "request": { + // "$ref": "AccounttaxCustomBatchRequest" + // }, // "response": { - // "$ref": "AccounttaxListResponse" + // "$ref": "AccounttaxCustomBatchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -14611,41 +13872,19 @@ func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListRe } -// 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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) 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 "content.accounttax.update": +// method id "content.accounttax.get": -type AccounttaxUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accounttax *AccountTax - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccounttaxGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the tax settings of the account. Any fields that are -// not provided are deleted from the resource. +// Get: Retrieves the tax settings of the account. // // - accountId: The ID of the account for which to get/update account // tax settings. @@ -14653,65 +13892,64 @@ type AccounttaxUpdateCall struct { // not the same as accountId, then this account must be a multi-client // account and `accountId` must be the ID of a sub-account of this // account. -func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { - c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { + c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId - c.accounttax = accounttax - return c -} - -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { +func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 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 *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { + 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 *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { +func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 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 *AccounttaxUpdateCall) Header() http.Header { +func (c *AccounttaxGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxGetCall) 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.accounttax) - 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, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -14723,14 +13961,14 @@ func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.accounttax.update" call. +// Do executes the "content.accounttax.get" call. // Exactly one of *AccountTax or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *AccountTax.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { +func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14761,10 +13999,10 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er } return ret, nil // { - // "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", + // "description": "Retrieves the tax settings of the account.", // "flatPath": "{merchantId}/accounttax/{accountId}", - // "httpMethod": "PUT", - // "id": "content.accounttax.update", + // "httpMethod": "GET", + // "id": "content.accounttax.get", // "parameterOrder": [ // "merchantId", // "accountId" @@ -14777,11 +14015,6 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er // "required": true, // "type": "string" // }, - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", - // "location": "query", - // "type": "boolean" - // }, // "merchantId": { // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", // "format": "uint64", @@ -14791,9 +14024,6 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er // } // }, // "path": "{merchantId}/accounttax/{accountId}", - // "request": { - // "$ref": "AccountTax" - // }, // "response": { // "$ref": "AccountTax" // }, @@ -14804,90 +14034,111 @@ func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, er } -// method id "content.datafeeds.custombatch": +// method id "content.accounttax.list": -type DatafeedsCustombatchCall struct { - s *APIService - datafeedscustombatchrequest *DatafeedsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccounttaxListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Deletes, fetches, gets, inserts and updates multiple -// datafeeds in a single request. -func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { - c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedscustombatchrequest = datafeedscustombatchrequest +// List: Lists the tax settings of the sub-accounts in your Merchant +// Center account. +// +// - merchantId: The ID of the managing account. This must be a +// multi-client account. +func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { + c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId return c } -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of tax settings to return in the response, used for paging. +func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned +// by the previous request. +func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { + 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 *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { +func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { 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 *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { + 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 *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { +func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 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 *DatafeedsCustombatchCall) Header() http.Header { +func (c *AccounttaxListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxListCall) 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.datafeedscustombatchrequest) - 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, "datafeeds/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.custombatch" call. -// Exactly one of *DatafeedsCustomBatchResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.accounttax.list" call. +// Exactly one of *AccounttaxListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AccounttaxListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { +func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14906,7 +14157,7 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedsCustomBatchResponse{ + ret := &AccounttaxListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14918,24 +14169,36 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC } return ret, nil // { - // "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", - // "flatPath": "datafeeds/batch", - // "httpMethod": "POST", - // "id": "content.datafeeds.custombatch", - // "parameterOrder": [], + // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", + // "flatPath": "{merchantId}/accounttax", + // "httpMethod": "GET", + // "id": "content.accounttax.list", + // "parameterOrder": [ + // "merchantId" + // ], // "parameters": { - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "maxResults": { + // "description": "The maximum number of tax settings to return in the response, used for paging.", + // "format": "uint32", + // "location": "query", + // "type": "integer" + // }, + // "merchantId": { + // "description": "The ID of the managing account. This must be a multi-client account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageToken": { + // "description": "The token returned by the previous request.", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "datafeeds/batch", - // "request": { - // "$ref": "DatafeedsCustomBatchRequest" - // }, + // "path": "{merchantId}/accounttax", // "response": { - // "$ref": "DatafeedsCustomBatchResponse" + // "$ref": "AccounttaxListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -14944,34 +14207,60 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC } -// method id "content.datafeeds.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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) 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 DatafeedsDeleteCall struct { +// method id "content.accounttax.update": + +type AccounttaxUpdateCall struct { s *APIService merchantId uint64 - datafeedId uint64 + accountId uint64 + accounttax *AccountTax urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a datafeed configuration from your Merchant Center -// account. +// Update: Updates the tax settings of the account. Any fields that are +// not provided are deleted from the resource. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This -// account cannot be a multi-client account. -func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { - c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get/update account +// tax settings. +// - merchantId: The ID of the managing account. If this parameter is +// not the same as accountId, then this account must be a multi-client +// account and `accountId` must be the ID of a sub-account of this +// account. +func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { + c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + c.accountId = accountId + c.accounttax = accounttax return c } // DryRun sets the optional parameter "dryRun": Flag to simulate a // request like in a live environment. If set to true, dry-run mode // checks the validity of the request and returns errors (if any). -func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { +func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) return c } @@ -14979,7 +14268,7 @@ func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { +func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14987,21 +14276,21 @@ func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall // 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 *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { +func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 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 *DatafeedsDeleteCall) Header() http.Header { +func (c *AccounttaxUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxUpdateCall) 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_ { @@ -15009,46 +14298,76 @@ func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) + 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, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.delete" call. -func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounttax.update" call. +// Exactly one of *AccountTax or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AccountTax.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return err + return nil, err } - return nil + ret := &AccountTax{ + 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 datafeed configuration from your Merchant Center account.", - // "flatPath": "{merchantId}/datafeeds/{datafeedId}", - // "httpMethod": "DELETE", - // "id": "content.datafeeds.delete", + // "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", + // "flatPath": "{merchantId}/accounttax/{accountId}", + // "httpMethod": "PUT", + // "id": "content.accounttax.update", // "parameterOrder": [ // "merchantId", - // "datafeedId" + // "accountId" // ], // "parameters": { - // "datafeedId": { - // "description": "The ID of the datafeed.", + // "accountId": { + // "description": "The ID of the account for which to get/update account tax settings.", // "format": "uint64", // "location": "path", // "required": true, @@ -15060,14 +14379,20 @@ func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "boolean" // }, // "merchantId": { - // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", + // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "{merchantId}/datafeeds/{datafeedId}", + // "path": "{merchantId}/accounttax/{accountId}", + // "request": { + // "$ref": "AccountTax" + // }, + // "response": { + // "$ref": "AccountTax" + // }, // "scopes": [ // "https://www.googleapis.com/auth/content" // ] @@ -15075,35 +14400,28 @@ func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { } -// method id "content.datafeeds.fetchnow": +// method id "content.datafeeds.custombatch": -type DatafeedsFetchnowCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsCustombatchCall struct { + s *APIService + datafeedscustombatchrequest *DatafeedsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center -// account. If you need to call this method more than once per day, we -// recommend you use the Products service to update your product data. -// -// - datafeedId: The ID of the datafeed to be fetched. -// - merchantId: The ID of the account that manages the datafeed. This -// account cannot be a multi-client account. -func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { - c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId +// Custombatch: Deletes, fetches, gets, inserts and updates multiple +// datafeeds in a single request. +func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { + c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedscustombatchrequest = datafeedscustombatchrequest return c } // DryRun sets the optional parameter "dryRun": Flag to simulate a // request like in a live environment. If set to true, dry-run mode // checks the validity of the request and returns errors (if any). -func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { +func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) return c } @@ -15111,7 +14429,7 @@ func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { +func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15119,21 +14437,21 @@ func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowC // 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 *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { +func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 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 *DatafeedsFetchnowCall) Header() http.Header { +func (c *DatafeedsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsCustombatchCall) 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_ { @@ -15141,30 +14459,31 @@ func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) + 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, "{merchantId}/datafeeds/{datafeedId}/fetchNow") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.fetchnow" call. -// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.datafeeds.custombatch" call. +// Exactly one of *DatafeedsCustomBatchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { +func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15183,7 +14502,7 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedsFetchNowResponse{ + ret := &DatafeedsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15195,38 +14514,24 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc } return ret, nil // { - // "description": "Invokes a fetch for the datafeed in your Merchant Center account. If you need to call this method more than once per day, we recommend you use the Products service to update your product data.", - // "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", + // "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", + // "flatPath": "datafeeds/batch", // "httpMethod": "POST", - // "id": "content.datafeeds.fetchnow", - // "parameterOrder": [ - // "merchantId", - // "datafeedId" - // ], + // "id": "content.datafeeds.custombatch", + // "parameterOrder": [], // "parameters": { - // "datafeedId": { - // "description": "The ID of the datafeed to be fetched.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "dryRun": { // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", // "type": "boolean" - // }, - // "merchantId": { - // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", + // "path": "datafeeds/batch", + // "request": { + // "$ref": "DatafeedsCustomBatchRequest" + // }, // "response": { - // "$ref": "DatafeedsFetchNowResponse" + // "$ref": "DatafeedsCustomBatchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -15235,82 +14540,76 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc } -// method id "content.datafeeds.get": +// method id "content.datafeeds.delete": -type DatafeedsGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsDeleteCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a datafeed configuration from your Merchant Center +// Delete: Deletes a datafeed configuration from your Merchant Center // account. // // - datafeedId: The ID of the datafeed. // - merchantId: The ID of the account that manages the datafeed. This // account cannot be a multi-client account. -func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { - c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { + c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.datafeedId = datafeedId return c } +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) + 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 *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { +func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 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 *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { - 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 *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { +func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 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 *DatafeedsGetCall) Header() http.Header { +func (c *DatafeedsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsDeleteCall) 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, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -15322,48 +14621,23 @@ func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.get" call. -// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +// Do executes the "content.datafeeds.delete" call. +func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Datafeed{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return err } - return ret, nil + return nil // { - // "description": "Retrieves a datafeed configuration from your Merchant Center account.", + // "description": "Deletes a datafeed configuration from your Merchant Center account.", // "flatPath": "{merchantId}/datafeeds/{datafeedId}", - // "httpMethod": "GET", - // "id": "content.datafeeds.get", + // "httpMethod": "DELETE", + // "id": "content.datafeeds.delete", // "parameterOrder": [ // "merchantId", // "datafeedId" @@ -15376,6 +14650,11 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { // "required": true, // "type": "string" // }, + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "location": "query", + // "type": "boolean" + // }, // "merchantId": { // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", // "format": "uint64", @@ -15385,9 +14664,6 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { // } // }, // "path": "{merchantId}/datafeeds/{datafeedId}", - // "response": { - // "$ref": "Datafeed" - // }, // "scopes": [ // "https://www.googleapis.com/auth/content" // ] @@ -15395,33 +14671,35 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { } -// method id "content.datafeeds.insert": +// method id "content.datafeeds.fetchnow": -type DatafeedsInsertCall struct { +type DatafeedsFetchnowCall struct { s *APIService merchantId uint64 - datafeed *Datafeed + datafeedId uint64 urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Registers a datafeed configuration with your Merchant Center -// account. +// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center +// account. If you need to call this method more than once per day, we +// recommend you use the Products service to update your product data. // +// - datafeedId: The ID of the datafeed to be fetched. // - merchantId: The ID of the account that manages the datafeed. This // account cannot be a multi-client account. -func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { - c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { + c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeed = datafeed + c.datafeedId = datafeedId return c } // DryRun sets the optional parameter "dryRun": Flag to simulate a // request like in a live environment. If set to true, dry-run mode // checks the validity of the request and returns errors (if any). -func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { +func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) return c } @@ -15429,7 +14707,7 @@ func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { +func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15437,21 +14715,21 @@ func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall // 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 *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { +func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 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 *DatafeedsInsertCall) Header() http.Header { +func (c *DatafeedsFetchnowCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsFetchnowCall) 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_ { @@ -15459,14 +14737,9 @@ func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) - 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, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15475,18 +14748,19 @@ func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.insert" call. -// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +// Do executes the "content.datafeeds.fetchnow" call. +// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15505,7 +14779,7 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Datafeed{ + ret := &DatafeedsFetchNowResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15517,14 +14791,22 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error } return ret, nil // { - // "description": "Registers a datafeed configuration with your Merchant Center account.", - // "flatPath": "{merchantId}/datafeeds", + // "description": "Invokes a fetch for the datafeed in your Merchant Center account. If you need to call this method more than once per day, we recommend you use the Products service to update your product data.", + // "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", // "httpMethod": "POST", - // "id": "content.datafeeds.insert", + // "id": "content.datafeeds.fetchnow", // "parameterOrder": [ - // "merchantId" + // "merchantId", + // "datafeedId" // ], // "parameters": { + // "datafeedId": { + // "description": "The ID of the datafeed to be fetched.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "dryRun": { // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", @@ -15538,12 +14820,9 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error // "type": "string" // } // }, - // "path": "{merchantId}/datafeeds", - // "request": { - // "$ref": "Datafeed" - // }, + // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", // "response": { - // "$ref": "Datafeed" + // "$ref": "DatafeedsFetchNowResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -15552,46 +14831,35 @@ func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error } -// method id "content.datafeeds.list": +// method id "content.datafeeds.get": -type DatafeedsListCall struct { +type DatafeedsGetCall struct { s *APIService merchantId uint64 + datafeedId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the configurations for datafeeds in your Merchant Center +// Get: Retrieves a datafeed configuration from your Merchant Center // account. // -// - merchantId: The ID of the account that manages the datafeeds. This +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This // account cannot be a multi-client account. -func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { - c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { + c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of products to return in the response, used for paging. -func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned -// by the previous request. -func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.datafeedId = datafeedId 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 *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { +func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15601,7 +14869,7 @@ func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { // 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 *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { +func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15609,21 +14877,21 @@ func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { // 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 *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { +func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 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 *DatafeedsListCall) Header() http.Header { +func (c *DatafeedsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsGetCall) 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_ { @@ -15636,7 +14904,7 @@ func (c *DatafeedsListCall) 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, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15645,18 +14913,19 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.list" call. -// Exactly one of *DatafeedsListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DatafeedsListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { +// Do executes the "content.datafeeds.get" call. +// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Datafeed.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15675,7 +14944,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedsListResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15687,36 +14956,33 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp } return ret, nil // { - // "description": "Lists the configurations for datafeeds in your Merchant Center account.", - // "flatPath": "{merchantId}/datafeeds", + // "description": "Retrieves a datafeed configuration from your Merchant Center account.", + // "flatPath": "{merchantId}/datafeeds/{datafeedId}", // "httpMethod": "GET", - // "id": "content.datafeeds.list", + // "id": "content.datafeeds.get", // "parameterOrder": [ - // "merchantId" + // "merchantId", + // "datafeedId" // ], // "parameters": { - // "maxResults": { - // "description": "The maximum number of products to return in the response, used for paging.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "merchantId": { - // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", + // "datafeedId": { + // "description": "The ID of the datafeed.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // }, - // "pageToken": { - // "description": "The token returned by the previous request.", - // "location": "query", + // "merchantId": { + // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", + // "format": "uint64", + // "location": "path", + // "required": true, // "type": "string" // } // }, - // "path": "{merchantId}/datafeeds", + // "path": "{merchantId}/datafeeds/{datafeedId}", // "response": { - // "$ref": "DatafeedsListResponse" + // "$ref": "Datafeed" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -15725,50 +14991,25 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp } -// 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 *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) 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 "content.datafeeds.update": +// method id "content.datafeeds.insert": -type DatafeedsUpdateCall struct { +type DatafeedsInsertCall struct { s *APIService merchantId uint64 - datafeedId uint64 datafeed *Datafeed urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates a datafeed configuration of your Merchant Center -// account. Any fields that are not provided are deleted from the -// resource. +// Insert: Registers a datafeed configuration with your Merchant Center +// account. // -// - datafeedId: The ID of the datafeed. // - merchantId: The ID of the account that manages the datafeed. This // account cannot be a multi-client account. -func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { - c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { + c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId c.datafeed = datafeed return c } @@ -15776,7 +15017,7 @@ func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed // DryRun sets the optional parameter "dryRun": Flag to simulate a // request like in a live environment. If set to true, dry-run mode // checks the validity of the request and returns errors (if any). -func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { +func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) return c } @@ -15784,7 +15025,7 @@ func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { +func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15792,21 +15033,21 @@ func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall // 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 *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { +func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 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 *DatafeedsUpdateCall) Header() http.Header { +func (c *DatafeedsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsInsertCall) 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_ { @@ -15821,28 +15062,27 @@ func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.update" call. +// Do executes the "content.datafeeds.insert" call. // Exactly one of *Datafeed or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Datafeed.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15873,22 +15113,14 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error } return ret, nil // { - // "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", - // "flatPath": "{merchantId}/datafeeds/{datafeedId}", - // "httpMethod": "PUT", - // "id": "content.datafeeds.update", + // "description": "Registers a datafeed configuration with your Merchant Center account.", + // "flatPath": "{merchantId}/datafeeds", + // "httpMethod": "POST", + // "id": "content.datafeeds.insert", // "parameterOrder": [ - // "merchantId", - // "datafeedId" + // "merchantId" // ], // "parameters": { - // "datafeedId": { - // "description": "The ID of the datafeed.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "dryRun": { // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", @@ -15902,7 +15134,7 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error // "type": "string" // } // }, - // "path": "{merchantId}/datafeeds/{datafeedId}", + // "path": "{merchantId}/datafeeds", // "request": { // "$ref": "Datafeed" // }, @@ -15916,83 +15148,111 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error } -// method id "content.datafeedstatuses.custombatch": +// method id "content.datafeeds.list": -type DatafeedstatusesCustombatchCall struct { - s *APIService - datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Gets multiple Merchant Center datafeed statuses in a -// single request. -func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { - c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest +// List: Lists the configurations for datafeeds in your Merchant Center +// account. +// +// - merchantId: The ID of the account that manages the datafeeds. This +// account cannot be a multi-client account. +func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { + c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of products to return in the response, used for paging. +func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned +// by the previous request. +func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { + 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 *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { +func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { 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 *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { + 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 *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { +func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 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 *DatafeedstatusesCustombatchCall) Header() http.Header { +func (c *DatafeedsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsListCall) 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.datafeedstatusescustombatchrequest) - 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, "datafeedstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.custombatch" call. -// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { +// Do executes the "content.datafeeds.list" call. +// Exactly one of *DatafeedsListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DatafeedsListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16011,7 +15271,7 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedstatusesCustomBatchResponse{ + ret := &DatafeedsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16023,18 +15283,36 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat } return ret, nil // { - // "description": "Gets multiple Merchant Center datafeed statuses in a single request.", - // "flatPath": "datafeedstatuses/batch", - // "httpMethod": "POST", - // "id": "content.datafeedstatuses.custombatch", - // "parameterOrder": [], - // "parameters": {}, - // "path": "datafeedstatuses/batch", - // "request": { - // "$ref": "DatafeedstatusesCustomBatchRequest" + // "description": "Lists the configurations for datafeeds in your Merchant Center account.", + // "flatPath": "{merchantId}/datafeeds", + // "httpMethod": "GET", + // "id": "content.datafeeds.list", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "maxResults": { + // "description": "The maximum number of products to return in the response, used for paging.", + // "format": "uint32", + // "location": "query", + // "type": "integer" + // }, + // "merchantId": { + // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "pageToken": { + // "description": "The token returned by the previous request.", + // "location": "query", + // "type": "string" + // } // }, + // "path": "{merchantId}/datafeeds", // "response": { - // "$ref": "DatafeedstatusesCustomBatchResponse" + // "$ref": "DatafeedsListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -16043,102 +15321,105 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat } -// method id "content.datafeedstatuses.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 *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) 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 DatafeedstatusesGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "content.datafeeds.update": + +type DatafeedsUpdateCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a datafeed from your Merchant Center -// account. +// Update: Updates a datafeed configuration of your Merchant Center +// account. Any fields that are not provided are deleted from the +// resource. // // - datafeedId: The ID of the datafeed. // - merchantId: The ID of the account that manages the datafeed. This // account cannot be a multi-client account. -func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { - c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { + c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.datafeedId = datafeedId + c.datafeed = datafeed return c } -// Country sets the optional parameter "country": The country for which -// to get the datafeed status. If this parameter is provided then -// language must also be provided. Note that this parameter is required -// for feeds targeting multiple countries and languages, since a feed -// may have a different status for each target. -func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { - c.urlParams_.Set("country", country) - return c -} - -// Language sets the optional parameter "language": The language for -// which to get the datafeed status. If this parameter is provided then -// country must also be provided. Note that this parameter is required -// for feeds targeting multiple countries and languages, since a feed -// may have a different status for each target. -func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { - c.urlParams_.Set("language", language) +// DryRun sets the optional parameter "dryRun": Flag to simulate a +// request like in a live environment. If set to true, dry-run mode +// checks the validity of the request and returns errors (if any). +func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { + c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 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 *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { +func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { 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 *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { - 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 *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { +func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 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 *DatafeedstatusesGetCall) Header() http.Header { +func (c *DatafeedsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsUpdateCall) 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.datafeed) + 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, "{merchantId}/datafeedstatuses/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -16150,14 +15431,14 @@ func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.get" call. -// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *DatafeedStatus.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { +// Do executes the "content.datafeeds.update" call. +// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Datafeed.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16176,7 +15457,7 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedStatus{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16188,20 +15469,15 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta } return ret, nil // { - // "description": "Retrieves the status of a datafeed from your Merchant Center account.", - // "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", - // "httpMethod": "GET", - // "id": "content.datafeedstatuses.get", + // "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", + // "flatPath": "{merchantId}/datafeeds/{datafeedId}", + // "httpMethod": "PUT", + // "id": "content.datafeeds.update", // "parameterOrder": [ // "merchantId", // "datafeedId" // ], // "parameters": { - // "country": { - // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", - // "location": "query", - // "type": "string" - // }, // "datafeedId": { // "description": "The ID of the datafeed.", // "format": "uint64", @@ -16209,10 +15485,10 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta // "required": true, // "type": "string" // }, - // "language": { - // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + // "dryRun": { + // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "merchantId": { // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", @@ -16222,9 +15498,12 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta // "type": "string" // } // }, - // "path": "{merchantId}/datafeedstatuses/{datafeedId}", + // "path": "{merchantId}/datafeeds/{datafeedId}", + // "request": { + // "$ref": "Datafeed" + // }, // "response": { - // "$ref": "DatafeedStatus" + // "$ref": "Datafeed" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -16233,111 +15512,83 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta } -// method id "content.datafeedstatuses.list": - -type DatafeedstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the statuses of the datafeeds in your Merchant Center -// account. -// -// - merchantId: The ID of the account that manages the datafeeds. This -// account cannot be a multi-client account. -func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { - c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} +// method id "content.datafeedstatuses.custombatch": -// MaxResults sets the optional parameter "maxResults": The maximum -// number of products to return in the response, used for paging. -func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type DatafeedstatusesCustombatchCall struct { + s *APIService + datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The token returned -// by the previous request. -func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Custombatch: Gets multiple Merchant Center datafeed statuses in a +// single request. +func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { + c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 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 *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { +func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { 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 *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { - 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 *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { +func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 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 *DatafeedstatusesListCall) Header() http.Header { +func (c *DatafeedstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesCustombatchCall) 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.datafeedstatusescustombatchrequest) + 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, "{merchantId}/datafeedstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.list" call. -// Exactly one of *DatafeedstatusesListResponse or error will be +// Do executes the "content.datafeedstatuses.custombatch" call. +// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { +// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16356,7 +15607,7 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &DatafeedstatusesListResponse{ + ret := &DatafeedstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16368,150 +15619,141 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst } return ret, nil // { - // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", - // "flatPath": "{merchantId}/datafeedstatuses", - // "httpMethod": "GET", - // "id": "content.datafeedstatuses.list", - // "parameterOrder": [ - // "merchantId" - // ], - // "parameters": { - // "maxResults": { - // "description": "The maximum number of products to return in the response, used for paging.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "merchantId": { - // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", - // "format": "uint64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageToken": { - // "description": "The token returned by the previous request.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{merchantId}/datafeedstatuses", - // "response": { - // "$ref": "DatafeedstatusesListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// 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 *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) 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) - } + // "description": "Gets multiple Merchant Center datafeed statuses in a single request.", + // "flatPath": "datafeedstatuses/batch", + // "httpMethod": "POST", + // "id": "content.datafeedstatuses.custombatch", + // "parameterOrder": [], + // "parameters": {}, + // "path": "datafeedstatuses/batch", + // "request": { + // "$ref": "DatafeedstatusesCustomBatchRequest" + // }, + // "response": { + // "$ref": "DatafeedstatusesCustomBatchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + } -// method id "content.inventory.custombatch": +// method id "content.datafeedstatuses.get": -type InventoryCustombatchCall struct { - s *APIService - inventorycustombatchrequest *InventoryCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesGetCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves the status of a datafeed from your Merchant Center +// account. +// +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This +// account cannot be a multi-client account. +func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { + c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.datafeedId = datafeedId + return c } -// Custombatch: Updates price and availability for multiple products or -// stores in a single request. This operation does not update the -// expiration date of the products. -func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall { - c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.inventorycustombatchrequest = inventorycustombatchrequest +// Country sets the optional parameter "country": The country for which +// to get the datafeed status. If this parameter is provided then +// language must also be provided. Note that this parameter is required +// for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { + c.urlParams_.Set("country", country) return c } -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) +// Language sets the optional parameter "language": The language for +// which to get the datafeed status. If this parameter is provided then +// country must also be provided. Note that this parameter is required +// for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { + c.urlParams_.Set("language", language) 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 *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall { +func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 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 *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { + 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 *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall { +func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 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 *InventoryCustombatchCall) Header() http.Header { +func (c *DatafeedstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesGetCall) 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.inventorycustombatchrequest) - 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, "inventory/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.inventory.custombatch" call. -// Exactly one of *InventoryCustomBatchResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InventoryCustomBatchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.datafeedstatuses.get" call. +// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DatafeedStatus.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) { +func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16530,7 +15772,7 @@ func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryC if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &InventoryCustomBatchResponse{ + ret := &DatafeedStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16542,24 +15784,43 @@ func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryC } return ret, nil // { - // "description": "Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.", - // "flatPath": "inventory/batch", - // "httpMethod": "POST", - // "id": "content.inventory.custombatch", - // "parameterOrder": [], + // "description": "Retrieves the status of a datafeed from your Merchant Center account.", + // "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", + // "httpMethod": "GET", + // "id": "content.datafeedstatuses.get", + // "parameterOrder": [ + // "merchantId", + // "datafeedId" + // ], // "parameters": { - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "country": { + // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "datafeedId": { + // "description": "The ID of the datafeed.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "language": { + // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + // "location": "query", + // "type": "string" + // }, + // "merchantId": { + // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", + // "format": "uint64", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "inventory/batch", - // "request": { - // "$ref": "InventoryCustomBatchRequest" - // }, + // "path": "{merchantId}/datafeedstatuses/{datafeedId}", // "response": { - // "$ref": "InventoryCustomBatchResponse" + // "$ref": "DatafeedStatus" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -16568,109 +15829,111 @@ func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryC } -// method id "content.inventory.set": +// method id "content.datafeedstatuses.list": -type InventorySetCall struct { - s *APIService - merchantId uint64 - storeCode string - productId string - inventorysetrequest *InventorySetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Set: Updates price and availability of a product in your Merchant -// Center account. +// List: Lists the statuses of the datafeeds in your Merchant Center +// account. // -// - merchantId: The ID of the account that contains the product. This +// - merchantId: The ID of the account that manages the datafeeds. This // account cannot be a multi-client account. -// - productId: The REST ID of the product for which to update price and -// availability. -// - storeCode: The code of the store for which to update price and -// availability. Use `online` to update price and availability of an -// online product. -func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall { - c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { + c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.storeCode = storeCode - c.productId = productId - c.inventorysetrequest = inventorysetrequest return c } -// DryRun sets the optional parameter "dryRun": Flag to simulate a -// request like in a live environment. If set to true, dry-run mode -// checks the validity of the request and returns errors (if any). -func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall { - c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of products to return in the response, used for paging. +func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned +// by the previous request. +func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { + 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 *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall { +func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 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 *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { + 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 *InventorySetCall) Context(ctx context.Context) *InventorySetCall { +func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 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 *InventorySetCall) Header() http.Header { +func (c *DatafeedstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesListCall) 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.inventorysetrequest) - 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, "{merchantId}/inventory/{storeCode}/products/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "storeCode": c.storeCode, - "productId": c.productId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.inventory.set" call. -// Exactly one of *InventorySetResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InventorySetResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "content.datafeedstatuses.list" call. +// Exactly one of *DatafeedstatusesListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) { +func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16689,7 +15952,7 @@ func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetRespon if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &InventorySetResponse{ + ret := &DatafeedstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16701,47 +15964,36 @@ func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetRespon } return ret, nil // { - // "description": "Updates price and availability of a product in your Merchant Center account.", - // "flatPath": "{merchantId}/inventory/{storeCode}/products/{productId}", - // "httpMethod": "POST", - // "id": "content.inventory.set", + // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", + // "flatPath": "{merchantId}/datafeedstatuses", + // "httpMethod": "GET", + // "id": "content.datafeedstatuses.list", // "parameterOrder": [ - // "merchantId", - // "storeCode", - // "productId" + // "merchantId" // ], // "parameters": { - // "dryRun": { - // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", + // "maxResults": { + // "description": "The maximum number of products to return in the response, used for paging.", + // "format": "uint32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, // "merchantId": { - // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // }, - // "productId": { - // "description": "The REST ID of the product for which to update price and availability.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "storeCode": { - // "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", - // "location": "path", - // "required": true, + // "pageToken": { + // "description": "The token returned by the previous request.", + // "location": "query", // "type": "string" // } // }, - // "path": "{merchantId}/inventory/{storeCode}/products/{productId}", - // "request": { - // "$ref": "InventorySetRequest" - // }, + // "path": "{merchantId}/datafeedstatuses", // "response": { - // "$ref": "InventorySetResponse" + // "$ref": "DatafeedstatusesListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/content" @@ -16750,6 +16002,27 @@ func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetRespon } +// 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 *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) 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 "content.liasettings.custombatch": type LiasettingsCustombatchCall struct { diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index 54d63814dd0..c2d4f87e2ba 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -1953,7 +1953,7 @@ } } }, - "revision": "20220224", + "revision": "20220321", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -1979,7 +1979,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index 57fa90732fb..da6d91ac9d7 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -367,8 +367,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datacatalog/v1beta1/datacatalog-api.json b/datacatalog/v1beta1/datacatalog-api.json index 66bf5ea390e..4781a873b23 100644 --- a/datacatalog/v1beta1/datacatalog-api.json +++ b/datacatalog/v1beta1/datacatalog-api.json @@ -1808,7 +1808,7 @@ } } }, - "revision": "20211230", + "revision": "20220321", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -1834,7 +1834,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/datacatalog/v1beta1/datacatalog-gen.go b/datacatalog/v1beta1/datacatalog-gen.go index 53f06866301..dff36ecfa62 100644 --- a/datacatalog/v1beta1/datacatalog-gen.go +++ b/datacatalog/v1beta1/datacatalog-gen.go @@ -367,8 +367,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index e52f10590e2..a2b0b9ba7e9 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -277,7 +277,7 @@ ], "parameters": { "options.requestedPolicyVersion": { - "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + "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" @@ -361,7 +361,7 @@ "type": "string" }, "updateMask": { - "description": "Field mask is used to specify the fields that the update will overwrite in an instance resource. 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, all the supported fields (labels, options, and version currently) will be overwritten.", + "description": "Field mask is used to specify the fields that the update will overwrite in an instance resource. 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, the label field will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -637,7 +637,7 @@ } } }, - "revision": "20211028", + "revision": "20220316", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 1e01ba5bf32..865eec20967 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -2196,13 +2196,17 @@ func (r *ProjectsLocationsInstancesService) GetIamPolicy(resource string) *Proje } // OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The policy format version to be -// returned. Valid values are 0, 1, and 3. Requests specifying an -// invalid value will be rejected. Requests for policies with any -// conditional bindings must specify version 3. Policies without any -// conditional bindings may specify any valid value or leave the field -// unset. To learn which resources support conditions in their IAM -// policies, see the IAM documentation +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). func (c *ProjectsLocationsInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) @@ -2317,7 +2321,7 @@ func (c *ProjectsLocationsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "options.requestedPolicyVersion": { - // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + // "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" @@ -2589,8 +2593,7 @@ func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instanc // instance resource. 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, all the supported fields (labels, options, and version -// currently) will be overwritten. +// mask, the label field will be overwritten. func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -2703,7 +2706,7 @@ func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "updateMask": { - // "description": "Field mask is used to specify the fields that the update will overwrite in an instance resource. 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, all the supported fields (labels, options, and version currently) will be overwritten.", + // "description": "Field mask is used to specify the fields that the update will overwrite in an instance resource. 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, the label field will be overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index 19a05f55826..dddb819b105 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -305,7 +305,7 @@ ], "parameters": { "options.requestedPolicyVersion": { - "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + "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" @@ -522,11 +522,11 @@ "resources": { "dnsPeerings": { "methods": { - "add": { + "create": { "description": "Add DNS peering on the given resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:add", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings", "httpMethod": "POST", - "id": "datafusion.projects.locations.instances.dnsPeerings.add", + "id": "datafusion.projects.locations.instances.dnsPeerings.create", "parameterOrder": [ "parent" ], @@ -539,76 +539,73 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/dnsPeerings:add", + "path": "v1beta1/{+parent}/dnsPeerings", "request": { - "$ref": "AddDnsPeeringRequest" + "$ref": "DnsPeering" }, "response": { - "$ref": "AddDnsPeeringResponse" + "$ref": "DnsPeering" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "list": { - "description": "List DNS peering for a given resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:list", - "httpMethod": "GET", - "id": "datafusion.projects.locations.instances.dnsPeerings.list", + "delete": { + "description": "Remove DNS peering on the given resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings/{dnsPeeringsId}", + "httpMethod": "DELETE", + "id": "datafusion.projects.locations.instances.dnsPeerings.delete", "parameterOrder": [ - "parent" + "name" ], "parameters": { - "pageSize": { - "description": "The maximum number of items to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource on which dns peering will be listed.", + "name": { + "description": "Required. The name of the DNS peering zone to delete. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/dnsPeerings/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/dnsPeerings:list", + "path": "v1beta1/{+name}", "response": { - "$ref": "ListDnsPeeringsResponse" + "$ref": "Empty" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "remove": { - "description": "Remove DNS peering on the given resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:remove", - "httpMethod": "POST", - "id": "datafusion.projects.locations.instances.dnsPeerings.remove", + "list": { + "description": "List DNS peering for a given resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings", + "httpMethod": "GET", + "id": "datafusion.projects.locations.instances.dnsPeerings.list", "parameterOrder": [ "parent" ], "parameters": { + "pageSize": { + "description": "The maximum number of dns peerings to return. The service may return fewer than this value. If unspecified, at most 10 dns peerings will be returned. The maximum value is 50; values above 50 will be coerced to 50.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListDnsPeerings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDnsPeerings` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The resource on which DNS peering will be removed.", + "description": "Required. The parent, which owns this collection of dns peerings. Format: projects/{project}/locations/{location}/instances/{instance}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/dnsPeerings:remove", - "request": { - "$ref": "RemoveDnsPeeringRequest" - }, + "path": "v1beta1/{+parent}/dnsPeerings", "response": { - "$ref": "RemoveDnsPeeringResponse" + "$ref": "ListDnsPeeringsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -628,7 +625,7 @@ ], "parameters": { "options.requestedPolicyVersion": { - "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + "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" @@ -933,7 +930,7 @@ } } }, - "revision": "20211028", + "revision": "20220316", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -957,23 +954,6 @@ }, "type": "object" }, - "AddDnsPeeringRequest": { - "description": "Request message to create dns peering.", - "id": "AddDnsPeeringRequest", - "properties": { - "dnsPeering": { - "$ref": "DnsPeering", - "description": "Dns peering config." - } - }, - "type": "object" - }, - "AddDnsPeeringResponse": { - "description": "Response message for set dns peering method.", - "id": "AddDnsPeeringResponse", - "properties": {}, - "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", @@ -1070,7 +1050,11 @@ "type": "string" }, "domain": { - "description": "Required. Name of the dns.", + "description": "Required. The dns name suffix of the zone.", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the dns peering zone. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}", "type": "string" }, "targetNetwork": { @@ -1080,10 +1064,6 @@ "targetProject": { "description": "Optional. Optional target project to which dns peering should happen.", "type": "string" - }, - "zone": { - "description": "Required. Name of the zone.", - "type": "string" } }, "type": "object" @@ -1345,18 +1325,18 @@ "type": "object" }, "ListDnsPeeringsResponse": { - "description": "List dns peering response.", + "description": "Response message for list DNS peerings.", "id": "ListDnsPeeringsResponse", "properties": { "dnsPeerings": { - "description": "List of dns peering configs.", + "description": "List of dns peering.", "items": { "$ref": "DnsPeering" }, "type": "array" }, "nextPageToken": { - "description": "Token to retrieve the next page of results or empty if there are no more results in the list.", + "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" } }, @@ -1608,23 +1588,6 @@ }, "type": "object" }, - "RemoveDnsPeeringRequest": { - "description": "Request message to remove dns peering.", - "id": "RemoveDnsPeeringRequest", - "properties": { - "zone": { - "description": "Required. The zone to be removed.", - "type": "string" - } - }, - "type": "object" - }, - "RemoveDnsPeeringResponse": { - "description": "Response message for set dns peering method.", - "id": "RemoveDnsPeeringResponse", - "properties": {}, - "type": "object" - }, "RemoveIamPolicyRequest": { "description": "Request message for RemoveIamPolicy method.", "id": "RemoveIamPolicyRequest", diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index c6045deabb2..a09280cc42d 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -254,41 +254,6 @@ func (s *Accelerator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AddDnsPeeringRequest: Request message to create dns peering. -type AddDnsPeeringRequest struct { - // DnsPeering: Dns peering config. - DnsPeering *DnsPeering `json:"dnsPeering,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DnsPeering") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DnsPeering") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddDnsPeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod AddDnsPeeringRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddDnsPeeringResponse: Response message for set dns peering method. -type AddDnsPeeringResponse struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -501,9 +466,14 @@ type DnsPeering struct { // Description: Optional. Optional description of the dns zone. Description string `json:"description,omitempty"` - // Domain: Required. Name of the dns. + // Domain: Required. The dns name suffix of the zone. Domain string `json:"domain,omitempty"` + // Name: Required. The resource name of the dns peering zone. Format: + // projects/{project}/locations/{location}/instances/{instance}/dnsPeerin + // gs/{dns_peering} + Name string `json:"name,omitempty"` + // TargetNetwork: Optional. Optional target network to which dns peering // should happen. TargetNetwork string `json:"targetNetwork,omitempty"` @@ -512,8 +482,9 @@ type DnsPeering struct { // should happen. TargetProject string `json:"targetProject,omitempty"` - // Zone: Required. Name of the zone. - Zone string `json:"zone,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with @@ -848,13 +819,14 @@ func (s *ListAvailableVersionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListDnsPeeringsResponse: List dns peering response. +// ListDnsPeeringsResponse: Response message for list DNS peerings. type ListDnsPeeringsResponse struct { - // DnsPeerings: List of dns peering configs. + // DnsPeerings: List of dns peering. DnsPeerings []*DnsPeering `json:"dnsPeerings,omitempty"` - // NextPageToken: Token to retrieve the next page of results or empty if - // there are no more results in the list. + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1380,42 +1352,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RemoveDnsPeeringRequest: Request message to remove dns peering. -type RemoveDnsPeeringRequest struct { - // Zone: Required. The zone to be removed. - Zone string `json:"zone,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Zone") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Zone") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RemoveDnsPeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod RemoveDnsPeeringRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RemoveDnsPeeringResponse: Response message for set dns peering -// method. -type RemoveDnsPeeringResponse struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - // RemoveIamPolicyRequest: Request message for RemoveIamPolicy method. type RemoveIamPolicyRequest struct { } @@ -2605,13 +2541,17 @@ func (r *ProjectsLocationsInstancesService) GetIamPolicy(resource string) *Proje } // OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The policy format version to be -// returned. Valid values are 0, 1, and 3. Requests specifying an -// invalid value will be rejected. Requests for policies with any -// conditional bindings must specify version 3. Policies without any -// conditional bindings may specify any valid value or leave the field -// unset. To learn which resources support conditions in their IAM -// policies, see the IAM documentation +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). func (c *ProjectsLocationsInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) @@ -2726,7 +2666,7 @@ func (c *ProjectsLocationsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "options.requestedPolicyVersion": { - // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + // "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" @@ -3719,31 +3659,31 @@ func (c *ProjectsLocationsInstancesUpgradeCall) Do(opts ...googleapi.CallOption) } -// method id "datafusion.projects.locations.instances.dnsPeerings.add": +// method id "datafusion.projects.locations.instances.dnsPeerings.create": -type ProjectsLocationsInstancesDnsPeeringsAddCall struct { - s *Service - parent string - adddnspeeringrequest *AddDnsPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesDnsPeeringsCreateCall struct { + s *Service + parent string + dnspeering *DnsPeering + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Add: Add DNS peering on the given resource. +// Create: Add DNS peering on the given resource. // // - parent: The resource on which DNS peering will be created. -func (r *ProjectsLocationsInstancesDnsPeeringsService) Add(parent string, adddnspeeringrequest *AddDnsPeeringRequest) *ProjectsLocationsInstancesDnsPeeringsAddCall { - c := &ProjectsLocationsInstancesDnsPeeringsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInstancesDnsPeeringsService) Create(parent string, dnspeering *DnsPeering) *ProjectsLocationsInstancesDnsPeeringsCreateCall { + c := &ProjectsLocationsInstancesDnsPeeringsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.adddnspeeringrequest = adddnspeeringrequest + c.dnspeering = dnspeering 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 *ProjectsLocationsInstancesDnsPeeringsAddCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsAddCall { +func (c *ProjectsLocationsInstancesDnsPeeringsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3751,21 +3691,21 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsInstancesDnsPeeringsAddCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsAddCall { +func (c *ProjectsLocationsInstancesDnsPeeringsCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsCreateCall { 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 *ProjectsLocationsInstancesDnsPeeringsAddCall) Header() http.Header { +func (c *ProjectsLocationsInstancesDnsPeeringsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesDnsPeeringsCreateCall) 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_ { @@ -3773,14 +3713,14 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddnspeeringrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.dnspeering) 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}/dnsPeerings:add") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dnsPeerings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3793,14 +3733,14 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datafusion.projects.locations.instances.dnsPeerings.add" call. -// Exactly one of *AddDnsPeeringResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddDnsPeeringResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Do(opts ...googleapi.CallOption) (*AddDnsPeeringResponse, error) { +// Do executes the "datafusion.projects.locations.instances.dnsPeerings.create" call. +// Exactly one of *DnsPeering or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DnsPeering.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesDnsPeeringsCreateCall) Do(opts ...googleapi.CallOption) (*DnsPeering, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3819,7 +3759,7 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AddDnsPeeringResponse{ + ret := &DnsPeering{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3832,9 +3772,9 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Do(opts ...googleapi.Call return ret, nil // { // "description": "Add DNS peering on the given resource.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:add", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings", // "httpMethod": "POST", - // "id": "datafusion.projects.locations.instances.dnsPeerings.add", + // "id": "datafusion.projects.locations.instances.dnsPeerings.create", // "parameterOrder": [ // "parent" // ], @@ -3847,12 +3787,12 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Do(opts ...googleapi.Call // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/dnsPeerings:add", + // "path": "v1beta1/{+parent}/dnsPeerings", // "request": { - // "$ref": "AddDnsPeeringRequest" + // "$ref": "DnsPeering" // }, // "response": { - // "$ref": "AddDnsPeeringResponse" + // "$ref": "DnsPeering" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3861,110 +3801,83 @@ func (c *ProjectsLocationsInstancesDnsPeeringsAddCall) Do(opts ...googleapi.Call } -// method id "datafusion.projects.locations.instances.dnsPeerings.list": +// method id "datafusion.projects.locations.instances.dnsPeerings.delete": -type ProjectsLocationsInstancesDnsPeeringsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesDnsPeeringsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List DNS peering for a given resource. +// Delete: Remove DNS peering on the given resource. // -// - parent: The resource on which dns peering will be listed. -func (r *ProjectsLocationsInstancesDnsPeeringsService) List(parent string) *ProjectsLocationsInstancesDnsPeeringsListCall { - c := &ProjectsLocationsInstancesDnsPeeringsListCall{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. -func (c *ProjectsLocationsInstancesDnsPeeringsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesDnsPeeringsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value to use if there are additional results to -// retrieve for this list request. -func (c *ProjectsLocationsInstancesDnsPeeringsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesDnsPeeringsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the DNS peering zone to delete. Format: +// projects/{project}/locations/{location}/instances/{instance}/dnsPeer +// ings/{dns_peering}. +func (r *ProjectsLocationsInstancesDnsPeeringsService) Delete(name string) *ProjectsLocationsInstancesDnsPeeringsDeleteCall { + c := &ProjectsLocationsInstancesDnsPeeringsDeleteCall{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 *ProjectsLocationsInstancesDnsPeeringsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsListCall { +func (c *ProjectsLocationsInstancesDnsPeeringsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsDeleteCall { 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 *ProjectsLocationsInstancesDnsPeeringsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesDnsPeeringsListCall { - 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 *ProjectsLocationsInstancesDnsPeeringsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsListCall { +func (c *ProjectsLocationsInstancesDnsPeeringsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsDeleteCall { 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 *ProjectsLocationsInstancesDnsPeeringsListCall) Header() http.Header { +func (c *ProjectsLocationsInstancesDnsPeeringsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesDnsPeeringsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesDnsPeeringsDeleteCall) 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/{+parent}/dnsPeerings:list") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datafusion.projects.locations.instances.dnsPeerings.list" call. -// Exactly one of *ListDnsPeeringsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListDnsPeeringsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Do(opts ...googleapi.CallOption) (*ListDnsPeeringsResponse, error) { +// Do executes the "datafusion.projects.locations.instances.dnsPeerings.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 *ProjectsLocationsInstancesDnsPeeringsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3983,7 +3896,7 @@ func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListDnsPeeringsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3995,36 +3908,25 @@ func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "List DNS peering for a given resource.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:list", - // "httpMethod": "GET", - // "id": "datafusion.projects.locations.instances.dnsPeerings.list", + // "description": "Remove DNS peering on the given resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings/{dnsPeeringsId}", + // "httpMethod": "DELETE", + // "id": "datafusion.projects.locations.instances.dnsPeerings.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of items to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The next_page_token value to use if there are additional results to retrieve for this list request.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource on which dns peering will be listed.", + // "name": { + // "description": "Required. The name of the DNS peering zone to delete. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/dnsPeerings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/dnsPeerings:list", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListDnsPeeringsResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4033,91 +3935,98 @@ func (c *ProjectsLocationsInstancesDnsPeeringsListCall) 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 *ProjectsLocationsInstancesDnsPeeringsListCall) Pages(ctx context.Context, f func(*ListDnsPeeringsResponse) 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 "datafusion.projects.locations.instances.dnsPeerings.remove": +// method id "datafusion.projects.locations.instances.dnsPeerings.list": -type ProjectsLocationsInstancesDnsPeeringsRemoveCall struct { - s *Service - parent string - removednspeeringrequest *RemoveDnsPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInstancesDnsPeeringsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Remove: Remove DNS peering on the given resource. +// List: List DNS peering for a given resource. // -// - parent: The resource on which DNS peering will be removed. -func (r *ProjectsLocationsInstancesDnsPeeringsService) Remove(parent string, removednspeeringrequest *RemoveDnsPeeringRequest) *ProjectsLocationsInstancesDnsPeeringsRemoveCall { - c := &ProjectsLocationsInstancesDnsPeeringsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns this collection of dns peerings. +// Format: +// projects/{project}/locations/{location}/instances/{instance}. +func (r *ProjectsLocationsInstancesDnsPeeringsService) List(parent string) *ProjectsLocationsInstancesDnsPeeringsListCall { + c := &ProjectsLocationsInstancesDnsPeeringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.removednspeeringrequest = removednspeeringrequest + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of dns peerings to return. The service may return fewer than this +// value. If unspecified, at most 10 dns peerings will be returned. The +// maximum value is 50; values above 50 will be coerced to 50. +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesDnsPeeringsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDnsPeerings` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListDnsPeerings` must match the call that provided the +// page token. +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesDnsPeeringsListCall { + 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 *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsRemoveCall { +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDnsPeeringsListCall { 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 *ProjectsLocationsInstancesDnsPeeringsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesDnsPeeringsListCall { + 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 *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsRemoveCall { +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesDnsPeeringsListCall { 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 *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Header() http.Header { +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) 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.removednspeeringrequest) - 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, "v1beta1/{+parent}/dnsPeerings:remove") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dnsPeerings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4128,14 +4037,14 @@ func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "datafusion.projects.locations.instances.dnsPeerings.remove" call. -// Exactly one of *RemoveDnsPeeringResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *RemoveDnsPeeringResponse.ServerResponse.Header or (if a response was +// Do executes the "datafusion.projects.locations.instances.dnsPeerings.list" call. +// Exactly one of *ListDnsPeeringsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDnsPeeringsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Do(opts ...googleapi.CallOption) (*RemoveDnsPeeringResponse, error) { +func (c *ProjectsLocationsInstancesDnsPeeringsListCall) Do(opts ...googleapi.CallOption) (*ListDnsPeeringsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4154,7 +4063,7 @@ func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &RemoveDnsPeeringResponse{ + ret := &ListDnsPeeringsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4166,28 +4075,36 @@ func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Remove DNS peering on the given resource.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings:remove", - // "httpMethod": "POST", - // "id": "datafusion.projects.locations.instances.dnsPeerings.remove", + // "description": "List DNS peering for a given resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/dnsPeerings", + // "httpMethod": "GET", + // "id": "datafusion.projects.locations.instances.dnsPeerings.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of dns peerings to return. The service may return fewer than this value. If unspecified, at most 10 dns peerings will be returned. The maximum value is 50; values above 50 will be coerced to 50.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListDnsPeerings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDnsPeerings` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The resource on which DNS peering will be removed.", + // "description": "Required. The parent, which owns this collection of dns peerings. Format: projects/{project}/locations/{location}/instances/{instance}", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/dnsPeerings:remove", - // "request": { - // "$ref": "RemoveDnsPeeringRequest" - // }, + // "path": "v1beta1/{+parent}/dnsPeerings", // "response": { - // "$ref": "RemoveDnsPeeringResponse" + // "$ref": "ListDnsPeeringsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4196,6 +4113,27 @@ func (c *ProjectsLocationsInstancesDnsPeeringsRemoveCall) Do(opts ...googleapi.C } +// 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 *ProjectsLocationsInstancesDnsPeeringsListCall) Pages(ctx context.Context, f func(*ListDnsPeeringsResponse) 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 "datafusion.projects.locations.instances.namespaces.getIamPolicy": type ProjectsLocationsInstancesNamespacesGetIamPolicyCall struct { @@ -4221,13 +4159,17 @@ func (r *ProjectsLocationsInstancesNamespacesService) GetIamPolicy(resource stri } // OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The policy format version to be -// returned. Valid values are 0, 1, and 3. Requests specifying an -// invalid value will be rejected. Requests for policies with any -// conditional bindings must specify version 3. Policies without any -// conditional bindings may specify any valid value or leave the field -// unset. To learn which resources support conditions in their IAM -// policies, see the IAM documentation +// "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 *ProjectsLocationsInstancesNamespacesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesNamespacesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) @@ -4342,7 +4284,7 @@ func (c *ProjectsLocationsInstancesNamespacesGetIamPolicyCall) Do(opts ...google // ], // "parameters": { // "options.requestedPolicyVersion": { - // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value 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).", + // "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" diff --git a/datalabeling/v1beta1/datalabeling-api.json b/datalabeling/v1beta1/datalabeling-api.json index 7329e87e6fa..f0ff7b924a5 100644 --- a/datalabeling/v1beta1/datalabeling-api.json +++ b/datalabeling/v1beta1/datalabeling-api.json @@ -1596,7 +1596,7 @@ } } }, - "revision": "20210809", + "revision": "20220319", "rootUrl": "https://datalabeling.googleapis.com/", "schemas": { "GoogleCloudDatalabelingV1alpha1CreateInstructionMetadata": { @@ -5618,7 +5618,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/datalabeling/v1beta1/datalabeling-gen.go b/datalabeling/v1beta1/datalabeling-gen.go index 0145ebf2e4d..66932d19ef3 100644 --- a/datalabeling/v1beta1/datalabeling-gen.go +++ b/datalabeling/v1beta1/datalabeling-gen.go @@ -7941,8 +7941,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 2c88d94fa27..b693f3f3aa3 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20220216", + "revision": "20220321", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1436,7 +1436,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 3318b39a1ed..d5a9885bbb2 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -730,8 +730,7 @@ func (s *DumpFlags) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index c22cf9e0b7b..822d1cd28d4 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20211201", + "revision": "20220321", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1377,7 +1377,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index 3e21426b808..fc81defbdfc 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -653,8 +653,7 @@ func (s *DatabaseType) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datapipelines/v1/datapipelines-api.json b/datapipelines/v1/datapipelines-api.json index 5745b997f73..ed9f082f334 100644 --- a/datapipelines/v1/datapipelines-api.json +++ b/datapipelines/v1/datapipelines-api.json @@ -371,7 +371,7 @@ } } }, - "revision": "20220103", + "revision": "20220319", "rootUrl": "https://datapipelines.googleapis.com/", "schemas": { "GoogleCloudDatapipelinesV1DataflowJobDetails": { @@ -986,7 +986,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/datapipelines/v1/datapipelines-gen.go b/datapipelines/v1/datapipelines-gen.go index 43c67318de5..45789422e6d 100644 --- a/datapipelines/v1/datapipelines-gen.go +++ b/datapipelines/v1/datapipelines-gen.go @@ -1076,8 +1076,7 @@ func (s *GoogleCloudDatapipelinesV1Workload) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index 65f85a04810..90746f11491 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -2444,7 +2444,7 @@ } } }, - "revision": "20220201", + "revision": "20220324", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3167,7 +3167,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "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" diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 22efc4224a4..4acfb81cb8f 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -1375,8 +1375,7 @@ func (s *DiskConfig) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index b84957c2696..0a3e28ccace 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -626,7 +626,7 @@ } } }, - "revision": "20220207", + "revision": "20220319", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -773,7 +773,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1785,7 +1785,10 @@ "GREATER_THAN", "GREATER_THAN_OR_EQUAL", "EQUAL", - "HAS_ANCESTOR" + "IN", + "NOT_EQUAL", + "HAS_ANCESTOR", + "NOT_IN" ], "enumDescriptions": [ "Unspecified. This value must not be used.", @@ -1794,7 +1797,10 @@ "The given `property` is greater than the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is greater than or equal to the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is equal to the given `value`.", - "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key." + "The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.", + "The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.", + "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.", + "The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`." ], "type": "string" }, diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index ea3fdc9e706..d4d32db2126 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -463,8 +463,7 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2224,8 +2223,19 @@ type PropertyFilter struct { // equal to the given `value`. Requires: * That `property` comes first // in `order_by`. // "EQUAL" - The given `property` is equal to the given `value`. + // "IN" - The given `property` is equal to at least one value in the + // given array. Requires: * That `value` is a non-empty `ArrayValue` + // with at most 10 values. * No other `IN` or `NOT_IN` is in the same + // query. + // "NOT_EQUAL" - The given `property` is not equal to the given + // `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same + // query. * That `property` comes first in the `order_by`. // "HAS_ANCESTOR" - Limit the result set to the given entity and its // descendants. Requires: * That `value` is an entity key. + // "NOT_IN" - The value of the `property` is not in the given array. + // Requires: * That `value` is a non-empty `ArrayValue` with at most 10 + // values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. + // * That `field` comes first in the `order_by`. Op string `json:"op,omitempty"` // Property: The property to filter by. diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index 9923c304d3f..ccd9fd165db 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -308,7 +308,7 @@ } } }, - "revision": "20220207", + "revision": "20220319", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -1260,7 +1260,10 @@ "GREATER_THAN", "GREATER_THAN_OR_EQUAL", "EQUAL", - "HAS_ANCESTOR" + "IN", + "NOT_EQUAL", + "HAS_ANCESTOR", + "NOT_IN" ], "enumDescriptions": [ "Unspecified. This value must not be used.", @@ -1269,7 +1272,10 @@ "The given `property` is greater than the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is greater than or equal to the given `value`. Requires: * That `property` comes first in `order_by`.", "The given `property` is equal to the given `value`.", - "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key." + "The given `property` is equal to at least one value in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN` or `NOT_IN` is in the same query.", + "The given `property` is not equal to the given `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes first in the `order_by`.", + "Limit the result set to the given entity and its descendants. Requires: * That `value` is an entity key.", + "The value of the `property` is not in the given array. Requires: * That `value` is a non-empty `ArrayValue` with at most 10 values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field` comes first in the `order_by`." ], "type": "string" }, diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index cace06f9f48..3a5347f3425 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -1840,8 +1840,19 @@ type PropertyFilter struct { // equal to the given `value`. Requires: * That `property` comes first // in `order_by`. // "EQUAL" - The given `property` is equal to the given `value`. + // "IN" - The given `property` is equal to at least one value in the + // given array. Requires: * That `value` is a non-empty `ArrayValue` + // with at most 10 values. * No other `IN` or `NOT_IN` is in the same + // query. + // "NOT_EQUAL" - The given `property` is not equal to the given + // `value`. Requires: * No other `NOT_EQUAL` or `NOT_IN` is in the same + // query. * That `property` comes first in the `order_by`. // "HAS_ANCESTOR" - Limit the result set to the given entity and its // descendants. Requires: * That `value` is an entity key. + // "NOT_IN" - The value of the `property` is not in the given array. + // Requires: * That `value` is a non-empty `ArrayValue` with at most 10 + // values. * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. + // * That `field` comes first in the `order_by`. Op string `json:"op,omitempty"` // Property: The property to filter by. diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 9c0dca14b1b..eb1b95b1239 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1217,7 +1217,7 @@ } } }, - "revision": "20220302", + "revision": "20220316", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2110,6 +2110,12 @@ }, "type": "object" }, + "OracleDropLargeObjects": { + "description": "Configuration to drop large object values.", + "id": "OracleDropLargeObjects", + "properties": {}, + "type": "object" + }, "OracleObjectIdentifier": { "description": "Oracle data source object identifier.", "id": "OracleObjectIdentifier", @@ -2196,6 +2202,10 @@ "description": "Oracle data source configuration", "id": "OracleSourceConfig", "properties": { + "dropLargeObjects": { + "$ref": "OracleDropLargeObjects", + "description": "Drop large object values." + }, "excludeObjects": { "$ref": "OracleRdbms", "description": "Oracle objects to exclude from the stream." diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 264d8d00acb..f14974ee72a 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -1589,6 +1589,10 @@ func (s *OracleColumn) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OracleDropLargeObjects: Configuration to drop large object values. +type OracleDropLargeObjects struct { +} + // OracleObjectIdentifier: Oracle data source object identifier. type OracleObjectIdentifier struct { // Schema: Required. The schema name. @@ -1726,13 +1730,16 @@ func (s *OracleSchema) MarshalJSON() ([]byte, error) { // OracleSourceConfig: Oracle data source configuration type OracleSourceConfig struct { + // DropLargeObjects: Drop large object values. + DropLargeObjects *OracleDropLargeObjects `json:"dropLargeObjects,omitempty"` + // ExcludeObjects: Oracle objects to exclude from the stream. ExcludeObjects *OracleRdbms `json:"excludeObjects,omitempty"` // IncludeObjects: Oracle objects to include in the stream. IncludeObjects *OracleRdbms `json:"includeObjects,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExcludeObjects") to + // ForceSendFields is a list of field names (e.g. "DropLargeObjects") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1740,7 +1747,7 @@ type OracleSourceConfig struct { // 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 + // NullFields is a list of field names (e.g. "DropLargeObjects") to // include in API requests with the JSON null value. By default, 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/datastream/v1alpha1/datastream-api.json b/datastream/v1alpha1/datastream-api.json index 120633b3ace..83cd1e9c100 100644 --- a/datastream/v1alpha1/datastream-api.json +++ b/datastream/v1alpha1/datastream-api.json @@ -1196,7 +1196,7 @@ } } }, - "revision": "20220112", + "revision": "20220316", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2115,6 +2115,12 @@ }, "type": "object" }, + "OracleDropLargeObjects": { + "description": "Configuration to drop large object values.", + "id": "OracleDropLargeObjects", + "properties": {}, + "type": "object" + }, "OracleObjectIdentifier": { "description": "Oracle data source object identifier.", "id": "OracleObjectIdentifier", @@ -2205,6 +2211,10 @@ "$ref": "OracleRdbms", "description": "Oracle objects to include in the stream." }, + "dropLargeObjects": { + "$ref": "OracleDropLargeObjects", + "description": "Drop large object values." + }, "rejectlist": { "$ref": "OracleRdbms", "description": "Oracle objects to exclude from the stream." diff --git a/datastream/v1alpha1/datastream-gen.go b/datastream/v1alpha1/datastream-gen.go index 0bec3c19f1c..77efe2f43d2 100644 --- a/datastream/v1alpha1/datastream-gen.go +++ b/datastream/v1alpha1/datastream-gen.go @@ -1595,6 +1595,10 @@ func (s *OracleColumn) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OracleDropLargeObjects: Configuration to drop large object values. +type OracleDropLargeObjects struct { +} + // OracleObjectIdentifier: Oracle data source object identifier. type OracleObjectIdentifier struct { // Schema: Required. The schema name. @@ -1735,6 +1739,9 @@ type OracleSourceConfig struct { // Allowlist: Oracle objects to include in the stream. Allowlist *OracleRdbms `json:"allowlist,omitempty"` + // DropLargeObjects: Drop large object values. + DropLargeObjects *OracleDropLargeObjects `json:"dropLargeObjects,omitempty"` + // Rejectlist: Oracle objects to exclude from the stream. Rejectlist *OracleRdbms `json:"rejectlist,omitempty"` diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json index 7dba2e5c5aa..06b4bddfdad 100644 --- a/dialogflow/v2/dialogflow-api.json +++ b/dialogflow/v2/dialogflow-api.json @@ -8077,7 +8077,7 @@ } } }, - "revision": "20220309", + "revision": "20220314", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -11667,14 +11667,14 @@ "description": "Indicates the parameters of DTMF." }, "endUserSuggestionResults": { - "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.", + "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config. Same as human_agent_suggestion_results, any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.", "items": { "$ref": "GoogleCloudDialogflowV2SuggestionResult" }, "type": "array" }, "humanAgentSuggestionResults": { - "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.", + "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config. Note that any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.", "items": { "$ref": "GoogleCloudDialogflowV2SuggestionResult" }, diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go index ce98b62f744..26c7fde26ba 100644 --- a/dialogflow/v2/dialogflow-gen.go +++ b/dialogflow/v2/dialogflow-gen.go @@ -7566,13 +7566,21 @@ type GoogleCloudDialogflowV2AnalyzeContentResponse struct { // EndUserSuggestionResults: The suggestions for end user. The order is // the same as // HumanAgentAssistantConfig.SuggestionConfig.feature_configs of - // HumanAgentAssistantConfig.end_user_suggestion_config. + // HumanAgentAssistantConfig.end_user_suggestion_config. Same as + // human_agent_suggestion_results, any failure of Agent Assist features + // will not lead to the overall failure of an AnalyzeContent API call. + // Instead, the features will fail silently with the error field set in + // the corresponding SuggestionResult. EndUserSuggestionResults []*GoogleCloudDialogflowV2SuggestionResult `json:"endUserSuggestionResults,omitempty"` // HumanAgentSuggestionResults: The suggestions for most recent human // agent. The order is the same as // HumanAgentAssistantConfig.SuggestionConfig.feature_configs of - // HumanAgentAssistantConfig.human_agent_suggestion_config. + // HumanAgentAssistantConfig.human_agent_suggestion_config. Note that + // any failure of Agent Assist features will not lead to the overall + // failure of an AnalyzeContent API call. Instead, the features will + // fail silently with the error field set in the corresponding + // SuggestionResult. HumanAgentSuggestionResults []*GoogleCloudDialogflowV2SuggestionResult `json:"humanAgentSuggestionResults,omitempty"` // Message: Message analyzed by CCAI. diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 29a92e1ce1d..65f8d3d47b7 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -7431,7 +7431,7 @@ } } }, - "revision": "20220309", + "revision": "20220314", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -13176,14 +13176,14 @@ "description": "Indicates the parameters of DTMF." }, "endUserSuggestionResults": { - "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.", + "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config. Same as human_agent_suggestion_results, any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.", "items": { "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" }, "type": "array" }, "humanAgentSuggestionResults": { - "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.", + "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config. Note that any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.", "items": { "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" }, diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 96ae8c5d722..7df52a2eae4 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -11080,13 +11080,21 @@ type GoogleCloudDialogflowV2beta1AnalyzeContentResponse struct { // EndUserSuggestionResults: The suggestions for end user. The order is // the same as // HumanAgentAssistantConfig.SuggestionConfig.feature_configs of - // HumanAgentAssistantConfig.end_user_suggestion_config. + // HumanAgentAssistantConfig.end_user_suggestion_config. Same as + // human_agent_suggestion_results, any failure of Agent Assist features + // will not lead to the overall failure of an AnalyzeContent API call. + // Instead, the features will fail silently with the error field set in + // the corresponding SuggestionResult. EndUserSuggestionResults []*GoogleCloudDialogflowV2beta1SuggestionResult `json:"endUserSuggestionResults,omitempty"` // HumanAgentSuggestionResults: The suggestions for most recent human // agent. The order is the same as // HumanAgentAssistantConfig.SuggestionConfig.feature_configs of - // HumanAgentAssistantConfig.human_agent_suggestion_config. + // HumanAgentAssistantConfig.human_agent_suggestion_config. Note that + // any failure of Agent Assist features will not lead to the overall + // failure of an AnalyzeContent API call. Instead, the features will + // fail silently with the error field set in the corresponding + // SuggestionResult. HumanAgentSuggestionResults []*GoogleCloudDialogflowV2beta1SuggestionResult `json:"humanAgentSuggestionResults,omitempty"` // Message: Output only. Message analyzed by CCAI. diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index 4a3a5bf12ab..aa25e9e80e5 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -3820,7 +3820,7 @@ } } }, - "revision": "20220309", + "revision": "20220314", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -6003,7 +6003,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "resolvedInput": { @@ -6317,7 +6317,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "payload": { @@ -6391,7 +6391,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "responseMessages": { @@ -7651,7 +7651,7 @@ "id": "GoogleCloudDialogflowCxV3WebhookGenericWebService", "properties": { "allowedCaCerts": { - "description": "Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\")", + "description": "Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\") ```", "items": { "format": "byte", "type": "string" diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index c2f5bd91202..5cfdaf734f3 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -4597,13 +4597,13 @@ type GoogleCloudDialogflowCxV3Match struct { // Parameters: The collection of parameters extracted from the query. // Depending on your protocol or client library language, this is a map, // associative array, symbol table, dictionary, or JSON object composed - // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // of a collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // ResolvedInput: Final text input which was matched during MatchIntent. @@ -5171,13 +5171,13 @@ type GoogleCloudDialogflowCxV3QueryParameters struct { // in the agent with the following format: $session.params.parameter-id. // Depending on your protocol or client library language, this is a map, // associative array, symbol table, dictionary, or JSON object composed - // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // of a collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Payload: This field can be used to pass custom data into the webhook @@ -5278,13 +5278,13 @@ type GoogleCloudDialogflowCxV3QueryResult struct { // Parameters: The collected session parameters. Depending on your // protocol or client library language, this is a map, associative // array, symbol table, dictionary, or JSON object composed of a - // collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // ResponseMessages: The list of rich messages returned to the client. @@ -7655,9 +7655,10 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // Dialogflow will use Google's default trust store to verify // certificates. N.B. Make sure the HTTPS server certificates are signed // with "subject alt name". For instance a certificate can be - // self-signed using the following command, openssl x509 -req -days 200 - // -in example.com.csr \ -signkey example.com.key \ -out example.com.crt - // \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + // self-signed using the following command, ``` openssl x509 -req -days + // 200 -in example.com.csr \ -signkey example.com.key \ -out + // example.com.crt \ -extfile <(printf + // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` // Password: The password for HTTP Basic authentication. diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index c30a437775e..c1b182c4d94 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -3820,7 +3820,7 @@ } } }, - "revision": "20220309", + "revision": "20220314", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -7695,7 +7695,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "resolvedInput": { @@ -8009,7 +8009,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "payload": { @@ -8083,7 +8083,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "description": "The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.", "type": "object" }, "responseMessages": { @@ -9343,7 +9343,7 @@ "id": "GoogleCloudDialogflowCxV3beta1WebhookGenericWebService", "properties": { "allowedCaCerts": { - "description": "Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\")", + "description": "Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \u003c(printf \"\\nsubjectAltName='DNS:www.example.com'\") ```", "items": { "format": "byte", "type": "string" diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index 92207c11e3c..d8edb107eb5 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -7824,13 +7824,13 @@ type GoogleCloudDialogflowCxV3beta1Match struct { // Parameters: The collection of parameters extracted from the query. // Depending on your protocol or client library language, this is a map, // associative array, symbol table, dictionary, or JSON object composed - // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // of a collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // ResolvedInput: Final text input which was matched during MatchIntent. @@ -8400,13 +8400,13 @@ type GoogleCloudDialogflowCxV3beta1QueryParameters struct { // in the agent with the following format: $session.params.parameter-id. // Depending on your protocol or client library language, this is a map, // associative array, symbol table, dictionary, or JSON object composed - // of a collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // of a collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Payload: This field can be used to pass custom data into the webhook @@ -8507,13 +8507,13 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // Parameters: The collected session parameters. Depending on your // protocol or client library language, this is a map, associative // array, symbol table, dictionary, or JSON object composed of a - // collection of (MapKey, MapValue) pairs: - MapKey type: string - - // MapKey value: parameter name - MapValue type: - If parameter's entity - // type is a composite entity: map - Else: depending on parameter value - // type, could be one of string, number, boolean, null, list or map - - // MapValue value: - If parameter's entity type is a composite entity: - // map from composite entity property names to property values - Else: - // parameter value + // collection of (MapKey, MapValue) pairs: * MapKey type: string * + // MapKey value: parameter name * MapValue type: If parameter's entity + // type is a composite entity then use map, otherwise, depending on the + // parameter value type, it could be one of string, number, boolean, + // null, list or map. * MapValue value: If parameter's entity type is a + // composite entity then use map from composite entity property names to + // property values, otherwise, use parameter value. Parameters googleapi.RawMessage `json:"parameters,omitempty"` // ResponseMessages: The list of rich messages returned to the client. @@ -10887,9 +10887,10 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // Dialogflow will use Google's default trust store to verify // certificates. N.B. Make sure the HTTPS server certificates are signed // with "subject alt name". For instance a certificate can be - // self-signed using the following command, openssl x509 -req -days 200 - // -in example.com.csr \ -signkey example.com.key \ -out example.com.crt - // \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + // self-signed using the following command, ``` openssl x509 -req -days + // 200 -in example.com.csr \ -signkey example.com.key \ -out + // example.com.crt \ -extfile <(printf + // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` // Password: The password for HTTP Basic authentication. diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index 89aef12d5e3..ece0639771a 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -756,9 +756,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -801,9 +804,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -910,9 +916,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -955,9 +964,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -1920,9 +1932,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -1965,9 +1980,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -2074,9 +2092,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -2119,9 +2140,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -2628,9 +2652,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -2673,9 +2700,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -2772,9 +2802,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -2817,9 +2850,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -2913,9 +2949,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -2958,9 +2997,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -3067,9 +3109,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -3112,9 +3157,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -4167,9 +4215,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -4212,9 +4263,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -4302,9 +4356,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -4347,9 +4404,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -4434,9 +4494,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -4479,9 +4542,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -4579,9 +4645,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -4624,9 +4693,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -6622,9 +6694,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -6667,9 +6742,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -6757,9 +6835,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -6802,9 +6883,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -6889,9 +6973,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -6934,9 +7021,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -7034,9 +7124,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -7079,9 +7172,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -7227,9 +7323,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -7272,9 +7371,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -7369,9 +7471,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -7414,9 +7519,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -7484,9 +7592,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -7529,9 +7640,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "location": "path", "pattern": "^[^/]+$", @@ -7730,7 +7844,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8382,6 +8496,14 @@ "$ref": "ChannelAssignedTargetingOptionDetails", "description": "Channel details. This field will be populated when the targeting_type is `TARGETING_TYPE_CHANNEL`." }, + "contentDurationDetails": { + "$ref": "ContentDurationAssignedTargetingOptionDetails", + "description": "Content duration details. This field will be populated when the targeting_type is `TARGETING_TYPE_CONTENT_DURATION`." + }, + "contentGenreDetails": { + "$ref": "ContentGenreAssignedTargetingOptionDetails", + "description": "Content genre details. This field will be populated when the targeting_type is `TARGETING_TYPE_CONTENT_GENRE`." + }, "contentInstreamPositionDetails": { "$ref": "ContentInstreamPositionAssignedTargetingOptionDetails", "description": "Content instream position details. This field will be populated when the targeting_type is `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`." @@ -8390,6 +8512,10 @@ "$ref": "ContentOutstreamPositionAssignedTargetingOptionDetails", "description": "Content outstream position details. This field will be populated when the targeting_type is `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`." }, + "contentStreamTypeDetails": { + "$ref": "ContentStreamTypeAssignedTargetingOptionDetails", + "description": "Content duration details. This field will be populated when the TargetingType is `TARGETING_TYPE_CONTENT_STREAM_TYPE`." + }, "dayAndTimeDetails": { "$ref": "DayAndTimeAssignedTargetingOptionDetails", "description": "Day and time details. This field will be populated when the targeting_type is `TARGETING_TYPE_DAY_AND_TIME`." @@ -8551,9 +8677,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -8596,9 +8725,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "readOnly": true, "type": "string" @@ -9948,6 +10080,106 @@ }, "type": "object" }, + "ContentDurationAssignedTargetingOptionDetails": { + "description": "Details for content duration assigned targeting option. This will be populated in the content_duration_details field when targeting_type is `TARGETING_TYPE_CONTENT_DURATION`. Explicitly targeting all options is not supported. Remove all content duration targeting options to achieve this effect.", + "id": "ContentDurationAssignedTargetingOptionDetails", + "properties": { + "contentDuration": { + "description": "Output only. The content duration.", + "enum": [ + "CONTENT_DURATION_UNSPECIFIED", + "CONTENT_DURATION_UNKNOWN", + "CONTENT_DURATION_0_TO_1_MIN", + "CONTENT_DURATION_1_TO_5_MIN", + "CONTENT_DURATION_5_TO_15_MIN", + "CONTENT_DURATION_15_TO_30_MIN", + "CONTENT_DURATION_30_TO_60_MIN", + "CONTENT_DURATION_OVER_60_MIN" + ], + "enumDescriptions": [ + "Content duration is not specified in this version. This enum is a place holder for a default value and does not represent a real content duration.", + "The content duration is unknown.", + "Content is 0-1 minute long.", + "Content is 1-5 minutes long.", + "Content is 5-15 minutes long.", + "Content is 15-30 minutes long.", + "Content is 30-60 minutes long.", + "Content is over 60 minutes long." + ], + "readOnly": true, + "type": "string" + }, + "targetingOptionId": { + "description": "Required. The targeting_option_id field when targeting_type is `TARGETING_TYPE_CONTENT_DURATION`.", + "type": "string" + } + }, + "type": "object" + }, + "ContentDurationTargetingOptionDetails": { + "description": "Represents a targetable content duration. This will be populated in the content_duration_details field when targeting_type is `TARGETING_TYPE_CONTENT_DURATION`.", + "id": "ContentDurationTargetingOptionDetails", + "properties": { + "contentDuration": { + "description": "Output only. The content duration.", + "enum": [ + "CONTENT_DURATION_UNSPECIFIED", + "CONTENT_DURATION_UNKNOWN", + "CONTENT_DURATION_0_TO_1_MIN", + "CONTENT_DURATION_1_TO_5_MIN", + "CONTENT_DURATION_5_TO_15_MIN", + "CONTENT_DURATION_15_TO_30_MIN", + "CONTENT_DURATION_30_TO_60_MIN", + "CONTENT_DURATION_OVER_60_MIN" + ], + "enumDescriptions": [ + "Content duration is not specified in this version. This enum is a place holder for a default value and does not represent a real content duration.", + "The content duration is unknown.", + "Content is 0-1 minute long.", + "Content is 1-5 minutes long.", + "Content is 5-15 minutes long.", + "Content is 15-30 minutes long.", + "Content is 30-60 minutes long.", + "Content is over 60 minutes long." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ContentGenreAssignedTargetingOptionDetails": { + "description": "Details for content genre assigned targeting option. This will be populated in the content_genre_details field when targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. Explicitly targeting all options is not supported. Remove all content genre targeting options to achieve this effect.", + "id": "ContentGenreAssignedTargetingOptionDetails", + "properties": { + "displayName": { + "description": "Output only. The display name of the content genre.", + "readOnly": true, + "type": "string" + }, + "negative": { + "description": "Indicates if this option is being negatively targeted.", + "type": "boolean" + }, + "targetingOptionId": { + "description": "Required. The targeting_option_id field when targeting_type is `TARGETING_TYPE_CONTENT_GENRE`.", + "type": "string" + } + }, + "type": "object" + }, + "ContentGenreTargetingOptionDetails": { + "description": "Represents a targetable content genre. This will be populated in the content_genre_details field when targeting_type is `TARGETING_TYPE_CONTENT_GENRE`.", + "id": "ContentGenreTargetingOptionDetails", + "properties": { + "displayName": { + "description": "Output only. The display name of the content genre", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ContentInstreamPositionAssignedTargetingOptionDetails": { "description": "Assigned content instream position targeting option details. This will be populated in the content_instream_position_details field when targeting_type is `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`.", "id": "ContentInstreamPositionAssignedTargetingOptionDetails", @@ -10096,6 +10328,54 @@ }, "type": "object" }, + "ContentStreamTypeAssignedTargetingOptionDetails": { + "description": "Details for content stream type assigned targeting option. This will be populated in the content_stream_type_details field when targeting_type is `TARGETING_TYPE_CONTENT_STREAM_TYPE`. Explicitly targeting all options is not supported. Remove all content stream type targeting options to achieve this effect.", + "id": "ContentStreamTypeAssignedTargetingOptionDetails", + "properties": { + "contentStreamType": { + "description": "Output only. The content stream type.", + "enum": [ + "CONTENT_STREAM_TYPE_UNSPECIFIED", + "CONTENT_LIVE_STREAM", + "CONTENT_ON_DEMAND" + ], + "enumDescriptions": [ + "Content stream type is not specified in this version. This enum is a place holder for a default value and does not represent a real content stream type.", + "The content is being live-streamed.", + "The content is viewed on-demand." + ], + "readOnly": true, + "type": "string" + }, + "targetingOptionId": { + "description": "Required. The targeting_option_id field when targeting_type is `TARGETING_TYPE_CONTENT_STREAM_TYPE`.", + "type": "string" + } + }, + "type": "object" + }, + "ContentStreamTypeTargetingOptionDetails": { + "description": "Represents a targetable content stream type. This will be populated in the content_stream_type_details field when targeting_type is `TARGETING_TYPE_CONTENT_STREAM_TYPE`.", + "id": "ContentStreamTypeTargetingOptionDetails", + "properties": { + "contentStreamType": { + "description": "Output only. The content stream type.", + "enum": [ + "CONTENT_STREAM_TYPE_UNSPECIFIED", + "CONTENT_LIVE_STREAM", + "CONTENT_ON_DEMAND" + ], + "enumDescriptions": [ + "Content stream type is not specified in this version. This enum is a place holder for a default value and does not represent a real content stream type.", + "The content is being live-streamed.", + "The content is viewed on-demand." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ConversionCountingConfig": { "description": "Settings that control how conversions are counted. All post-click conversions will be counted. A percentage value can be set for post-view conversions counting.", "id": "ConversionCountingConfig", @@ -10206,9 +10486,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -10251,9 +10534,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "type": "string" } @@ -11097,9 +11383,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -11142,9 +11431,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "type": "string" } @@ -11694,7 +11986,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -13126,6 +13418,22 @@ "$ref": "BiddingStrategy", "description": "The bidding strategy of the insertion order. By default, fixed_bid is set." }, + "billableOutcome": { + "description": "Immutable. The billable outcome of the insertion order.", + "enum": [ + "BILLABLE_OUTCOME_UNSPECIFIED", + "BILLABLE_OUTCOME_PAY_PER_IMPRESSION", + "BILLABLE_OUTCOME_PAY_PER_CLICK", + "BILLABLE_OUTCOME_PAY_PER_VIEWABLE_IMPRESSION" + ], + "enumDescriptions": [ + "Unspecified billable outcome.", + "Pay per impressions.", + "Pay per click.", + "Pay per active view." + ], + "type": "string" + }, "budget": { "$ref": "InsertionOrderBudget", "description": "Required. The budget allocation settings of the insertion order." @@ -16812,6 +17120,14 @@ "$ref": "CategoryTargetingOptionDetails", "description": "Category resource details." }, + "contentDurationDetails": { + "$ref": "ContentDurationTargetingOptionDetails", + "description": "Content duration resource details." + }, + "contentGenreDetails": { + "$ref": "ContentGenreTargetingOptionDetails", + "description": "Content genre resource details." + }, "contentInstreamPositionDetails": { "$ref": "ContentInstreamPositionTargetingOptionDetails", "description": "Content instream position details." @@ -16820,6 +17136,10 @@ "$ref": "ContentOutstreamPositionTargetingOptionDetails", "description": "Content outstream position details." }, + "contentStreamTypeDetails": { + "$ref": "ContentStreamTypeTargetingOptionDetails", + "description": "Content stream type resource details." + }, "deviceMakeModelDetails": { "$ref": "DeviceMakeModelTargetingOptionDetails", "description": "Device make and model resource details." @@ -16941,9 +17261,12 @@ "TARGETING_TYPE_SUB_EXCHANGE", "TARGETING_TYPE_POI", "TARGETING_TYPE_BUSINESS_CHAIN", + "TARGETING_TYPE_CONTENT_DURATION", + "TARGETING_TYPE_CONTENT_STREAM_TYPE", "TARGETING_TYPE_NATIVE_CONTENT_POSITION", "TARGETING_TYPE_OMID", - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + "TARGETING_TYPE_CONTENT_GENRE" ], "enumDescriptions": [ "Default value when type is not specified or is unknown in this version.", @@ -16986,9 +17309,12 @@ "Purchase impressions from specific sub-exchanges.", "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", "Target ads around locations of a business chain within a specific geo region.", + "Target ads to a specific video content duration.", + "Target ads to a specific video content stream type.", "Target ads to a specific native content position.", "Target ads in an Open Measurement enabled inventory.", - "Target ads to a specific audio content type." + "Target ads to a specific audio content type.", + "Target ads to a specific content genre." ], "readOnly": true, "type": "string" diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index 276444d1746..03736fd5106 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -1710,6 +1710,15 @@ type AssignedTargetingOption struct { // the targeting_type is `TARGETING_TYPE_CHANNEL`. ChannelDetails *ChannelAssignedTargetingOptionDetails `json:"channelDetails,omitempty"` + // ContentDurationDetails: Content duration details. This field will be + // populated when the targeting_type is + // `TARGETING_TYPE_CONTENT_DURATION`. + ContentDurationDetails *ContentDurationAssignedTargetingOptionDetails `json:"contentDurationDetails,omitempty"` + + // ContentGenreDetails: Content genre details. This field will be + // populated when the targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. + ContentGenreDetails *ContentGenreAssignedTargetingOptionDetails `json:"contentGenreDetails,omitempty"` + // ContentInstreamPositionDetails: Content instream position details. // This field will be populated when the targeting_type is // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. @@ -1720,6 +1729,11 @@ type AssignedTargetingOption struct { // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. ContentOutstreamPositionDetails *ContentOutstreamPositionAssignedTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` + // ContentStreamTypeDetails: Content duration details. This field will + // be populated when the TargetingType is + // `TARGETING_TYPE_CONTENT_STREAM_TYPE`. + ContentStreamTypeDetails *ContentStreamTypeAssignedTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"` + // DayAndTimeDetails: Day and time details. This field will be populated // when the targeting_type is `TARGETING_TYPE_DAY_AND_TIME`. DayAndTimeDetails *DayAndTimeAssignedTargetingOptionDetails `json:"dayAndTimeDetails,omitempty"` @@ -1950,12 +1964,18 @@ type AssignedTargetingOption struct { // latitude/longitude coordinates. // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a // business chain within a specific geo region. + // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video + // content duration. + // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific + // video content stream type. // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific // native content position. // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled // inventory. // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific // audio content type. + // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content + // genre. TargetingType string `json:"targetingType,omitempty"` // ThirdPartyVerifierDetails: Third party verification details. This @@ -4378,6 +4398,170 @@ func (s *ContactInfoList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ContentDurationAssignedTargetingOptionDetails: Details for content +// duration assigned targeting option. This will be populated in the +// content_duration_details field when targeting_type is +// `TARGETING_TYPE_CONTENT_DURATION`. Explicitly targeting all options +// is not supported. Remove all content duration targeting options to +// achieve this effect. +type ContentDurationAssignedTargetingOptionDetails struct { + // ContentDuration: Output only. The content duration. + // + // Possible values: + // "CONTENT_DURATION_UNSPECIFIED" - Content duration is not specified + // in this version. This enum is a place holder for a default value and + // does not represent a real content duration. + // "CONTENT_DURATION_UNKNOWN" - The content duration is unknown. + // "CONTENT_DURATION_0_TO_1_MIN" - Content is 0-1 minute long. + // "CONTENT_DURATION_1_TO_5_MIN" - Content is 1-5 minutes long. + // "CONTENT_DURATION_5_TO_15_MIN" - Content is 5-15 minutes long. + // "CONTENT_DURATION_15_TO_30_MIN" - Content is 15-30 minutes long. + // "CONTENT_DURATION_30_TO_60_MIN" - Content is 30-60 minutes long. + // "CONTENT_DURATION_OVER_60_MIN" - Content is over 60 minutes long. + ContentDuration string `json:"contentDuration,omitempty"` + + // TargetingOptionId: Required. The targeting_option_id field when + // targeting_type is `TARGETING_TYPE_CONTENT_DURATION`. + TargetingOptionId string `json:"targetingOptionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentDuration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ContentDurationAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentDurationAssignedTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContentDurationTargetingOptionDetails: Represents a targetable +// content duration. This will be populated in the +// content_duration_details field when targeting_type is +// `TARGETING_TYPE_CONTENT_DURATION`. +type ContentDurationTargetingOptionDetails struct { + // ContentDuration: Output only. The content duration. + // + // Possible values: + // "CONTENT_DURATION_UNSPECIFIED" - Content duration is not specified + // in this version. This enum is a place holder for a default value and + // does not represent a real content duration. + // "CONTENT_DURATION_UNKNOWN" - The content duration is unknown. + // "CONTENT_DURATION_0_TO_1_MIN" - Content is 0-1 minute long. + // "CONTENT_DURATION_1_TO_5_MIN" - Content is 1-5 minutes long. + // "CONTENT_DURATION_5_TO_15_MIN" - Content is 5-15 minutes long. + // "CONTENT_DURATION_15_TO_30_MIN" - Content is 15-30 minutes long. + // "CONTENT_DURATION_30_TO_60_MIN" - Content is 30-60 minutes long. + // "CONTENT_DURATION_OVER_60_MIN" - Content is over 60 minutes long. + ContentDuration string `json:"contentDuration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentDuration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ContentDurationTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentDurationTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContentGenreAssignedTargetingOptionDetails: Details for content genre +// assigned targeting option. This will be populated in the +// content_genre_details field when targeting_type is +// `TARGETING_TYPE_CONTENT_GENRE`. Explicitly targeting all options is +// not supported. Remove all content genre targeting options to achieve +// this effect. +type ContentGenreAssignedTargetingOptionDetails struct { + // DisplayName: Output only. The display name of the content genre. + DisplayName string `json:"displayName,omitempty"` + + // Negative: Indicates if this option is being negatively targeted. + Negative bool `json:"negative,omitempty"` + + // TargetingOptionId: Required. The targeting_option_id field when + // targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. + TargetingOptionId string `json:"targetingOptionId,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 *ContentGenreAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentGenreAssignedTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContentGenreTargetingOptionDetails: Represents a targetable content +// genre. This will be populated in the content_genre_details field when +// targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. +type ContentGenreTargetingOptionDetails struct { + // DisplayName: Output only. The display name of the content genre + DisplayName string `json:"displayName,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 *ContentGenreTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentGenreTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ContentInstreamPositionAssignedTargetingOptionDetails: Assigned // content instream position targeting option details. This will be // populated in the content_instream_position_details field when @@ -4617,6 +4801,90 @@ func (s *ContentOutstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ContentStreamTypeAssignedTargetingOptionDetails: Details for content +// stream type assigned targeting option. This will be populated in the +// content_stream_type_details field when targeting_type is +// `TARGETING_TYPE_CONTENT_STREAM_TYPE`. Explicitly targeting all +// options is not supported. Remove all content stream type targeting +// options to achieve this effect. +type ContentStreamTypeAssignedTargetingOptionDetails struct { + // ContentStreamType: Output only. The content stream type. + // + // Possible values: + // "CONTENT_STREAM_TYPE_UNSPECIFIED" - Content stream type is not + // specified in this version. This enum is a place holder for a default + // value and does not represent a real content stream type. + // "CONTENT_LIVE_STREAM" - The content is being live-streamed. + // "CONTENT_ON_DEMAND" - The content is viewed on-demand. + ContentStreamType string `json:"contentStreamType,omitempty"` + + // TargetingOptionId: Required. The targeting_option_id field when + // targeting_type is `TARGETING_TYPE_CONTENT_STREAM_TYPE`. + TargetingOptionId string `json:"targetingOptionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentStreamType") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentStreamType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ContentStreamTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentStreamTypeAssignedTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ContentStreamTypeTargetingOptionDetails: Represents a targetable +// content stream type. This will be populated in the +// content_stream_type_details field when targeting_type is +// `TARGETING_TYPE_CONTENT_STREAM_TYPE`. +type ContentStreamTypeTargetingOptionDetails struct { + // ContentStreamType: Output only. The content stream type. + // + // Possible values: + // "CONTENT_STREAM_TYPE_UNSPECIFIED" - Content stream type is not + // specified in this version. This enum is a place holder for a default + // value and does not represent a real content stream type. + // "CONTENT_LIVE_STREAM" - The content is being live-streamed. + // "CONTENT_ON_DEMAND" - The content is viewed on-demand. + ContentStreamType string `json:"contentStreamType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentStreamType") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentStreamType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ContentStreamTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ContentStreamTypeTargetingOptionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConversionCountingConfig: Settings that control how conversions are // counted. All post-click conversions will be counted. A percentage // value can be set for post-view conversions counting. @@ -4849,12 +5117,18 @@ type CreateAssignedTargetingOptionsRequest struct { // latitude/longitude coordinates. // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a // business chain within a specific geo region. + // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video + // content duration. + // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific + // video content stream type. // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific // native content position. // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled // inventory. // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific // audio content type. + // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content + // genre. TargetingType string `json:"targetingType,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -6049,12 +6323,18 @@ type DeleteAssignedTargetingOptionsRequest struct { // latitude/longitude coordinates. // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a // business chain within a specific geo region. + // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video + // content duration. + // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific + // video content stream type. // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific // native content position. // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled // inventory. // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific // audio content type. + // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content + // genre. TargetingType string `json:"targetingType,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -6834,8 +7114,7 @@ func (s *EditCustomerMatchMembersResponse) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -8488,6 +8767,17 @@ type InsertionOrder struct { // fixed_bid is set. BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"` + // BillableOutcome: Immutable. The billable outcome of the insertion + // order. + // + // Possible values: + // "BILLABLE_OUTCOME_UNSPECIFIED" - Unspecified billable outcome. + // "BILLABLE_OUTCOME_PAY_PER_IMPRESSION" - Pay per impressions. + // "BILLABLE_OUTCOME_PAY_PER_CLICK" - Pay per click. + // "BILLABLE_OUTCOME_PAY_PER_VIEWABLE_IMPRESSION" - Pay per active + // view. + BillableOutcome string `json:"billableOutcome,omitempty"` + // Budget: Required. The budget allocation settings of the insertion // order. Budget *InsertionOrderBudget `json:"budget,omitempty"` @@ -14244,12 +14534,21 @@ type TargetingOption struct { // CategoryDetails: Category resource details. CategoryDetails *CategoryTargetingOptionDetails `json:"categoryDetails,omitempty"` + // ContentDurationDetails: Content duration resource details. + ContentDurationDetails *ContentDurationTargetingOptionDetails `json:"contentDurationDetails,omitempty"` + + // ContentGenreDetails: Content genre resource details. + ContentGenreDetails *ContentGenreTargetingOptionDetails `json:"contentGenreDetails,omitempty"` + // ContentInstreamPositionDetails: Content instream position details. ContentInstreamPositionDetails *ContentInstreamPositionTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"` // ContentOutstreamPositionDetails: Content outstream position details. ContentOutstreamPositionDetails *ContentOutstreamPositionTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` + // ContentStreamTypeDetails: Content stream type resource details. + ContentStreamTypeDetails *ContentStreamTypeTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"` + // DeviceMakeModelDetails: Device make and model resource details. DeviceMakeModelDetails *DeviceMakeModelTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"` @@ -14397,12 +14696,18 @@ type TargetingOption struct { // latitude/longitude coordinates. // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a // business chain within a specific geo region. + // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video + // content duration. + // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific + // video content stream type. // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific // native content position. // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled // inventory. // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific // audio content type. + // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content + // genre. TargetingType string `json:"targetingType,omitempty"` // UserRewardedContentDetails: User rewarded content details. @@ -18134,9 +18439,12 @@ func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(o // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -18179,9 +18487,12 @@ func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(o // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -18483,9 +18794,12 @@ func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do( // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -18528,9 +18842,12 @@ func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do( // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -22483,9 +22800,12 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -22528,9 +22848,12 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -22817,9 +23140,12 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCal // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -22862,9 +23188,12 @@ func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCal // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -24966,9 +25295,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) D // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -25011,9 +25343,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) D // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -25237,9 +25572,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) D // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -25282,9 +25620,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) D // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -25515,9 +25856,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(o // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -25560,9 +25904,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(o // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -25848,9 +26195,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do( // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -25893,9 +26243,12 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do( // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -30283,9 +30636,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts .. // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -30328,9 +30684,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts .. // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -30538,9 +30897,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts .. // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -30583,9 +30945,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts .. // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -30805,9 +31170,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...go // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -30850,9 +31218,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...go // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -31124,9 +31495,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...g // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -31169,9 +31543,12 @@ func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...g // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -39983,9 +40360,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...go // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -40028,9 +40408,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...go // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -40235,9 +40618,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...go // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -40280,9 +40666,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...go // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -40499,9 +40888,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googl // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -40544,9 +40936,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googl // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -40815,9 +41210,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...goog // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -40860,9 +41258,12 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...goog // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -41399,9 +41800,12 @@ func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -41444,9 +41848,12 @@ func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -41738,9 +42145,12 @@ func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -41783,9 +42193,12 @@ func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", @@ -41991,9 +42404,12 @@ func (c *TargetingTypesTargetingOptionsSearchCall) Do(opts ...googleapi.CallOpti // "TARGETING_TYPE_SUB_EXCHANGE", // "TARGETING_TYPE_POI", // "TARGETING_TYPE_BUSINESS_CHAIN", + // "TARGETING_TYPE_CONTENT_DURATION", + // "TARGETING_TYPE_CONTENT_STREAM_TYPE", // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", // "TARGETING_TYPE_OMID", - // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" + // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", + // "TARGETING_TYPE_CONTENT_GENRE" // ], // "enumDescriptions": [ // "Default value when type is not specified or is unknown in this version.", @@ -42036,9 +42452,12 @@ func (c *TargetingTypesTargetingOptionsSearchCall) Do(opts ...googleapi.CallOpti // "Purchase impressions from specific sub-exchanges.", // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", // "Target ads around locations of a business chain within a specific geo region.", + // "Target ads to a specific video content duration.", + // "Target ads to a specific video content stream type.", // "Target ads to a specific native content position.", // "Target ads in an Open Measurement enabled inventory.", - // "Target ads to a specific audio content type." + // "Target ads to a specific audio content type.", + // "Target ads to a specific content genre." // ], // "location": "path", // "pattern": "^[^/]+$", diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 7fea3726f1e..ff868486727 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -7532,7 +7532,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 76296afc48d..1ae614ff373 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -8049,8 +8049,7 @@ func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/docs/v1/docs-api.json b/docs/v1/docs-api.json index 28c2e679a70..0c395651a58 100644 --- a/docs/v1/docs-api.json +++ b/docs/v1/docs-api.json @@ -216,7 +216,7 @@ } } }, - "revision": "20210707", + "revision": "20220325", "rootUrl": "https://docs.googleapis.com/", "schemas": { "AutoText": { @@ -424,7 +424,7 @@ "type": "object" }, "CreateFooterRequest": { - "description": "Creates a Footer. The new footer is applied to the SectionStyle at the location of the SectionBreak if specificed, otherwise it is applied to the DocumentStyle. If a footer of the specified type already exists, a 400 bad request error is returned.", + "description": "Creates a Footer. The new footer is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a footer of the specified type already exists, a 400 bad request error is returned.", "id": "CreateFooterRequest", "properties": { "sectionBreakLocation": { @@ -484,7 +484,7 @@ "type": "object" }, "CreateHeaderRequest": { - "description": "Creates a Header. The new header is applied to the SectionStyle at the location of the SectionBreak if specificed, otherwise it is applied to the DocumentStyle. If a header of the specified type already exists, a 400 bad request error is returned.", + "description": "Creates a Header. The new header is applied to the SectionStyle at the location of the SectionBreak if specified, otherwise it is applied to the DocumentStyle. If a header of the specified type already exists, a 400 bad request error is returned.", "id": "CreateHeaderRequest", "properties": { "sectionBreakLocation": { @@ -839,7 +839,7 @@ "type": "object" }, "revisionId": { - "description": "Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated; however, a changed ID can also be due to internal factors such as ID format changes.", + "description": "Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The revision ID is not a sequential number but an opaque string. The format of the revision ID might change over time. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated. However, a changed ID can also be due to internal factors such as ID format changes.", "type": "string" }, "suggestedDocumentStyleChanges": { @@ -4288,11 +4288,11 @@ "id": "WriteControl", "properties": { "requiredRevisionId": { - "description": "The revision ID of the document that the write request will be applied to. If this is not the latest revision of the document, the request will not be processed and will return a 400 bad request error. When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.", + "description": "The optional revision ID of the document the write request is applied to. If this is not the latest revision of the document, the request is not processed and returns a 400 bad request error. When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.", "type": "string" }, "targetRevisionId": { - "description": "The target revision ID of the document that the write request will be applied to. If collaborator changes have occurred after the document was read using the API, the changes produced by this write request will be transformed against the collaborator changes. This results in a new revision of the document which incorporates both the changes in the request and the collaborator changes, and the Docs server will resolve conflicting changes. When using `target_revision_id`, the API client can be thought of as another collaborator of the document. The target revision ID may only be used to write to recent versions of a document. If the target revision is too far behind the latest revision, the request will not be processed and will return a 400 bad request error and the request should be retried after reading the latest version of the document. In most cases a `revision_id` will remain valid for use as a target revision for several minutes after it is read, but for frequently-edited documents this window may be shorter.", + "description": "The optional target revision ID of the document the write request is applied to. If collaborator changes have occurred after the document was read using the API, the changes produced by this write request are applied against the collaborator changes. This results in a new revision of the document that incorporates both the collaborator changes and the changes in the request, with the Docs server resolving conflicting changes. When using target revision ID, the API client can be thought of as another collaborator of the document. The target revision ID can only be used to write to recent versions of a document. If the target revision is too far behind the latest revision, the request is not processed and returns a 400 bad request error. The request should be tried again after retrieving the latest version of the document. Usually a revision ID remains valid for use as a target revision for several minutes after it's read, but for frequently edited documents this window might be shorter.", "type": "string" } }, diff --git a/docs/v1/docs-gen.go b/docs/v1/docs-gen.go index 61009670a20..0cb0e2ff051 100644 --- a/docs/v1/docs-gen.go +++ b/docs/v1/docs-gen.go @@ -534,7 +534,7 @@ func (s *ColumnBreak) MarshalJSON() ([]byte, error) { } // CreateFooterRequest: Creates a Footer. The new footer is applied to -// the SectionStyle at the location of the SectionBreak if specificed, +// the SectionStyle at the location of the SectionBreak if specified, // otherwise it is applied to the DocumentStyle. If a footer of the // specified type already exists, a 400 bad request error is returned. type CreateFooterRequest struct { @@ -678,7 +678,7 @@ func (s *CreateFootnoteResponse) MarshalJSON() ([]byte, error) { } // CreateHeaderRequest: Creates a Header. The new header is applied to -// the SectionStyle at the location of the SectionBreak if specificed, +// the SectionStyle at the location of the SectionBreak if specified, // otherwise it is applied to the DocumentStyle. If a header of the // specified type already exists, a 400 bad request error is returned. type CreateHeaderRequest struct { @@ -1383,14 +1383,14 @@ type Document struct { // in update requests to specify which revision of a document to apply // updates to and how the request should behave if the document has been // edited since that revision. Only populated if the user has edit - // access to the document. The format of the revision ID may change over - // time, so it should be treated opaquely. A returned revision ID is - // only guaranteed to be valid for 24 hours after it has been returned - // and cannot be shared across users. If the revision ID is unchanged - // between calls, then the document has not changed. Conversely, a - // changed ID (for the same document and user) usually means the - // document has been updated; however, a changed ID can also be due to - // internal factors such as ID format changes. + // access to the document. The revision ID is not a sequential number + // but an opaque string. The format of the revision ID might change over + // time. A returned revision ID is only guaranteed to be valid for 24 + // hours after it has been returned and cannot be shared across users. + // If the revision ID is unchanged between calls, then the document has + // not changed. Conversely, a changed ID (for the same document and + // user) usually means the document has been updated. However, a changed + // ID can also be due to internal factors such as ID format changes. RevisionId string `json:"revisionId,omitempty"` // SuggestedDocumentStyleChanges: Output only. The suggested changes to @@ -7104,31 +7104,29 @@ func (s *WeightedFontFamily) MarshalJSON() ([]byte, error) { // WriteControl: Provides control over how write requests are executed. type WriteControl struct { - // RequiredRevisionId: The revision ID of the document that the write - // request will be applied to. If this is not the latest revision of the - // document, the request will not be processed and will return a 400 bad + // RequiredRevisionId: The optional revision ID of the document the + // write request is applied to. If this is not the latest revision of + // the document, the request is not processed and returns a 400 bad // request error. When a required revision ID is returned in a response, // it indicates the revision ID of the document after the request was // applied. RequiredRevisionId string `json:"requiredRevisionId,omitempty"` - // TargetRevisionId: The target revision ID of the document that the - // write request will be applied to. If collaborator changes have - // occurred after the document was read using the API, the changes - // produced by this write request will be transformed against the - // collaborator changes. This results in a new revision of the document - // which incorporates both the changes in the request and the - // collaborator changes, and the Docs server will resolve conflicting - // changes. When using `target_revision_id`, the API client can be - // thought of as another collaborator of the document. The target - // revision ID may only be used to write to recent versions of a - // document. If the target revision is too far behind the latest - // revision, the request will not be processed and will return a 400 bad - // request error and the request should be retried after reading the - // latest version of the document. In most cases a `revision_id` will - // remain valid for use as a target revision for several minutes after - // it is read, but for frequently-edited documents this window may be - // shorter. + // TargetRevisionId: The optional target revision ID of the document the + // write request is applied to. If collaborator changes have occurred + // after the document was read using the API, the changes produced by + // this write request are applied against the collaborator changes. This + // results in a new revision of the document that incorporates both the + // collaborator changes and the changes in the request, with the Docs + // server resolving conflicting changes. When using target revision ID, + // the API client can be thought of as another collaborator of the + // document. The target revision ID can only be used to write to recent + // versions of a document. If the target revision is too far behind the + // latest revision, the request is not processed and returns a 400 bad + // request error. The request should be tried again after retrieving the + // latest version of the document. Usually a revision ID remains valid + // for use as a target revision for several minutes after it's read, but + // for frequently edited documents this window might be shorter. TargetRevisionId string `json:"targetRevisionId,omitempty"` // ForceSendFields is a list of field names (e.g. "RequiredRevisionId") diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 201c2adf1a6..1d1734adfad 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20220307", + "revision": "20220326", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1071,6 +1071,22 @@ ], "type": "string" }, + "destSplitType": { + "description": "The destination dataset split type.", + "enum": [ + "DATASET_SPLIT_TYPE_UNSPECIFIED", + "DATASET_SPLIT_TRAIN", + "DATASET_SPLIT_TEST", + "DATASET_SPLIT_UNASSIGNED" + ], + "enumDescriptions": [ + "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Identifies the train documents.", + "Identifies the test documents.", + "Identifies the unassigned documents." + ], + "type": "string" + }, "individualBatchMoveStatuses": { "description": "The list of response details of each document.", "items": { @@ -1805,7 +1821,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1Document", "properties": { "content": { @@ -1899,6 +1915,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -3440,7 +3460,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { "content": { @@ -3534,6 +3554,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -4626,7 +4650,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta2Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { "content": { @@ -4727,6 +4751,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -6242,7 +6270,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index dd7a54284d8..e4f67edafc8 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -325,6 +325,16 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. DestDatasetType string `json:"destDatasetType,omitempty"` + // DestSplitType: The destination dataset split type. + // + // Possible values: + // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not + // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // "DATASET_SPLIT_TRAIN" - Identifies the train documents. + // "DATASET_SPLIT_TEST" - Identifies the test documents. + // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. + DestSplitType string `json:"destSplitType,omitempty"` + // IndividualBatchMoveStatuses: The list of response details of each // document. IndividualBatchMoveStatuses []*GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus `json:"individualBatchMoveStatuses,omitempty"` @@ -1730,10 +1740,9 @@ type GoogleCloudDocumentaiV1DisableProcessorResponse struct { } // GoogleCloudDocumentaiV1Document: Document represents the canonical -// document resource in Document Understanding AI. It is an interchange -// format that provides insights into documents and allows for -// collaboration between users and Document Understanding AI to iterate -// and optimize for quality. +// document resource in Document AI. It is an interchange format that +// provides insights into documents and allows for collaboration between +// users and Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -1828,6 +1837,13 @@ type GoogleCloudDocumentaiV1DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -4439,10 +4455,10 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta1Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta1Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -4537,6 +4553,13 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -6353,10 +6376,10 @@ func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta2Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta2Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -6454,6 +6477,13 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -9000,8 +9030,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index a89c7f48272..02e97f8e377 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220307", + "revision": "20220326", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -334,6 +334,22 @@ ], "type": "string" }, + "destSplitType": { + "description": "The destination dataset split type.", + "enum": [ + "DATASET_SPLIT_TYPE_UNSPECIFIED", + "DATASET_SPLIT_TRAIN", + "DATASET_SPLIT_TEST", + "DATASET_SPLIT_UNASSIGNED" + ], + "enumDescriptions": [ + "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Identifies the train documents.", + "Identifies the test documents.", + "Identifies the unassigned documents." + ], + "type": "string" + }, "individualBatchMoveStatuses": { "description": "The list of response details of each document.", "items": { @@ -1202,7 +1218,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { "content": { @@ -1296,6 +1312,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -2413,7 +2433,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta2Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { "content": { @@ -2514,6 +2534,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -4116,7 +4140,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 29db47d078b..eb45e361b2c 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -253,6 +253,16 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. DestDatasetType string `json:"destDatasetType,omitempty"` + // DestSplitType: The destination dataset split type. + // + // Possible values: + // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not + // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // "DATASET_SPLIT_TRAIN" - Identifies the train documents. + // "DATASET_SPLIT_TEST" - Identifies the test documents. + // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. + DestSplitType string `json:"destSplitType,omitempty"` + // IndividualBatchMoveStatuses: The list of response details of each // document. IndividualBatchMoveStatuses []*GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus `json:"individualBatchMoveStatuses,omitempty"` @@ -1911,10 +1921,10 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta1Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta1Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -2009,6 +2019,13 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -3885,10 +3902,10 @@ func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta2Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta2Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -3990,6 +4007,13 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -6698,8 +6722,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { } diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index b2b2c4a0228..655e0de542d 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -796,7 +796,7 @@ } } }, - "revision": "20220307", + "revision": "20220326", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -838,6 +838,22 @@ ], "type": "string" }, + "destSplitType": { + "description": "The destination dataset split type.", + "enum": [ + "DATASET_SPLIT_TYPE_UNSPECIFIED", + "DATASET_SPLIT_TRAIN", + "DATASET_SPLIT_TEST", + "DATASET_SPLIT_UNASSIGNED" + ], + "enumDescriptions": [ + "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Identifies the train documents.", + "Identifies the test documents.", + "Identifies the unassigned documents." + ], + "type": "string" + }, "individualBatchMoveStatuses": { "description": "The list of response details of each document.", "items": { @@ -1706,7 +1722,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { "content": { @@ -1800,6 +1816,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -2892,7 +2912,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta2Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { "content": { @@ -2993,6 +3013,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -4363,7 +4387,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3Document": { - "description": "Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.", + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta3Document", "properties": { "content": { @@ -4457,6 +4481,10 @@ "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty.", "type": "string" }, + "nonPresent": { + "description": "Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a false negative. A non-present entity should have an empty mention_text and text_anchor.", + "type": "boolean" + }, "normalizedValue": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentEntityNormalizedValue", "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." @@ -6058,7 +6086,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 12ecd687e99..56e6445d7e6 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -253,6 +253,16 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. DestDatasetType string `json:"destDatasetType,omitempty"` + // DestSplitType: The destination dataset split type. + // + // Possible values: + // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not + // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // "DATASET_SPLIT_TRAIN" - Identifies the train documents. + // "DATASET_SPLIT_TEST" - Identifies the test documents. + // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. + DestSplitType string `json:"destSplitType,omitempty"` + // IndividualBatchMoveStatuses: The list of response details of each // document. IndividualBatchMoveStatuses []*GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus `json:"individualBatchMoveStatuses,omitempty"` @@ -1911,10 +1921,10 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta1Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta1Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -2009,6 +2019,13 @@ type GoogleCloudDocumentaiV1beta1DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -3825,10 +3842,10 @@ func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) } // GoogleCloudDocumentaiV1beta2Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta2Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -3926,6 +3943,13 @@ type GoogleCloudDocumentaiV1beta2DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -6221,10 +6245,10 @@ type GoogleCloudDocumentaiV1beta3DisableProcessorResponse struct { } // GoogleCloudDocumentaiV1beta3Document: Document represents the -// canonical document resource in Document Understanding AI. It is an -// interchange format that provides insights into documents and allows -// for collaboration between users and Document Understanding AI to -// iterate and optimize for quality. +// canonical document resource in Document AI. It is an interchange +// format that provides insights into documents and allows for +// collaboration between users and Document AI to iterate and optimize +// for quality. type GoogleCloudDocumentaiV1beta3Document struct { // Content: Optional. Inline document content, represented as a stream // of bytes. Note: As with all `bytes` fields, protobuffers use a pure @@ -6319,6 +6343,13 @@ type GoogleCloudDocumentaiV1beta3DocumentEntity struct { // this field will be empty. MentionText string `json:"mentionText,omitempty"` + // NonPresent: Optional. This attribute indicates that the processing + // didn't actually identify this entity, but a confidence score was + // assigned that represent the potential that this could be a false + // negative. A non-present entity should have an empty mention_text and + // text_anchor. + NonPresent bool `json:"nonPresent,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the // extracted value could not be converted or the type (e.g. address) is // not supported for certain parsers. This field is also only populated @@ -9014,8 +9045,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/essentialcontacts/v1/essentialcontacts-api.json b/essentialcontacts/v1/essentialcontacts-api.json index 068ab42b5da..cdf2327d0e4 100644 --- a/essentialcontacts/v1/essentialcontacts-api.json +++ b/essentialcontacts/v1/essentialcontacts-api.json @@ -850,7 +850,7 @@ } } }, - "revision": "20210806", + "revision": "20220317", "rootUrl": "https://essentialcontacts.googleapis.com/", "schemas": { "GoogleCloudEssentialcontactsV1ComputeContactsResponse": { @@ -997,7 +997,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/essentialcontacts/v1/essentialcontacts-gen.go b/essentialcontacts/v1/essentialcontacts-gen.go index 8d4ccaaa790..02b071d86a3 100644 --- a/essentialcontacts/v1/essentialcontacts-gen.go +++ b/essentialcontacts/v1/essentialcontacts-gen.go @@ -438,8 +438,7 @@ func (s *GoogleCloudEssentialcontactsV1SendTestMessageRequest) MarshalJSON() ([] // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index a3d291f60c4..6b85e39b13e 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -846,7 +846,7 @@ } } }, - "revision": "20220301", + "revision": "20220318", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -953,12 +953,16 @@ "gke": { "$ref": "GKE", "description": "A GKE service capable of receiving events. The service should be running in the same project as the trigger." + }, + "workflow": { + "description": "The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format: `projects/{project}/locations/{location}/workflows/{workflow}`", + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 9eda36efb32..e36f9d00e0a 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -444,6 +444,12 @@ type Destination struct { // running in the same project as the trigger. Gke *GKE `json:"gke,omitempty"` + // Workflow: The resource name of the Workflow whose Executions are + // triggered by the events. The Workflow resource should be deployed in + // the same project as the trigger. Format: + // `projects/{project}/locations/{location}/workflows/{workflow}` + Workflow string `json:"workflow,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudFunction") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -471,8 +477,7 @@ func (s *Destination) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/eventarc/v1beta1/eventarc-api.json b/eventarc/v1beta1/eventarc-api.json index 46e1334cee5..6e781a1155d 100644 --- a/eventarc/v1beta1/eventarc-api.json +++ b/eventarc/v1beta1/eventarc-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20211105", + "revision": "20220318", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -694,7 +694,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/eventarc/v1beta1/eventarc-gen.go b/eventarc/v1beta1/eventarc-gen.go index 8b5042f266c..ec901849315 100644 --- a/eventarc/v1beta1/eventarc-gen.go +++ b/eventarc/v1beta1/eventarc-gen.go @@ -433,8 +433,7 @@ func (s *Destination) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/factchecktools/v1alpha1/factchecktools-api.json b/factchecktools/v1alpha1/factchecktools-api.json index 29414b4089f..2cce762d47a 100644 --- a/factchecktools/v1alpha1/factchecktools-api.json +++ b/factchecktools/v1alpha1/factchecktools-api.json @@ -304,7 +304,7 @@ } } }, - "revision": "20210403", + "revision": "20220317", "rootUrl": "https://factchecktools.googleapis.com/", "schemas": { "GoogleFactcheckingFactchecktoolsV1alpha1Claim": { @@ -566,7 +566,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/factchecktools/v1alpha1/factchecktools-gen.go b/factchecktools/v1alpha1/factchecktools-gen.go index 8f2c6f94a73..3017082080d 100644 --- a/factchecktools/v1alpha1/factchecktools-gen.go +++ b/factchecktools/v1alpha1/factchecktools-gen.go @@ -613,8 +613,7 @@ func (s *GoogleFactcheckingFactchecktoolsV1alpha1Publisher) MarshalJSON() ([]byt // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/file/v1/file-api.json b/file/v1/file-api.json index 884d5f879ec..44fb626a78e 100644 --- a/file/v1/file-api.json +++ b/file/v1/file-api.json @@ -846,7 +846,7 @@ } } }, - "revision": "20220214", + "revision": "20220222", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1390,7 +1390,7 @@ "type": "string" }, "suspensionReasons": { - "description": "Output only. field indicates all the reasons the instance is in \"SUSPENDED\" state.", + "description": "Output only. Field indicates all the reasons the instance is in \"SUSPENDED\" state.", "items": { "enum": [ "SUSPENSION_REASON_UNSPECIFIED", diff --git a/file/v1/file-gen.go b/file/v1/file-gen.go index d186fcb6954..ce6d3ec4d3d 100644 --- a/file/v1/file-gen.go +++ b/file/v1/file-gen.go @@ -970,7 +970,7 @@ type Instance struct { // state, if available. StatusMessage string `json:"statusMessage,omitempty"` - // SuspensionReasons: Output only. field indicates all the reasons the + // SuspensionReasons: Output only. Field indicates all the reasons the // instance is in "SUSPENDED" state. // // Possible values: diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index a79d78c5efd..377042754ae 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -1121,7 +1121,7 @@ } } }, - "revision": "20220224", + "revision": "20220319", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -1279,7 +1279,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index 4a5143560e6..e1d67a399d1 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -635,8 +635,7 @@ func (s *DefaultResources) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebaseappcheck/v1beta/firebaseappcheck-api.json b/firebaseappcheck/v1beta/firebaseappcheck-api.json index c42944e226d..180c1040231 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-api.json +++ b/firebaseappcheck/v1beta/firebaseappcheck-api.json @@ -979,6 +979,103 @@ } } }, + "recaptchaV3Config": { + "methods": { + "batchGet": { + "description": "Atomically gets the RecaptchaV3Configs for the specified list of apps. For security reasons, the `site_secret` field is never populated in the response.", + "flatPath": "v1beta/projects/{projectsId}/apps/-/recaptchaV3Config:batchGet", + "httpMethod": "GET", + "id": "firebaseappcheck.projects.apps.recaptchaV3Config.batchGet", + "parameterOrder": [ + "parent" + ], + "parameters": { + "names": { + "description": "Required. The relative resource names of the RecaptchaV3Configs to retrieve, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ``` A maximum of 100 objects can be retrieved in a batch.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent project name shared by all RecaptchaV3Configs being retrieved, in the format ``` projects/{project_number} ``` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/apps/-/recaptchaV3Config:batchGet", + "response": { + "$ref": "GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "get": { + "description": "Gets the RecaptchaV3Config for the specified app. For security reasons, the `site_secret` field is never populated in the response.", + "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaV3Config", + "httpMethod": "GET", + "id": "firebaseappcheck.projects.apps.recaptchaV3Config.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the RecaptchaV3Config, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ```", + "location": "path", + "pattern": "^projects/[^/]+/apps/[^/]+/recaptchaV3Config$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "patch": { + "description": "Updates the RecaptchaV3Config for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA V3 tokens for App Check tokens. For security reasons, the `site_secret` field is never populated in the response.", + "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaV3Config", + "httpMethod": "PATCH", + "id": "firebaseappcheck.projects.apps.recaptchaV3Config.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ```", + "location": "path", + "pattern": "^projects/[^/]+/apps/[^/]+/recaptchaV3Config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. A comma-separated list of names of fields in the RecaptchaV3Config to update. Example: `site_secret`.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + }, + "response": { + "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + } + } + }, "safetyNetConfig": { "methods": { "batchGet": { @@ -1212,7 +1309,7 @@ } } }, - "revision": "20220311", + "revision": "20220325", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1betaAppAttestConfig": { @@ -1323,6 +1420,20 @@ }, "type": "object" }, + "GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse": { + "description": "Response message for the BatchGetRecaptchaV3Configs method.", + "id": "GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse", + "properties": { + "configs": { + "description": "RecaptchaV3Configs retrieved.", + "items": { + "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleFirebaseAppcheckV1betaBatchGetSafetyNetConfigsResponse": { "description": "Response message for the BatchGetSafetyNetConfigs method.", "id": "GoogleFirebaseAppcheckV1betaBatchGetSafetyNetConfigsResponse", @@ -1708,6 +1819,31 @@ }, "type": "object" }, + "GoogleFirebaseAppcheckV1betaRecaptchaV3Config": { + "description": "An app's reCAPTCHA v3 configuration object. This configuration is used by ExchangeRecaptchaV3Token to validate reCAPTCHA tokens issued to apps by reCAPTCHA v3. It also controls certain properties of the returned App Check token, such as its ttl.", + "id": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config", + "properties": { + "name": { + "description": "Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ```", + "type": "string" + }, + "siteSecret": { + "description": "Required. Input only. The site secret used to identify your service for reCAPTCHA v3 verification. For security reasons, this field will never be populated in any response.", + "type": "string" + }, + "siteSecretSet": { + "description": "Output only. Whether the `site_secret` field was previously set. Since we will never return the `site_secret` field, this field is the only way to find out whether it was previously set.", + "readOnly": true, + "type": "boolean" + }, + "tokenTtl": { + "description": "Specifies the duration for which App Check tokens exchanged from reCAPTCHA tokens will be valid. If unset, a default value of 1 day is assumed. Must be between 30 minutes and 7 days, inclusive.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirebaseAppcheckV1betaSafetyNetConfig": { "description": "An app's SafetyNet configuration object. This configuration controls certain properties of the App Check token returned by ExchangeSafetyNetToken, such as its ttl. Note that your registered SHA-256 certificate fingerprints are used to validate tokens issued by SafetyNet; please register them via the Firebase Console or programmatically via the [Firebase Management Service](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.androidApps.sha/create).", "id": "GoogleFirebaseAppcheckV1betaSafetyNetConfig", @@ -1766,7 +1902,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/firebaseappcheck/v1beta/firebaseappcheck-gen.go b/firebaseappcheck/v1beta/firebaseappcheck-gen.go index efe8683c9fe..fed7ffcb2af 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-gen.go +++ b/firebaseappcheck/v1beta/firebaseappcheck-gen.go @@ -179,6 +179,7 @@ func NewProjectsAppsService(s *Service) *ProjectsAppsService { rs.DeviceCheckConfig = NewProjectsAppsDeviceCheckConfigService(s) rs.RecaptchaConfig = NewProjectsAppsRecaptchaConfigService(s) rs.RecaptchaEnterpriseConfig = NewProjectsAppsRecaptchaEnterpriseConfigService(s) + rs.RecaptchaV3Config = NewProjectsAppsRecaptchaV3ConfigService(s) rs.SafetyNetConfig = NewProjectsAppsSafetyNetConfigService(s) return rs } @@ -196,6 +197,8 @@ type ProjectsAppsService struct { RecaptchaEnterpriseConfig *ProjectsAppsRecaptchaEnterpriseConfigService + RecaptchaV3Config *ProjectsAppsRecaptchaV3ConfigService + SafetyNetConfig *ProjectsAppsSafetyNetConfigService } @@ -244,6 +247,15 @@ type ProjectsAppsRecaptchaEnterpriseConfigService struct { s *Service } +func NewProjectsAppsRecaptchaV3ConfigService(s *Service) *ProjectsAppsRecaptchaV3ConfigService { + rs := &ProjectsAppsRecaptchaV3ConfigService{s: s} + return rs +} + +type ProjectsAppsRecaptchaV3ConfigService struct { + s *Service +} + func NewProjectsAppsSafetyNetConfigService(s *Service) *ProjectsAppsSafetyNetConfigService { rs := &ProjectsAppsSafetyNetConfigService{s: s} return rs @@ -530,6 +542,39 @@ func (s *GoogleFirebaseAppcheckV1betaBatchGetRecaptchaEnterpriseConfigsResponse) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse: +// Response message for the BatchGetRecaptchaV3Configs method. +type GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse struct { + // Configs: RecaptchaV3Configs retrieved. + Configs []*GoogleFirebaseAppcheckV1betaRecaptchaV3Config `json:"configs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Configs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Configs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirebaseAppcheckV1betaBatchGetSafetyNetConfigsResponse: // Response message for the BatchGetSafetyNetConfigs method. type GoogleFirebaseAppcheckV1betaBatchGetSafetyNetConfigsResponse struct { @@ -1407,6 +1452,59 @@ func (s *GoogleFirebaseAppcheckV1betaRecaptchaEnterpriseConfig) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppcheckV1betaRecaptchaV3Config: An app's reCAPTCHA v3 +// configuration object. This configuration is used by +// ExchangeRecaptchaV3Token to validate reCAPTCHA tokens issued to apps +// by reCAPTCHA v3. It also controls certain properties of the returned +// App Check token, such as its ttl. +type GoogleFirebaseAppcheckV1betaRecaptchaV3Config struct { + // Name: Required. The relative resource name of the reCAPTCHA v3 + // configuration object, in the format: ``` + // projects/{project_number}/apps/{app_id}/recaptchaV3Config ``` + Name string `json:"name,omitempty"` + + // SiteSecret: Required. Input only. The site secret used to identify + // your service for reCAPTCHA v3 verification. For security reasons, + // this field will never be populated in any response. + SiteSecret string `json:"siteSecret,omitempty"` + + // SiteSecretSet: Output only. Whether the `site_secret` field was + // previously set. Since we will never return the `site_secret` field, + // this field is the only way to find out whether it was previously set. + SiteSecretSet bool `json:"siteSecretSet,omitempty"` + + // TokenTtl: Specifies the duration for which App Check tokens exchanged + // from reCAPTCHA tokens will be valid. If unset, a default value of 1 + // day is assumed. Must be between 30 minutes and 7 days, inclusive. + TokenTtl string `json:"tokenTtl,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 *GoogleFirebaseAppcheckV1betaRecaptchaV3Config) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirebaseAppcheckV1betaRecaptchaV3Config + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirebaseAppcheckV1betaSafetyNetConfig: An app's SafetyNet // configuration object. This configuration controls certain properties // of the App Check token returned by ExchangeSafetyNetToken, such as @@ -1573,8 +1671,7 @@ func (s *GoogleFirebaseAppcheckV1betaUpdateServiceRequest) MarshalJSON() ([]byte // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -6004,6 +6101,492 @@ func (c *ProjectsAppsRecaptchaEnterpriseConfigPatchCall) Do(opts ...googleapi.Ca } +// method id "firebaseappcheck.projects.apps.recaptchaV3Config.batchGet": + +type ProjectsAppsRecaptchaV3ConfigBatchGetCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGet: Atomically gets the RecaptchaV3Configs for the specified +// list of apps. For security reasons, the `site_secret` field is never +// populated in the response. +// +// - parent: The parent project name shared by all RecaptchaV3Configs +// being retrieved, in the format ``` projects/{project_number} ``` +// The parent collection in the `name` field of any resource being +// retrieved must match this field, or the entire batch fails. +func (r *ProjectsAppsRecaptchaV3ConfigService) BatchGet(parent string) *ProjectsAppsRecaptchaV3ConfigBatchGetCall { + c := &ProjectsAppsRecaptchaV3ConfigBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Names sets the optional parameter "names": Required. The relative +// resource names of the RecaptchaV3Configs to retrieve, in the format: +// ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ``` A +// maximum of 100 objects can be retrieved in a batch. +func (c *ProjectsAppsRecaptchaV3ConfigBatchGetCall) Names(names ...string) *ProjectsAppsRecaptchaV3ConfigBatchGetCall { + c.urlParams_.SetMulti("names", append([]string{}, names...)) + 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 *ProjectsAppsRecaptchaV3ConfigBatchGetCall) Fields(s ...googleapi.Field) *ProjectsAppsRecaptchaV3ConfigBatchGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigBatchGetCall) IfNoneMatch(entityTag string) *ProjectsAppsRecaptchaV3ConfigBatchGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigBatchGetCall) Context(ctx context.Context) *ProjectsAppsRecaptchaV3ConfigBatchGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigBatchGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsAppsRecaptchaV3ConfigBatchGetCall) 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, "v1beta/{+parent}/apps/-/recaptchaV3Config:batchGet") + 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 "firebaseappcheck.projects.apps.recaptchaV3Config.batchGet" call. +// Exactly one of +// *GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse.Server +// Response.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsAppsRecaptchaV3ConfigBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse{ + 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": "Atomically gets the RecaptchaV3Configs for the specified list of apps. For security reasons, the `site_secret` field is never populated in the response.", + // "flatPath": "v1beta/projects/{projectsId}/apps/-/recaptchaV3Config:batchGet", + // "httpMethod": "GET", + // "id": "firebaseappcheck.projects.apps.recaptchaV3Config.batchGet", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "names": { + // "description": "Required. The relative resource names of the RecaptchaV3Configs to retrieve, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ``` A maximum of 100 objects can be retrieved in a batch.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent project name shared by all RecaptchaV3Configs being retrieved, in the format ``` projects/{project_number} ``` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/apps/-/recaptchaV3Config:batchGet", + // "response": { + // "$ref": "GoogleFirebaseAppcheckV1betaBatchGetRecaptchaV3ConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" + // ] + // } + +} + +// method id "firebaseappcheck.projects.apps.recaptchaV3Config.get": + +type ProjectsAppsRecaptchaV3ConfigGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the RecaptchaV3Config for the specified app. For security +// reasons, the `site_secret` field is never populated in the response. +// +// - name: The relative resource name of the RecaptchaV3Config, in the +// format: ``` +// projects/{project_number}/apps/{app_id}/recaptchaV3Config ```. +func (r *ProjectsAppsRecaptchaV3ConfigService) Get(name string) *ProjectsAppsRecaptchaV3ConfigGetCall { + c := &ProjectsAppsRecaptchaV3ConfigGetCall{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 *ProjectsAppsRecaptchaV3ConfigGetCall) Fields(s ...googleapi.Field) *ProjectsAppsRecaptchaV3ConfigGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigGetCall) IfNoneMatch(entityTag string) *ProjectsAppsRecaptchaV3ConfigGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigGetCall) Context(ctx context.Context) *ProjectsAppsRecaptchaV3ConfigGetCall { + 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 *ProjectsAppsRecaptchaV3ConfigGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsAppsRecaptchaV3ConfigGetCall) 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, "v1beta/{+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 "firebaseappcheck.projects.apps.recaptchaV3Config.get" call. +// Exactly one of *GoogleFirebaseAppcheckV1betaRecaptchaV3Config or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirebaseAppcheckV1betaRecaptchaV3Config.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsAppsRecaptchaV3ConfigGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppcheckV1betaRecaptchaV3Config, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleFirebaseAppcheckV1betaRecaptchaV3Config{ + 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 RecaptchaV3Config for the specified app. For security reasons, the `site_secret` field is never populated in the response.", + // "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaV3Config", + // "httpMethod": "GET", + // "id": "firebaseappcheck.projects.apps.recaptchaV3Config.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the RecaptchaV3Config, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ```", + // "location": "path", + // "pattern": "^projects/[^/]+/apps/[^/]+/recaptchaV3Config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" + // ] + // } + +} + +// method id "firebaseappcheck.projects.apps.recaptchaV3Config.patch": + +type ProjectsAppsRecaptchaV3ConfigPatchCall struct { + s *Service + name string + googlefirebaseappcheckv1betarecaptchav3config *GoogleFirebaseAppcheckV1betaRecaptchaV3Config + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the RecaptchaV3Config for the specified app. While +// this configuration is incomplete or invalid, the app will be unable +// to exchange reCAPTCHA V3 tokens for App Check tokens. For security +// reasons, the `site_secret` field is never populated in the response. +// +// - name: The relative resource name of the reCAPTCHA v3 configuration +// object, in the format: ``` +// projects/{project_number}/apps/{app_id}/recaptchaV3Config ```. +func (r *ProjectsAppsRecaptchaV3ConfigService) Patch(name string, googlefirebaseappcheckv1betarecaptchav3config *GoogleFirebaseAppcheckV1betaRecaptchaV3Config) *ProjectsAppsRecaptchaV3ConfigPatchCall { + c := &ProjectsAppsRecaptchaV3ConfigPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlefirebaseappcheckv1betarecaptchav3config = googlefirebaseappcheckv1betarecaptchav3config + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A +// comma-separated list of names of fields in the RecaptchaV3Config to +// update. Example: `site_secret`. +func (c *ProjectsAppsRecaptchaV3ConfigPatchCall) UpdateMask(updateMask string) *ProjectsAppsRecaptchaV3ConfigPatchCall { + 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 *ProjectsAppsRecaptchaV3ConfigPatchCall) Fields(s ...googleapi.Field) *ProjectsAppsRecaptchaV3ConfigPatchCall { + 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 *ProjectsAppsRecaptchaV3ConfigPatchCall) Context(ctx context.Context) *ProjectsAppsRecaptchaV3ConfigPatchCall { + 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 *ProjectsAppsRecaptchaV3ConfigPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsAppsRecaptchaV3ConfigPatchCall) 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.googlefirebaseappcheckv1betarecaptchav3config) + 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, "v1beta/{+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 "firebaseappcheck.projects.apps.recaptchaV3Config.patch" call. +// Exactly one of *GoogleFirebaseAppcheckV1betaRecaptchaV3Config or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirebaseAppcheckV1betaRecaptchaV3Config.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsAppsRecaptchaV3ConfigPatchCall) Do(opts ...googleapi.CallOption) (*GoogleFirebaseAppcheckV1betaRecaptchaV3Config, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleFirebaseAppcheckV1betaRecaptchaV3Config{ + 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 RecaptchaV3Config for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA V3 tokens for App Check tokens. For security reasons, the `site_secret` field is never populated in the response.", + // "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaV3Config", + // "httpMethod": "PATCH", + // "id": "firebaseappcheck.projects.apps.recaptchaV3Config.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: ``` projects/{project_number}/apps/{app_id}/recaptchaV3Config ```", + // "location": "path", + // "pattern": "^projects/[^/]+/apps/[^/]+/recaptchaV3Config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. A comma-separated list of names of fields in the RecaptchaV3Config to update. Example: `site_secret`.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + // }, + // "response": { + // "$ref": "GoogleFirebaseAppcheckV1betaRecaptchaV3Config" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" + // ] + // } + +} + // method id "firebaseappcheck.projects.apps.safetyNetConfig.batchGet": type ProjectsAppsSafetyNetConfigBatchGetCall struct { diff --git a/firebasehosting/v1/firebasehosting-api.json b/firebasehosting/v1/firebasehosting-api.json index af35a0cd504..4745b686f2d 100644 --- a/firebasehosting/v1/firebasehosting-api.json +++ b/firebasehosting/v1/firebasehosting-api.json @@ -186,7 +186,7 @@ } } }, - "revision": "20210315", + "revision": "20220322", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -196,7 +196,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebasehosting/v1/firebasehosting-gen.go b/firebasehosting/v1/firebasehosting-gen.go index 81377b207b5..174946a730a 100644 --- a/firebasehosting/v1/firebasehosting-gen.go +++ b/firebasehosting/v1/firebasehosting-gen.go @@ -143,8 +143,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebasehosting/v1beta1/firebasehosting-api.json b/firebasehosting/v1beta1/firebasehosting-api.json index 090e4b7bc19..c6fe642731f 100644 --- a/firebasehosting/v1beta1/firebasehosting-api.json +++ b/firebasehosting/v1beta1/firebasehosting-api.json @@ -1939,7 +1939,7 @@ } } }, - "revision": "20210811", + "revision": "20220322", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { @@ -2232,7 +2232,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebasehosting/v1beta1/firebasehosting-gen.go b/firebasehosting/v1beta1/firebasehosting-gen.go index e3887729e47..de747986cb2 100644 --- a/firebasehosting/v1beta1/firebasehosting-gen.go +++ b/firebasehosting/v1beta1/firebasehosting-gen.go @@ -787,8 +787,7 @@ func (s *DomainRedirect) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebaseml/v1/firebaseml-api.json b/firebaseml/v1/firebaseml-api.json index d04b9877857..684470866f5 100644 --- a/firebaseml/v1/firebaseml-api.json +++ b/firebaseml/v1/firebaseml-api.json @@ -204,7 +204,7 @@ } } }, - "revision": "20210809", + "revision": "20220321", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -214,7 +214,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebaseml/v1/firebaseml-gen.go b/firebaseml/v1/firebaseml-gen.go index 4d83f9b4d8f..f782c87983c 100644 --- a/firebaseml/v1/firebaseml-gen.go +++ b/firebaseml/v1/firebaseml-gen.go @@ -155,8 +155,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebaseml/v1beta2/firebaseml-api.json b/firebaseml/v1beta2/firebaseml-api.json index 914268a9a04..3bde276218f 100644 --- a/firebaseml/v1beta2/firebaseml-api.json +++ b/firebaseml/v1beta2/firebaseml-api.json @@ -318,7 +318,7 @@ } } }, - "revision": "20210809", + "revision": "20220321", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "DownloadModelResponse": { @@ -359,7 +359,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebaseml/v1beta2/firebaseml-gen.go b/firebaseml/v1beta2/firebaseml-gen.go index 989a0795829..0821b216661 100644 --- a/firebaseml/v1beta2/firebaseml-gen.go +++ b/firebaseml/v1beta2/firebaseml-gen.go @@ -222,8 +222,7 @@ func (s *DownloadModelResponse) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firebasestorage/v1beta/firebasestorage-api.json b/firebasestorage/v1beta/firebasestorage-api.json index e4a85f570e7..3042b4a7356 100644 --- a/firebasestorage/v1beta/firebasestorage-api.json +++ b/firebasestorage/v1beta/firebasestorage-api.json @@ -238,7 +238,7 @@ } } }, - "revision": "20210910", + "revision": "20220318", "rootUrl": "https://firebasestorage.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -269,7 +269,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firebasestorage/v1beta/firebasestorage-gen.go b/firebasestorage/v1beta/firebasestorage-gen.go index 10b160ea3ba..84b8ed62e45 100644 --- a/firebasestorage/v1beta/firebasestorage-gen.go +++ b/firebasestorage/v1beta/firebasestorage-gen.go @@ -215,8 +215,7 @@ func (s *Bucket) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 582d11ab21d..506e31d11f9 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1319,7 +1319,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1705,7 +1705,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1872,9 +1872,9 @@ ], "enumDescriptions": [ "Not used.", - "Use optimistic concurrency control by default. This setting is available for Cloud Firestore customers.", - "Use pessimistic concurrency control by default. This setting is available for Cloud Firestore customers. This is the default setting for Cloud Firestore.", - "Use optimistic concurrency control with entity groups by default. This is the only available setting for Cloud Datastore customers. This is the default setting for Cloud Datastore." + "Use optimistic concurrency control by default. This mode is available for Cloud Firestore databases.", + "Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. This is the default setting for Cloud Firestore.", + "Use optimistic concurrency control with entity groups by default. This is the only available mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended." ], "type": "string" }, diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 45b41796677..f6742197278 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -962,8 +962,7 @@ func (s *DocumentsTarget) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1255,14 +1254,14 @@ type GoogleFirestoreAdminV1Database struct { // Possible values: // "CONCURRENCY_MODE_UNSPECIFIED" - Not used. // "OPTIMISTIC" - Use optimistic concurrency control by default. This - // setting is available for Cloud Firestore customers. + // mode is available for Cloud Firestore databases. // "PESSIMISTIC" - Use pessimistic concurrency control by default. - // This setting is available for Cloud Firestore customers. This is the + // This mode is available for Cloud Firestore databases. This is the // default setting for Cloud Firestore. // "OPTIMISTIC_WITH_ENTITY_GROUPS" - Use optimistic concurrency // control with entity groups by default. This is the only available - // setting for Cloud Datastore customers. This is the default setting - // for Cloud Datastore. + // mode for Cloud Datastore. This mode is also available for Cloud + // Firestore with Datastore Mode but is not recommended. ConcurrencyMode string `json:"concurrencyMode,omitempty"` // Etag: This checksum is computed by the server based on the value of diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index 0345e1e3a32..2c8ad0ce0ef 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -921,7 +921,7 @@ } } }, - "revision": "20220305", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1307,7 +1307,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1830,6 +1830,11 @@ "pageToken": { "description": "A page token. Must be a value from ListCollectionIdsResponse.", "type": "string" + }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "type": "string" } }, "type": "object" @@ -1977,6 +1982,11 @@ "format": "int64", "type": "string" }, + "readTime": { + "description": "Reads documents as they were at the given time. This may not be older than 270 seconds.", + "format": "google-datetime", + "type": "string" + }, "structuredQuery": { "$ref": "StructuredQuery", "description": "A structured query. Query must specify collection with all descendants and be ordered by name ascending. Other filters, order bys, limits, offsets, and start/end cursors are not supported." diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 6ef820ea758..518ee3d0c15 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -914,8 +914,7 @@ func (s *DocumentsTarget) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1779,6 +1778,10 @@ type ListCollectionIdsRequest struct { // ListCollectionIdsResponse. PageToken string `json:"pageToken,omitempty"` + // ReadTime: Reads documents as they were at the given time. This may + // not be older than 270 seconds. + ReadTime string `json:"readTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2053,6 +2056,10 @@ type PartitionQueryRequest struct { // fewer than the number of workers or compute instances available. PartitionCount int64 `json:"partitionCount,omitempty,string"` + // ReadTime: Reads documents as they were at the given time. This may + // not be older than 270 seconds. + ReadTime string `json:"readTime,omitempty"` + // StructuredQuery: A structured query. Query must specify collection // with all descendants and be ordered by name ascending. Other filters, // order bys, limits, offsets, and start/end cursors are not supported. diff --git a/firestore/v1beta2/firestore-api.json b/firestore/v1beta2/firestore-api.json index a431693768b..4e721809ed7 100644 --- a/firestore/v1beta2/firestore-api.json +++ b/firestore/v1beta2/firestore-api.json @@ -415,11 +415,11 @@ } } }, - "revision": "20220110", + "revision": "20220319", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/firestore/v1beta2/firestore-gen.go b/firestore/v1beta2/firestore-gen.go index 89afd8df1a8..5dd62d68ea9 100644 --- a/firestore/v1beta2/firestore-gen.go +++ b/firestore/v1beta2/firestore-gen.go @@ -208,8 +208,7 @@ type ProjectsDatabasesCollectionGroupsIndexesService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/forms/v1/forms-api.json b/forms/v1/forms-api.json index 9ecc99e59c9..bd367fc113d 100644 --- a/forms/v1/forms-api.json +++ b/forms/v1/forms-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20220308", + "revision": "20220322", "rootUrl": "https://forms.googleapis.com/", "schemas": { "Answer": { @@ -615,7 +615,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/forms/v1/forms-gen.go b/forms/v1/forms-gen.go index 784c9f17209..f2d1a3b3529 100644 --- a/forms/v1/forms-gen.go +++ b/forms/v1/forms-gen.go @@ -607,8 +607,7 @@ func (s *DeleteItemRequest) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/games/v1/games-api.json b/games/v1/games-api.json index c560deed799..ec9969758c6 100644 --- a/games/v1/games-api.json +++ b/games/v1/games-api.json @@ -714,6 +714,11 @@ "location": "path", "required": true, "type": "string" + }, + "playerIdConsistencyToken": { + "description": "Consistency token of the player id. The call returns a 'not found' result when the token is present and invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto", + "location": "query", + "type": "string" } }, "path": "games/v1/players/{playerId}", @@ -1224,7 +1229,7 @@ } } }, - "revision": "20210401", + "revision": "20220317", "rootUrl": "https://games.googleapis.com/", "schemas": { "AchievementDefinition": { diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go index cfa99e7ab7f..ec0a0483875 100644 --- a/games/v1/games-gen.go +++ b/games/v1/games-gen.go @@ -6096,6 +6096,16 @@ func (c *PlayersGetCall) Language(language string) *PlayersGetCall { return c } +// PlayerIdConsistencyToken sets the optional parameter +// "playerIdConsistencyToken": Consistency token of the player id. The +// call returns a 'not found' result when the token is present and +// invalid. Empty value is ignored. See also +// GlobalPlayerIdConsistencyTokenProto +func (c *PlayersGetCall) PlayerIdConsistencyToken(playerIdConsistencyToken string) *PlayersGetCall { + c.urlParams_.Set("playerIdConsistencyToken", playerIdConsistencyToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6213,6 +6223,11 @@ func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) { // "location": "path", // "required": true, // "type": "string" + // }, + // "playerIdConsistencyToken": { + // "description": "Consistency token of the player id. The call returns a 'not found' result when the token is present and invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto", + // "location": "query", + // "type": "string" // } // }, // "path": "games/v1/players/{playerId}", diff --git a/gameservices/v1/gameservices-api.json b/gameservices/v1/gameservices-api.json index 628768ce31a..e4ce357d2c1 100644 --- a/gameservices/v1/gameservices-api.json +++ b/gameservices/v1/gameservices-api.json @@ -1357,7 +1357,7 @@ } } }, - "revision": "20220216", + "revision": "20220323", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -1730,7 +1730,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gameservices/v1/gameservices-gen.go b/gameservices/v1/gameservices-gen.go index 709de8607a6..022440e443d 100644 --- a/gameservices/v1/gameservices-gen.go +++ b/gameservices/v1/gameservices-gen.go @@ -892,8 +892,7 @@ func (s *DeployedFleetStatus) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gameservices/v1beta/gameservices-api.json b/gameservices/v1beta/gameservices-api.json index 14ed6da2d84..bc0ce7887f5 100644 --- a/gameservices/v1beta/gameservices-api.json +++ b/gameservices/v1beta/gameservices-api.json @@ -1357,7 +1357,7 @@ } } }, - "revision": "20220216", + "revision": "20220323", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -1730,7 +1730,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gameservices/v1beta/gameservices-gen.go b/gameservices/v1beta/gameservices-gen.go index d7355560bd9..6cd5a2bce53 100644 --- a/gameservices/v1beta/gameservices-gen.go +++ b/gameservices/v1beta/gameservices-gen.go @@ -892,8 +892,7 @@ func (s *DeployedFleetStatus) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/genomics/v2alpha1/genomics-api.json b/genomics/v2alpha1/genomics-api.json index 1cb4335267f..d9171060821 100644 --- a/genomics/v2alpha1/genomics-api.json +++ b/genomics/v2alpha1/genomics-api.json @@ -301,7 +301,7 @@ } } }, - "revision": "20210811", + "revision": "20220328", "rootUrl": "https://genomics.googleapis.com/", "schemas": { "Accelerator": { @@ -611,7 +611,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/genomics/v2alpha1/genomics-gen.go b/genomics/v2alpha1/genomics-gen.go index f462174fb50..c8835888c65 100644 --- a/genomics/v2alpha1/genomics-gen.go +++ b/genomics/v2alpha1/genomics-gen.go @@ -730,8 +730,7 @@ func (s *DiskStatus) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 66ab90fe999..4f06167108d 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -905,7 +905,7 @@ } } }, - "revision": "20220204", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -1731,7 +1731,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index dd4aaf211b6..942f1414eac 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -1534,8 +1534,7 @@ func (s *EdgeCluster) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index b10506e9d8d..53f473c778b 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1139,7 +1139,7 @@ } } }, - "revision": "20220303", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2127,7 +2127,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 3bb254a97fa..164d99e65d1 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1856,8 +1856,7 @@ func (s *EdgeCluster) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v1alpha2/gkehub-api.json b/gkehub/v1alpha2/gkehub-api.json index 004e0b5c44f..1569dfbaa8f 100644 --- a/gkehub/v1alpha2/gkehub-api.json +++ b/gkehub/v1alpha2/gkehub-api.json @@ -652,7 +652,7 @@ } } }, - "revision": "20220122", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AuditConfig": { @@ -784,7 +784,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v1alpha2/gkehub-gen.go b/gkehub/v1alpha2/gkehub-gen.go index 389985cd975..bd3720e5bfb 100644 --- a/gkehub/v1alpha2/gkehub-gen.go +++ b/gkehub/v1alpha2/gkehub-gen.go @@ -507,8 +507,7 @@ func (s *EdgeCluster) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index c0f57d96d85..9119c80fd96 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -670,7 +670,7 @@ } } }, - "revision": "20220303", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -1535,7 +1535,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index bd41f8ad10c..0c002b57f0b 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1588,8 +1588,7 @@ func (s *ConfigManagementSyncState) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v1beta1/gkehub-api.json b/gkehub/v1beta1/gkehub-api.json index 0037073522a..8de6cd2b53c 100644 --- a/gkehub/v1beta1/gkehub-api.json +++ b/gkehub/v1beta1/gkehub-api.json @@ -706,7 +706,7 @@ } } }, - "revision": "20220122", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AuditConfig": { @@ -838,7 +838,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v1beta1/gkehub-gen.go b/gkehub/v1beta1/gkehub-gen.go index 4d7cbc47e7e..396ff653614 100644 --- a/gkehub/v1beta1/gkehub-gen.go +++ b/gkehub/v1beta1/gkehub-gen.go @@ -483,8 +483,7 @@ func (s *EdgeCluster) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/gkehub/v2alpha/gkehub-api.json b/gkehub/v2alpha/gkehub-api.json index 85cb50158e2..3e3c1367ef6 100644 --- a/gkehub/v2alpha/gkehub-api.json +++ b/gkehub/v2alpha/gkehub-api.json @@ -280,7 +280,7 @@ } } }, - "revision": "20220303", + "revision": "20220318", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -290,7 +290,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/gkehub/v2alpha/gkehub-gen.go b/gkehub/v2alpha/gkehub-gen.go index ac1119910e0..f4913d847d6 100644 --- a/gkehub/v2alpha/gkehub-gen.go +++ b/gkehub/v2alpha/gkehub-gen.go @@ -179,8 +179,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/go.mod b/go.mod index dc295538357..1425034f919 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,14 @@ go 1.15 require ( cloud.google.com/go/compute v1.5.0 github.com/google/go-cmp v0.5.7 - github.com/googleapis/gax-go/v2 v2.1.1 + github.com/googleapis/gax-go/v2 v2.2.0 go.opencensus.io v0.23.0 - golang.org/x/net v0.0.0-20220225172249-27dd8689420f + golang.org/x/net v0.0.0-20220325170049-de3da57026de golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 + golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/appengine v1.6.7 - google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 + google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb google.golang.org/grpc v1.45.0 ) diff --git a/go.sum b/go.sum index 0f01ca1d594..7b2afc16141 100644 --- a/go.sum +++ b/go.sum @@ -155,8 +155,9 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0 h1:s7jOdKSaksJVOxE0Y/S32otcfiP+UQ0cL8/GTKaONwE= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -268,8 +269,9 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de h1:pZB1TWnKi+o4bENlbzAgLrEbY4RMYmUIRobMcSmfeYc= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -286,6 +288,7 @@ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -351,8 +354,9 @@ golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 h1:eJv7u3ksNXoLbGSKuv2s/SIO4tJVxc/A+MTpzxDgz/Q= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -457,6 +461,7 @@ google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3h google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -529,8 +534,10 @@ google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 h1:FglFEfyj61zP3c6LgjmVHxYxZWXYul9oiS1EZqD5gLc= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb h1:0m9wktIpOxGw+SSKmydXWB3Z3GTfcPP6+q75HCQa6HI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/google-api-go-generator/gen.go b/google-api-go-generator/gen.go index 37e65965bb4..3dc26090268 100644 --- a/google-api-go-generator/gen.go +++ b/google-api-go-generator/gen.go @@ -124,8 +124,7 @@ func (e *compileError) Error() string { // skipAPIGeneration is a set of APIs to not generate when generating all clients. var skipAPIGeneration = map[string]bool{ - "sql:v1beta4": true, - "playintegrity:v1": true, + "sql:v1beta4": true, } func main() { diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 56701803a5c..435baa98858 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -3721,7 +3721,7 @@ ] }, "conditionalDelete": { - "description": "Deletes FHIR resources that match a search query. Implements the FHIR standard conditional delete interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.12.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.13.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#3.1.0.7.1)). If multiple resources match, all matching resources are deleted. Search terms are provided as query parameters following the same pattern as the search method. Note: Unless resource versioning is disabled by setting the disable_resource_versioning flag on the FHIR store, the deleted resources are moved to a history repository that can still be retrieved through vread and related methods, unless they are removed by the purge method. This method requires the`healthcare.fhirStores.searchResources` and `healthcare.fhirResources.delete` permissions on the parent FHIR store. For samples that show how to call `conditionalDelete`, see [Conditionally deleting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).", + "description": "Deletes FHIR resources that match a search query. Implements the FHIR standard conditional delete interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.12.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.13.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#3.1.0.7.1)). If multiple resources match, all matching resources are deleted. Search terms are provided as query parameters following the same pattern as the search method. Not all FHIR resources that match the search query might be deleted because, by default, a maximum of 100 FHIR resources can be deleted. The number of FHIR resources that can be deleted depends on the page size of the returned resources, which you can control using the `_count` query parameter. Even when using `_count`, you can delete a maximum 1,000 FHIR resources per each call of `conditionalDelete`. Note: Unless resource versioning is disabled by setting the disable_resource_versioning flag on the FHIR store, the deleted resources are moved to a history repository that can still be retrieved through vread and related methods, unless they are removed by the purge method. This method requires the`healthcare.fhirStores.searchResources` and `healthcare.fhirResources.delete` permissions on the parent FHIR store. For samples that show how to call `conditionalDelete`, see [Conditionally deleting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", "httpMethod": "DELETE", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", @@ -4865,7 +4865,7 @@ } } }, - "revision": "20220224", + "revision": "20220317", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5587,6 +5587,10 @@ "destinationDataset": { "description": "The name of the dataset resource to create and write the redacted data to. * The destination dataset must not exist. * The destination dataset must be in the same location as the source dataset. De-identifying data across multiple locations is not supported.", "type": "string" + }, + "gcsConfigUri": { + "description": "Cloud Storage location to read the JSON cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud Storage location must grant the Cloud IAM role `roles/storage.objectViewer` to the project's Cloud Healthcare Service Agent service account. Only one of `config` and `gcs_config_uri` can be specified.", + "type": "string" } }, "type": "object" @@ -5606,6 +5610,10 @@ "filterConfig": { "$ref": "DicomFilterConfig", "description": "Filter configuration." + }, + "gcsConfigUri": { + "description": "Cloud Storage location to read the JSON cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud Storage location must grant the Cloud IAM role `roles/storage.objectViewer` to the project's Cloud Healthcare Service Agent service account. Only one of `config` and `gcs_config_uri` can be specified.", + "type": "string" } }, "type": "object" @@ -5622,6 +5630,10 @@ "description": "The name of the FHIR store to create and write the redacted data to. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`. * The destination dataset must exist. * The source dataset and destination dataset must both reside in the same location. De-identifying data across multiple locations is not supported. * The destination FHIR store must exist. * The caller must have the healthcare.fhirResources.update permission to write to the destination FHIR store.", "type": "string" }, + "gcsConfigUri": { + "description": "Cloud Storage location to read the JSON cloud.healthcare.deidentify.DeidentifyConfig from, overriding the default config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud Storage location must grant the Cloud IAM role `roles/storage.objectViewer` to the project's Cloud Healthcare Service Agent service account. Only one of `config` and `gcs_config_uri` can be specified.", + "type": "string" + }, "resourceFilter": { "$ref": "FhirFilter", "description": "A filter specifying the resources to include in the output. If not specified, all resources are included in the output." diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 837bc7c406a..c7ff101b64c 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -1753,6 +1753,15 @@ type DeidentifyDatasetRequest struct { // supported. DestinationDataset string `json:"destinationDataset,omitempty"` + // GcsConfigUri: Cloud Storage location to read the JSON + // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the + // default config. Must be of the form + // `gs://{bucket_id}/path/to/object`. The Cloud Storage location must + // grant the Cloud IAM role `roles/storage.objectViewer` to the + // project's Cloud Healthcare Service Agent service account. Only one of + // `config` and `gcs_config_uri` can be specified. + GcsConfigUri string `json:"gcsConfigUri,omitempty"` + // 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 @@ -1796,6 +1805,15 @@ type DeidentifyDicomStoreRequest struct { // FilterConfig: Filter configuration. FilterConfig *DicomFilterConfig `json:"filterConfig,omitempty"` + // GcsConfigUri: Cloud Storage location to read the JSON + // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the + // default config. Must be of the form + // `gs://{bucket_id}/path/to/object`. The Cloud Storage location must + // grant the Cloud IAM role `roles/storage.objectViewer` to the + // project's Cloud Healthcare Service Agent service account. Only one of + // `config` and `gcs_config_uri` can be specified. + GcsConfigUri string `json:"gcsConfigUri,omitempty"` + // 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 @@ -1836,6 +1854,15 @@ type DeidentifyFhirStoreRequest struct { // destination FHIR store. DestinationStore string `json:"destinationStore,omitempty"` + // GcsConfigUri: Cloud Storage location to read the JSON + // cloud.healthcare.deidentify.DeidentifyConfig from, overriding the + // default config. Must be of the form + // `gs://{bucket_id}/path/to/object`. The Cloud Storage location must + // grant the Cloud IAM role `roles/storage.objectViewer` to the + // project's Cloud Healthcare Service Agent service account. Only one of + // `config` and `gcs_config_uri` can be specified. + GcsConfigUri string `json:"gcsConfigUri,omitempty"` + // ResourceFilter: A filter specifying the resources to include in the // output. If not specified, all resources are included in the output. ResourceFilter *FhirFilter `json:"resourceFilter,omitempty"` @@ -24926,11 +24953,17 @@ type ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall struct { // (https://hl7.org/implement/standards/fhir/R4/http.html#3.1.0.7.1)). // If multiple resources match, all matching resources are deleted. // Search terms are provided as query parameters following the same -// pattern as the search method. Note: Unless resource versioning is -// disabled by setting the disable_resource_versioning flag on the FHIR -// store, the deleted resources are moved to a history repository that -// can still be retrieved through vread and related methods, unless they -// are removed by the purge method. This method requires +// pattern as the search method. Not all FHIR resources that match the +// search query might be deleted because, by default, a maximum of 100 +// FHIR resources can be deleted. The number of FHIR resources that can +// be deleted depends on the page size of the returned resources, which +// you can control using the `_count` query parameter. Even when using +// `_count`, you can delete a maximum 1,000 FHIR resources per each call +// of `conditionalDelete`. Note: Unless resource versioning is disabled +// by setting the disable_resource_versioning flag on the FHIR store, +// the deleted resources are moved to a history repository that can +// still be retrieved through vread and related methods, unless they are +// removed by the purge method. This method requires // the`healthcare.fhirStores.searchResources` and // `healthcare.fhirResources.delete` permissions on the parent FHIR // store. For samples that show how to call `conditionalDelete`, see @@ -25041,7 +25074,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteCall) Do(opts . } return ret, nil // { - // "description": "Deletes FHIR resources that match a search query. Implements the FHIR standard conditional delete interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.12.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.13.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#3.1.0.7.1)). If multiple resources match, all matching resources are deleted. Search terms are provided as query parameters following the same pattern as the search method. Note: Unless resource versioning is disabled by setting the disable_resource_versioning flag on the FHIR store, the deleted resources are moved to a history repository that can still be retrieved through vread and related methods, unless they are removed by the purge method. This method requires the`healthcare.fhirStores.searchResources` and `healthcare.fhirResources.delete` permissions on the parent FHIR store. For samples that show how to call `conditionalDelete`, see [Conditionally deleting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).", + // "description": "Deletes FHIR resources that match a search query. Implements the FHIR standard conditional delete interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#2.1.0.12.1), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.13.1), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#3.1.0.7.1)). If multiple resources match, all matching resources are deleted. Search terms are provided as query parameters following the same pattern as the search method. Not all FHIR resources that match the search query might be deleted because, by default, a maximum of 100 FHIR resources can be deleted. The number of FHIR resources that can be deleted depends on the page size of the returned resources, which you can control using the `_count` query parameter. Even when using `_count`, you can delete a maximum 1,000 FHIR resources per each call of `conditionalDelete`. Note: Unless resource versioning is disabled by setting the disable_resource_versioning flag on the FHIR store, the deleted resources are moved to a history repository that can still be retrieved through vread and related methods, unless they are removed by the purge method. This method requires the`healthcare.fhirStores.searchResources` and `healthcare.fhirResources.delete` permissions on the parent FHIR store. For samples that show how to call `conditionalDelete`, see [Conditionally deleting a FHIR resource](/healthcare/docs/how-tos/fhir-resources#conditionally_deleting_a_fhir_resource).", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}", // "httpMethod": "DELETE", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDelete", diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index e9b77b78501..2c210686fe3 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -180,6 +180,39 @@ }, "providers": { "resources": { + "keys": { + "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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "iam.locations.workforcePools.providers.keys.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "operations": { "methods": { "get": { @@ -1888,7 +1921,7 @@ } } }, - "revision": "20220217", + "revision": "20220310", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 37daf7157fd..e58ce48541c 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -202,6 +202,7 @@ type LocationsWorkforcePoolsOperationsService struct { func NewLocationsWorkforcePoolsProvidersService(s *Service) *LocationsWorkforcePoolsProvidersService { rs := &LocationsWorkforcePoolsProvidersService{s: s} + rs.Keys = NewLocationsWorkforcePoolsProvidersKeysService(s) rs.Operations = NewLocationsWorkforcePoolsProvidersOperationsService(s) return rs } @@ -209,9 +210,32 @@ func NewLocationsWorkforcePoolsProvidersService(s *Service) *LocationsWorkforceP type LocationsWorkforcePoolsProvidersService struct { s *Service + Keys *LocationsWorkforcePoolsProvidersKeysService + Operations *LocationsWorkforcePoolsProvidersOperationsService } +func NewLocationsWorkforcePoolsProvidersKeysService(s *Service) *LocationsWorkforcePoolsProvidersKeysService { + rs := &LocationsWorkforcePoolsProvidersKeysService{s: s} + rs.Operations = NewLocationsWorkforcePoolsProvidersKeysOperationsService(s) + return rs +} + +type LocationsWorkforcePoolsProvidersKeysService struct { + s *Service + + Operations *LocationsWorkforcePoolsProvidersKeysOperationsService +} + +func NewLocationsWorkforcePoolsProvidersKeysOperationsService(s *Service) *LocationsWorkforcePoolsProvidersKeysOperationsService { + rs := &LocationsWorkforcePoolsProvidersKeysOperationsService{s: s} + return rs +} + +type LocationsWorkforcePoolsProvidersKeysOperationsService struct { + s *Service +} + func NewLocationsWorkforcePoolsProvidersOperationsService(s *Service) *LocationsWorkforcePoolsProvidersOperationsService { rs := &LocationsWorkforcePoolsProvidersOperationsService{s: s} return rs @@ -3168,6 +3192,154 @@ func (c *LocationsWorkforcePoolsOperationsGetCall) Do(opts ...googleapi.CallOpti } +// method id "iam.locations.workforcePools.providers.keys.operations.get": + +type LocationsWorkforcePoolsProvidersKeysOperationsGetCall 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 *LocationsWorkforcePoolsProvidersKeysOperationsService) Get(name string) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { + c := &LocationsWorkforcePoolsProvidersKeysOperationsGetCall{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 *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Fields(s ...googleapi.Field) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { + 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 *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) IfNoneMatch(entityTag string) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { + 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 *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Context(ctx context.Context) *LocationsWorkforcePoolsProvidersKeysOperationsGetCall { + 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 *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) 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 "iam.locations.workforcePools.providers.keys.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 *LocationsWorkforcePoolsProvidersKeysOperationsGetCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "iam.locations.workforcePools.providers.keys.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^locations/[^/]+/workforcePools/[^/]+/providers/[^/]+/keys/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "iam.locations.workforcePools.providers.operations.get": type LocationsWorkforcePoolsProvidersOperationsGetCall struct { diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index e03550efd4e..d37dc1d8a39 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -336,6 +336,171 @@ } } } + }, + "iap_tunnel": { + "resources": { + "locations": { + "resources": { + "destGroups": { + "methods": { + "create": { + "description": "Creates a new TunnelDestGroup.", + "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups", + "httpMethod": "POST", + "id": "iap.projects.iap_tunnel.locations.destGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. GCP Project number/id and location. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tunnelDestGroupId": { + "description": "Required. The ID to use for the TunnelDestGroup, which will become the final component of the resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/destGroups", + "request": { + "$ref": "TunnelDestGroup" + }, + "response": { + "$ref": "TunnelDestGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a TunnelDestGroup.", + "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + "httpMethod": "DELETE", + "id": "iap.projects.iap_tunnel.locations.destGroups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the TunnelDestGroup to be deleted. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}.", + "location": "path", + "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves an existing TunnelDestGroup.", + "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + "httpMethod": "GET", + "id": "iap.projects.iap_tunnel.locations.destGroups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the TunnelDestGroup to be fetched. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}.", + "location": "path", + "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TunnelDestGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: /v1/projects/123/iap_tunnel/locations/-/destGroups", + "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups", + "httpMethod": "GET", + "id": "iap.projects.iap_tunnel.locations.destGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 100 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListTunnelDestGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTunnelDestGroups` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. GCP Project number/id and location. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}. A `-` can be used for the location to group across all locations.", + "location": "path", + "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/destGroups", + "response": { + "$ref": "ListTunnelDestGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a TunnelDestGroup.", + "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + "httpMethod": "PATCH", + "id": "iap.projects.iap_tunnel.locations.destGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project.", + "location": "path", + "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The field mask specifying which IAP settings should be updated. If omitted, then all of the settings are updated. See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "TunnelDestGroup" + }, + "response": { + "$ref": "TunnelDestGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } } } }, @@ -487,7 +652,7 @@ } } }, - "revision": "20211105", + "revision": "20220318", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -621,7 +786,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -762,6 +927,24 @@ }, "type": "object" }, + "ListTunnelDestGroupsResponse": { + "description": "The response from ListTunnelDestGroups.", + "id": "ListTunnelDestGroupsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "tunnelDestGroups": { + "description": "TunnelDestGroup existing in the project.", + "items": { + "$ref": "TunnelDestGroup" + }, + "type": "array" + } + }, + "type": "object" + }, "OAuthSettings": { "description": "Configuration for OAuth login\u0026consent flow behavior as well as for OAuth Credentials.", "id": "OAuthSettings", @@ -950,6 +1133,31 @@ } }, "type": "object" + }, + "TunnelDestGroup": { + "description": "A TunnelDestGroup.", + "id": "TunnelDestGroup", + "properties": { + "cidrs": { + "description": "null List of CIDRs that this group applies to.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fqdns": { + "description": "null List of FQDNs that this group applies to.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 08dd02e59a5..0f6a26276a8 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -143,6 +143,7 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Brands = NewProjectsBrandsService(s) + rs.IapTunnel = NewProjectsIapTunnelService(s) return rs } @@ -150,6 +151,8 @@ type ProjectsService struct { s *Service Brands *ProjectsBrandsService + + IapTunnel *ProjectsIapTunnelService } func NewProjectsBrandsService(s *Service) *ProjectsBrandsService { @@ -173,6 +176,39 @@ type ProjectsBrandsIdentityAwareProxyClientsService struct { s *Service } +func NewProjectsIapTunnelService(s *Service) *ProjectsIapTunnelService { + rs := &ProjectsIapTunnelService{s: s} + rs.Locations = NewProjectsIapTunnelLocationsService(s) + return rs +} + +type ProjectsIapTunnelService struct { + s *Service + + Locations *ProjectsIapTunnelLocationsService +} + +func NewProjectsIapTunnelLocationsService(s *Service) *ProjectsIapTunnelLocationsService { + rs := &ProjectsIapTunnelLocationsService{s: s} + rs.DestGroups = NewProjectsIapTunnelLocationsDestGroupsService(s) + return rs +} + +type ProjectsIapTunnelLocationsService struct { + s *Service + + DestGroups *ProjectsIapTunnelLocationsDestGroupsService +} + +func NewProjectsIapTunnelLocationsDestGroupsService(s *Service) *ProjectsIapTunnelLocationsDestGroupsService { + rs := &ProjectsIapTunnelLocationsDestGroupsService{s: s} + return rs +} + +type ProjectsIapTunnelLocationsDestGroupsService struct { + s *Service +} + func NewV1Service(s *Service) *V1Service { rs := &V1Service{s: s} return rs @@ -490,8 +526,7 @@ func (s *CsmSettings) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -819,6 +854,43 @@ func (s *ListIdentityAwareProxyClientsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListTunnelDestGroupsResponse: The response from ListTunnelDestGroups. +type ListTunnelDestGroupsResponse struct { + // NextPageToken: A token, which can be send as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TunnelDestGroups: TunnelDestGroup existing in the project. + TunnelDestGroups []*TunnelDestGroup `json:"tunnelDestGroups,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 *ListTunnelDestGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTunnelDestGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OAuthSettings: Configuration for OAuth login&consent flow behavior as // well as for OAuth Credentials. type OAuthSettings struct { @@ -1274,6 +1346,45 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TunnelDestGroup: A TunnelDestGroup. +type TunnelDestGroup struct { + // Cidrs: null List of CIDRs that this group applies to. + Cidrs []string `json:"cidrs,omitempty"` + + // Fqdns: null List of FQDNs that this group applies to. + Fqdns []string `json:"fqdns,omitempty"` + + // Name: Required. Immutable. Identifier for the TunnelDestGroup. Must + // be unique within the project. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Cidrs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cidrs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TunnelDestGroup) MarshalJSON() ([]byte, error) { + type NoMethod TunnelDestGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "iap.projects.brands.create": type ProjectsBrandsCreateCall struct { @@ -2498,6 +2609,808 @@ func (c *ProjectsBrandsIdentityAwareProxyClientsResetSecretCall) Do(opts ...goog } +// method id "iap.projects.iap_tunnel.locations.destGroups.create": + +type ProjectsIapTunnelLocationsDestGroupsCreateCall struct { + s *Service + parent string + tunneldestgroup *TunnelDestGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new TunnelDestGroup. +// +// - parent: GCP Project number/id and location. In the following +// format: +// projects/{project_number/id}/iap_tunnel/locations/{location}. +func (r *ProjectsIapTunnelLocationsDestGroupsService) Create(parent string, tunneldestgroup *TunnelDestGroup) *ProjectsIapTunnelLocationsDestGroupsCreateCall { + c := &ProjectsIapTunnelLocationsDestGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.tunneldestgroup = tunneldestgroup + return c +} + +// TunnelDestGroupId sets the optional parameter "tunnelDestGroupId": +// Required. The ID to use for the TunnelDestGroup, which will become +// the final component of the resource name. This value should be 4-63 +// characters, and valid characters are /a-z-/. +func (c *ProjectsIapTunnelLocationsDestGroupsCreateCall) TunnelDestGroupId(tunnelDestGroupId string) *ProjectsIapTunnelLocationsDestGroupsCreateCall { + c.urlParams_.Set("tunnelDestGroupId", tunnelDestGroupId) + 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 *ProjectsIapTunnelLocationsDestGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelLocationsDestGroupsCreateCall { + 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 *ProjectsIapTunnelLocationsDestGroupsCreateCall) Context(ctx context.Context) *ProjectsIapTunnelLocationsDestGroupsCreateCall { + 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 *ProjectsIapTunnelLocationsDestGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsIapTunnelLocationsDestGroupsCreateCall) 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.tunneldestgroup) + 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}/destGroups") + 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 "iap.projects.iap_tunnel.locations.destGroups.create" call. +// Exactly one of *TunnelDestGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TunnelDestGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsIapTunnelLocationsDestGroupsCreateCall) Do(opts ...googleapi.CallOption) (*TunnelDestGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TunnelDestGroup{ + 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 TunnelDestGroup.", + // "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups", + // "httpMethod": "POST", + // "id": "iap.projects.iap_tunnel.locations.destGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. GCP Project number/id and location. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}.", + // "location": "path", + // "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "tunnelDestGroupId": { + // "description": "Required. The ID to use for the TunnelDestGroup, which will become the final component of the resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/destGroups", + // "request": { + // "$ref": "TunnelDestGroup" + // }, + // "response": { + // "$ref": "TunnelDestGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "iap.projects.iap_tunnel.locations.destGroups.delete": + +type ProjectsIapTunnelLocationsDestGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a TunnelDestGroup. +// +// - name: Name of the TunnelDestGroup to be deleted. In the following +// format: +// projects/{project_number/id}/iap_tunnel/locations/{location}/destGro +// ups/{dest_group}. +func (r *ProjectsIapTunnelLocationsDestGroupsService) Delete(name string) *ProjectsIapTunnelLocationsDestGroupsDeleteCall { + c := &ProjectsIapTunnelLocationsDestGroupsDeleteCall{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 *ProjectsIapTunnelLocationsDestGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelLocationsDestGroupsDeleteCall { + 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 *ProjectsIapTunnelLocationsDestGroupsDeleteCall) Context(ctx context.Context) *ProjectsIapTunnelLocationsDestGroupsDeleteCall { + 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 *ProjectsIapTunnelLocationsDestGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsIapTunnelLocationsDestGroupsDeleteCall) 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 "iap.projects.iap_tunnel.locations.destGroups.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 *ProjectsIapTunnelLocationsDestGroupsDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 TunnelDestGroup.", + // "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + // "httpMethod": "DELETE", + // "id": "iap.projects.iap_tunnel.locations.destGroups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the TunnelDestGroup to be deleted. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}.", + // "location": "path", + // "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "iap.projects.iap_tunnel.locations.destGroups.get": + +type ProjectsIapTunnelLocationsDestGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves an existing TunnelDestGroup. +// +// - name: Name of the TunnelDestGroup to be fetched. In the following +// format: +// projects/{project_number/id}/iap_tunnel/locations/{location}/destGro +// ups/{dest_group}. +func (r *ProjectsIapTunnelLocationsDestGroupsService) Get(name string) *ProjectsIapTunnelLocationsDestGroupsGetCall { + c := &ProjectsIapTunnelLocationsDestGroupsGetCall{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 *ProjectsIapTunnelLocationsDestGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelLocationsDestGroupsGetCall { + 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 *ProjectsIapTunnelLocationsDestGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsIapTunnelLocationsDestGroupsGetCall { + 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 *ProjectsIapTunnelLocationsDestGroupsGetCall) Context(ctx context.Context) *ProjectsIapTunnelLocationsDestGroupsGetCall { + 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 *ProjectsIapTunnelLocationsDestGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsIapTunnelLocationsDestGroupsGetCall) 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 "iap.projects.iap_tunnel.locations.destGroups.get" call. +// Exactly one of *TunnelDestGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TunnelDestGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsIapTunnelLocationsDestGroupsGetCall) Do(opts ...googleapi.CallOption) (*TunnelDestGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TunnelDestGroup{ + 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": "Retrieves an existing TunnelDestGroup.", + // "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + // "httpMethod": "GET", + // "id": "iap.projects.iap_tunnel.locations.destGroups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the TunnelDestGroup to be fetched. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}.", + // "location": "path", + // "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "TunnelDestGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "iap.projects.iap_tunnel.locations.destGroups.list": + +type ProjectsIapTunnelLocationsDestGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the existing TunnelDestGroups. To group across all +// locations, use a `-` as the location ID. For example: +// /v1/projects/123/iap_tunnel/locations/-/destGroups +// +// - parent: GCP Project number/id and location. In the following +// format: +// projects/{project_number/id}/iap_tunnel/locations/{location}. A `-` +// can be used for the location to group across all locations. +func (r *ProjectsIapTunnelLocationsDestGroupsService) List(parent string) *ProjectsIapTunnelLocationsDestGroupsListCall { + c := &ProjectsIapTunnelLocationsDestGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of groups to return. The service may return fewer than this value. If +// unspecified, at most 100 groups will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsIapTunnelLocationsDestGroupsListCall) PageSize(pageSize int64) *ProjectsIapTunnelLocationsDestGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListTunnelDestGroups` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListTunnelDestGroups` must match the call that provided +// the page token. +func (c *ProjectsIapTunnelLocationsDestGroupsListCall) PageToken(pageToken string) *ProjectsIapTunnelLocationsDestGroupsListCall { + 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 *ProjectsIapTunnelLocationsDestGroupsListCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelLocationsDestGroupsListCall { + 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 *ProjectsIapTunnelLocationsDestGroupsListCall) IfNoneMatch(entityTag string) *ProjectsIapTunnelLocationsDestGroupsListCall { + 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 *ProjectsIapTunnelLocationsDestGroupsListCall) Context(ctx context.Context) *ProjectsIapTunnelLocationsDestGroupsListCall { + 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 *ProjectsIapTunnelLocationsDestGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsIapTunnelLocationsDestGroupsListCall) 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}/destGroups") + 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 "iap.projects.iap_tunnel.locations.destGroups.list" call. +// Exactly one of *ListTunnelDestGroupsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListTunnelDestGroupsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsIapTunnelLocationsDestGroupsListCall) Do(opts ...googleapi.CallOption) (*ListTunnelDestGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListTunnelDestGroupsResponse{ + 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 the existing TunnelDestGroups. To group across all locations, use a `-` as the location ID. For example: /v1/projects/123/iap_tunnel/locations/-/destGroups", + // "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups", + // "httpMethod": "GET", + // "id": "iap.projects.iap_tunnel.locations.destGroups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 100 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListTunnelDestGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTunnelDestGroups` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. GCP Project number/id and location. In the following format: projects/{project_number/id}/iap_tunnel/locations/{location}. A `-` can be used for the location to group across all locations.", + // "location": "path", + // "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/destGroups", + // "response": { + // "$ref": "ListTunnelDestGroupsResponse" + // }, + // "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 *ProjectsIapTunnelLocationsDestGroupsListCall) Pages(ctx context.Context, f func(*ListTunnelDestGroupsResponse) 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 "iap.projects.iap_tunnel.locations.destGroups.patch": + +type ProjectsIapTunnelLocationsDestGroupsPatchCall struct { + s *Service + name string + tunneldestgroup *TunnelDestGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a TunnelDestGroup. +// +// - name: Immutable. Identifier for the TunnelDestGroup. Must be unique +// within the project. +func (r *ProjectsIapTunnelLocationsDestGroupsService) Patch(name string, tunneldestgroup *TunnelDestGroup) *ProjectsIapTunnelLocationsDestGroupsPatchCall { + c := &ProjectsIapTunnelLocationsDestGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.tunneldestgroup = tunneldestgroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": The field mask +// specifying which IAP settings should be updated. If omitted, then all +// of the settings are updated. See +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask +func (c *ProjectsIapTunnelLocationsDestGroupsPatchCall) UpdateMask(updateMask string) *ProjectsIapTunnelLocationsDestGroupsPatchCall { + 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 *ProjectsIapTunnelLocationsDestGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsIapTunnelLocationsDestGroupsPatchCall { + 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 *ProjectsIapTunnelLocationsDestGroupsPatchCall) Context(ctx context.Context) *ProjectsIapTunnelLocationsDestGroupsPatchCall { + 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 *ProjectsIapTunnelLocationsDestGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsIapTunnelLocationsDestGroupsPatchCall) 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.tunneldestgroup) + 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 "iap.projects.iap_tunnel.locations.destGroups.patch" call. +// Exactly one of *TunnelDestGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TunnelDestGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsIapTunnelLocationsDestGroupsPatchCall) Do(opts ...googleapi.CallOption) (*TunnelDestGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TunnelDestGroup{ + 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 TunnelDestGroup.", + // "flatPath": "v1/projects/{projectsId}/iap_tunnel/locations/{locationsId}/destGroups/{destGroupsId}", + // "httpMethod": "PATCH", + // "id": "iap.projects.iap_tunnel.locations.destGroups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project.", + // "location": "path", + // "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The field mask specifying which IAP settings should be updated. If omitted, then all of the settings are updated. See https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "TunnelDestGroup" + // }, + // "response": { + // "$ref": "TunnelDestGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "iap.getIamPolicy": type V1GetIamPolicyCall struct { diff --git a/ids/v1/ids-api.json b/ids/v1/ids-api.json index 67bd0eed7e9..4c3e3fc038a 100644 --- a/ids/v1/ids-api.json +++ b/ids/v1/ids-api.json @@ -535,7 +535,7 @@ } } }, - "revision": "20220110", + "revision": "20220320", "rootUrl": "https://ids.googleapis.com/", "schemas": { "AuditConfig": { @@ -615,7 +615,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/ids/v1/ids-gen.go b/ids/v1/ids-gen.go index 088887c7e66..603f80288c5 100644 --- a/ids/v1/ids-gen.go +++ b/ids/v1/ids-gen.go @@ -361,8 +361,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/internal/kokoro/populate-secrets.sh b/internal/kokoro/populate-secrets.sh index 40ee59617d1..f09f0cf8ef2 100755 --- a/internal/kokoro/populate-secrets.sh +++ b/internal/kokoro/populate-secrets.sh @@ -14,6 +14,7 @@ function println() { printf '%s\n' "$(now) $*"; } # kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +msg "Keys: ${SECRET_MANAGER_KEYS}" mkdir -p ${SECRET_LOCATION} for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g"); do msg "Retrieving secret ${key}" diff --git a/internal/version.go b/internal/version.go index b9814a32c6e..66b62400adf 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.73.0" +const Version = "0.74.0" diff --git a/jobs/v3/jobs-api.json b/jobs/v3/jobs-api.json index ca2317eb669..a0c5883dbce 100644 --- a/jobs/v3/jobs-api.json +++ b/jobs/v3/jobs-api.json @@ -651,7 +651,7 @@ } } }, - "revision": "20220303", + "revision": "20220325", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -1328,7 +1328,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1901,7 +1901,7 @@ "description": "Optional. Allows filtering jobs by commute time with different travel methods (for example, driving or public transit). Note: This only works with COMMUTE MODE. When specified, [JobQuery.location_filters] is ignored. Currently we don't support sorting by commute time." }, "companyDisplayNames": { - "description": "Optional. This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in SUBSTRING_MATCH([value]), the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", + "description": "Optional. This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in `SUBSTRING_MATCH([value])`, the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", "items": { "type": "string" }, @@ -2194,7 +2194,7 @@ "type": "string" }, "telecommutePreference": { - "description": "Optional. Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location. Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, telecommute job are not searched. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response.", + "description": "Optional. Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location). Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, the telecommute status of the jobs is ignored. Jobs that have PostingRegion.TELECOMMUTE and have additional Job.addresses may still be matched based on other location filters using address or latlng. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response.", "enum": [ "TELECOMMUTE_PREFERENCE_UNSPECIFIED", "TELECOMMUTE_EXCLUDED", @@ -2202,7 +2202,7 @@ ], "enumDescriptions": [ "Default value if the telecommute preference is not specified.", - "Exclude telecommute jobs.", + "Ignore telecommute status of jobs.", "Allow telecommute jobs." ], "type": "string" diff --git a/jobs/v3/jobs-gen.go b/jobs/v3/jobs-gen.go index 8d8661c1990..ed7958a947a 100644 --- a/jobs/v3/jobs-gen.go +++ b/jobs/v3/jobs-gen.go @@ -1344,8 +1344,7 @@ func (s *DeviceInfo) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2135,10 +2134,10 @@ type JobQuery struct { // CompanyDisplayNames: Optional. This filter specifies the company // Company.display_name of the jobs to search against. The company name // must match the value exactly. Alternatively, if the value being - // searched for is wrapped in SUBSTRING_MATCH([value]), the company name - // must contain a case insensitive substring match of the value. Using - // this function may increase latency. Sample Value: - // SUBSTRING_MATCH(google) If a value isn't specified, jobs within the + // searched for is wrapped in `SUBSTRING_MATCH([value])`, the company + // name must contain a case insensitive substring match of the value. + // Using this function may increase latency. Sample Value: + // `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the // search results are associated with any company. If multiple values // are specified, jobs within the search results may be associated with // any of the specified companies. At most 20 company display name @@ -2591,23 +2590,25 @@ type LocationFilter struct { // TelecommutePreference: Optional. Allows the client to return jobs // without a set location, specifically, telecommuting jobs - // (telecommuting is considered by the service as a special location. + // (telecommuting is considered by the service as a special location). // Job.posting_region indicates if a job permits telecommuting. If this // field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, // telecommuting jobs are searched, and address and lat_lng are ignored. - // If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, - // telecommute job are not searched. This filter can be used by itself - // to search exclusively for telecommuting jobs, or it can be combined - // with another location filter to search for a combination of job - // locations, such as "Mountain View" or "telecommuting" jobs. However, - // when used in combination with other location filters, telecommuting - // jobs can be treated as less relevant than other jobs in the search - // response. + // If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, the + // telecommute status of the jobs is ignored. Jobs that have + // PostingRegion.TELECOMMUTE and have additional Job.addresses may still + // be matched based on other location filters using address or latlng. + // This filter can be used by itself to search exclusively for + // telecommuting jobs, or it can be combined with another location + // filter to search for a combination of job locations, such as + // "Mountain View" or "telecommuting" jobs. However, when used in + // combination with other location filters, telecommuting jobs can be + // treated as less relevant than other jobs in the search response. // // Possible values: // "TELECOMMUTE_PREFERENCE_UNSPECIFIED" - Default value if the // telecommute preference is not specified. - // "TELECOMMUTE_EXCLUDED" - Exclude telecommute jobs. + // "TELECOMMUTE_EXCLUDED" - Ignore telecommute status of jobs. // "TELECOMMUTE_ALLOWED" - Allow telecommute jobs. TelecommutePreference string `json:"telecommutePreference,omitempty"` diff --git a/jobs/v3p1beta1/jobs-api.json b/jobs/v3p1beta1/jobs-api.json index 4ed25a7f2ff..0e0fb64e778 100644 --- a/jobs/v3p1beta1/jobs-api.json +++ b/jobs/v3p1beta1/jobs-api.json @@ -681,7 +681,7 @@ } } }, - "revision": "20220303", + "revision": "20220325", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -1395,7 +1395,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1998,7 +1998,7 @@ "description": "Optional. Allows filtering jobs by commute time with different travel methods (for example, driving or public transit). Note: This only works with COMMUTE MODE. When specified, [JobQuery.location_filters] is ignored. Currently we don't support sorting by commute time." }, "companyDisplayNames": { - "description": "Optional. This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in SUBSTRING_MATCH([value]), the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", + "description": "Optional. This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in `SUBSTRING_MATCH([value])`, the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", "items": { "type": "string" }, @@ -2298,7 +2298,7 @@ "type": "string" }, "telecommutePreference": { - "description": "Optional. Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location. Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, telecommute job are not searched. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response.", + "description": "Optional. Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location). Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, the telecommute status of the jobs is ignored. Jobs that have PostingRegion.TELECOMMUTE and have additional Job.addresses may still be matched based on other location filters using address or latlng. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response.", "enum": [ "TELECOMMUTE_PREFERENCE_UNSPECIFIED", "TELECOMMUTE_EXCLUDED", @@ -2306,7 +2306,7 @@ ], "enumDescriptions": [ "Default value if the telecommute preference is not specified.", - "Exclude telecommute jobs.", + "Ignore telecommute status of jobs.", "Allow telecommute jobs." ], "type": "string" diff --git a/jobs/v3p1beta1/jobs-gen.go b/jobs/v3p1beta1/jobs-gen.go index a17033aaa75..edc38ec7fe6 100644 --- a/jobs/v3p1beta1/jobs-gen.go +++ b/jobs/v3p1beta1/jobs-gen.go @@ -1429,8 +1429,7 @@ func (s *DeviceInfo) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2352,10 +2351,10 @@ type JobQuery struct { // CompanyDisplayNames: Optional. This filter specifies the company // Company.display_name of the jobs to search against. The company name // must match the value exactly. Alternatively, if the value being - // searched for is wrapped in SUBSTRING_MATCH([value]), the company name - // must contain a case insensitive substring match of the value. Using - // this function may increase latency. Sample Value: - // SUBSTRING_MATCH(google) If a value isn't specified, jobs within the + // searched for is wrapped in `SUBSTRING_MATCH([value])`, the company + // name must contain a case insensitive substring match of the value. + // Using this function may increase latency. Sample Value: + // `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the // search results are associated with any company. If multiple values // are specified, jobs within the search results may be associated with // any of the specified companies. At most 20 company display name @@ -2813,23 +2812,25 @@ type LocationFilter struct { // TelecommutePreference: Optional. Allows the client to return jobs // without a set location, specifically, telecommuting jobs - // (telecommuting is considered by the service as a special location. + // (telecommuting is considered by the service as a special location). // Job.posting_region indicates if a job permits telecommuting. If this // field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, // telecommuting jobs are searched, and address and lat_lng are ignored. - // If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, - // telecommute job are not searched. This filter can be used by itself - // to search exclusively for telecommuting jobs, or it can be combined - // with another location filter to search for a combination of job - // locations, such as "Mountain View" or "telecommuting" jobs. However, - // when used in combination with other location filters, telecommuting - // jobs can be treated as less relevant than other jobs in the search - // response. + // If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, the + // telecommute status of the jobs is ignored. Jobs that have + // PostingRegion.TELECOMMUTE and have additional Job.addresses may still + // be matched based on other location filters using address or latlng. + // This filter can be used by itself to search exclusively for + // telecommuting jobs, or it can be combined with another location + // filter to search for a combination of job locations, such as + // "Mountain View" or "telecommuting" jobs. However, when used in + // combination with other location filters, telecommuting jobs can be + // treated as less relevant than other jobs in the search response. // // Possible values: // "TELECOMMUTE_PREFERENCE_UNSPECIFIED" - Default value if the // telecommute preference is not specified. - // "TELECOMMUTE_EXCLUDED" - Exclude telecommute jobs. + // "TELECOMMUTE_EXCLUDED" - Ignore telecommute status of jobs. // "TELECOMMUTE_ALLOWED" - Allow telecommute jobs. TelecommutePreference string `json:"telecommutePreference,omitempty"` diff --git a/jobs/v4/jobs-api.json b/jobs/v4/jobs-api.json index b1062dfa8be..aab7c3aba21 100644 --- a/jobs/v4/jobs-api.json +++ b/jobs/v4/jobs-api.json @@ -903,7 +903,7 @@ } } }, - "revision": "20220303", + "revision": "20220325", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -1599,7 +1599,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -2060,7 +2060,7 @@ "type": "array" }, "companyDisplayNames": { - "description": "This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in SUBSTRING_MATCH([value]), the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: SUBSTRING_MATCH(google) If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", + "description": "This filter specifies the company Company.display_name of the jobs to search against. The company name must match the value exactly. Alternatively, if the value being searched for is wrapped in `SUBSTRING_MATCH([value])`, the company name must contain a case insensitive substring match of the value. Using this function may increase latency. Sample Value: `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the search results are associated with any company. If multiple values are specified, jobs within the search results may be associated with any of the specified companies. At most 20 company display name filters are allowed.", "items": { "type": "string" }, @@ -2390,7 +2390,7 @@ "type": "string" }, "telecommutePreference": { - "description": "Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location. Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, telecommute job are not searched. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response. This field is only used for job search requests.", + "description": "Allows the client to return jobs without a set location, specifically, telecommuting jobs (telecommuting is considered by the service as a special location). Job.posting_region indicates if a job permits telecommuting. If this field is set to TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched, and address and lat_lng are ignored. If not set or set to TelecommutePreference.TELECOMMUTE_EXCLUDED, the telecommute status of the jobs is ignored. Jobs that have PostingRegion.TELECOMMUTE and have additional Job.addresses may still be matched based on other location filters using address or latlng. This filter can be used by itself to search exclusively for telecommuting jobs, or it can be combined with another location filter to search for a combination of job locations, such as \"Mountain View\" or \"telecommuting\" jobs. However, when used in combination with other location filters, telecommuting jobs can be treated as less relevant than other jobs in the search response. This field is only used for job search requests.", "enum": [ "TELECOMMUTE_PREFERENCE_UNSPECIFIED", "TELECOMMUTE_EXCLUDED", @@ -2398,7 +2398,7 @@ ], "enumDescriptions": [ "Default value if the telecommute preference isn't specified.", - "Exclude telecommute jobs.", + "Ignore telecommute status of jobs.", "Allow telecommute jobs." ], "type": "string" diff --git a/jobs/v4/jobs-gen.go b/jobs/v4/jobs-gen.go index dd9aade2997..24081cdeb3d 100644 --- a/jobs/v4/jobs-gen.go +++ b/jobs/v4/jobs-gen.go @@ -1325,8 +1325,7 @@ func (s *DeviceInfo) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1998,10 +1997,10 @@ type JobQuery struct { // CompanyDisplayNames: This filter specifies the company // Company.display_name of the jobs to search against. The company name // must match the value exactly. Alternatively, if the value being - // searched for is wrapped in SUBSTRING_MATCH([value]), the company name - // must contain a case insensitive substring match of the value. Using - // this function may increase latency. Sample Value: - // SUBSTRING_MATCH(google) If a value isn't specified, jobs within the + // searched for is wrapped in `SUBSTRING_MATCH([value])`, the company + // name must contain a case insensitive substring match of the value. + // Using this function may increase latency. Sample Value: + // `SUBSTRING_MATCH(google)` If a value isn't specified, jobs within the // search results are associated with any company. If multiple values // are specified, jobs within the search results may be associated with // any of the specified companies. At most 20 company display name @@ -2516,23 +2515,25 @@ type LocationFilter struct { // TelecommutePreference: Allows the client to return jobs without a set // location, specifically, telecommuting jobs (telecommuting is - // considered by the service as a special location. Job.posting_region + // considered by the service as a special location). Job.posting_region // indicates if a job permits telecommuting. If this field is set to // TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are // searched, and address and lat_lng are ignored. If not set or set to - // TelecommutePreference.TELECOMMUTE_EXCLUDED, telecommute job are not - // searched. This filter can be used by itself to search exclusively for - // telecommuting jobs, or it can be combined with another location - // filter to search for a combination of job locations, such as - // "Mountain View" or "telecommuting" jobs. However, when used in - // combination with other location filters, telecommuting jobs can be - // treated as less relevant than other jobs in the search response. This - // field is only used for job search requests. + // TelecommutePreference.TELECOMMUTE_EXCLUDED, the telecommute status of + // the jobs is ignored. Jobs that have PostingRegion.TELECOMMUTE and + // have additional Job.addresses may still be matched based on other + // location filters using address or latlng. This filter can be used by + // itself to search exclusively for telecommuting jobs, or it can be + // combined with another location filter to search for a combination of + // job locations, such as "Mountain View" or "telecommuting" jobs. + // However, when used in combination with other location filters, + // telecommuting jobs can be treated as less relevant than other jobs in + // the search response. This field is only used for job search requests. // // Possible values: // "TELECOMMUTE_PREFERENCE_UNSPECIFIED" - Default value if the // telecommute preference isn't specified. - // "TELECOMMUTE_EXCLUDED" - Exclude telecommute jobs. + // "TELECOMMUTE_EXCLUDED" - Ignore telecommute status of jobs. // "TELECOMMUTE_ALLOWED" - Allow telecommute jobs. TelecommutePreference string `json:"telecommutePreference,omitempty"` diff --git a/keep/v1/keep-api.json b/keep/v1/keep-api.json index d4a00f2eacf..05a86882c5b 100644 --- a/keep/v1/keep-api.json +++ b/keep/v1/keep-api.json @@ -314,7 +314,7 @@ } } }, - "revision": "20220308", + "revision": "20220322", "rootUrl": "https://keep.googleapis.com/", "schemas": { "Attachment": { @@ -393,7 +393,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/keep/v1/keep-gen.go b/keep/v1/keep-gen.go index 6391242a7fb..1ca58909deb 100644 --- a/keep/v1/keep-gen.go +++ b/keep/v1/keep-gen.go @@ -348,8 +348,7 @@ func (s *CreatePermissionRequest) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/licensing/v1/licensing-api.json b/licensing/v1/licensing-api.json index 256fca0f873..92c6716bfd9 100644 --- a/licensing/v1/licensing-api.json +++ b/licensing/v1/licensing-api.json @@ -400,11 +400,11 @@ } } }, - "revision": "20201116", + "revision": "20220319", "rootUrl": "https://licensing.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/licensing/v1/licensing-gen.go b/licensing/v1/licensing-gen.go index baad6edc328..48db42a1ee4 100644 --- a/licensing/v1/licensing-gen.go +++ b/licensing/v1/licensing-gen.go @@ -149,8 +149,7 @@ type LicenseAssignmentsService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 259dbb9f0b9..c59704c8251 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -5817,7 +5817,7 @@ } } }, - "revision": "20220211", + "revision": "20220318", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryOptions": { @@ -5869,6 +5869,10 @@ "description": "The resource name for the configured Cloud KMS key.KMS key name format: \"projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]\" For example:\"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key\"To enable CMEK for the Log Router, set this field to a valid kms_key_name for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name or disabled by setting the key name to an empty string. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.To disable CMEK for the Log Router, set this field to an empty string.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.", "type": "string" }, + "kmsKeyVersionName": { + "description": "The CryptoKeyVersion resource name for the configured Cloud KMS key.KMS key name format: \"projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]\" For example:\"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1\"This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.", + "type": "string" + }, "name": { "description": "Output only. The resource name of the CMEK settings.", "readOnly": true, @@ -5970,7 +5974,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "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" diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index 5a6002ebc8f..8d6a3492d1a 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -839,6 +839,17 @@ type CmekSettings struct { // for more information. KmsKeyName string `json:"kmsKeyName,omitempty"` + // KmsKeyVersionName: The CryptoKeyVersion resource name for the + // configured Cloud KMS key.KMS key name format: + // "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoK + // eys/[KEY]/cryptoKeyVersions/[VERSION]" For + // example:"projects/my-project/locations/us-central1/keyRings/my-ring/cr + // yptoKeys/my-key/cryptoKeyVersions/1"This is a read-only field used to + // convey the specific configured CryptoKeyVersion of kms_key that has + // been configured. It will be populated in cases where the CMEK + // settings are bound to a single key version. + KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"` + // Name: Output only. The resource name of the CMEK settings. Name string `json:"name,omitempty"` @@ -1018,8 +1029,7 @@ func (s *CopyLogEntriesResponse) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/manufacturers/v1/manufacturers-api.json b/manufacturers/v1/manufacturers-api.json index 2d29a1168c7..b9b748d697a 100644 --- a/manufacturers/v1/manufacturers-api.json +++ b/manufacturers/v1/manufacturers-api.json @@ -287,7 +287,7 @@ } } }, - "revision": "20220126", + "revision": "20220323", "rootUrl": "https://manufacturers.googleapis.com/", "schemas": { "Attributes": { @@ -538,7 +538,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/manufacturers/v1/manufacturers-gen.go b/manufacturers/v1/manufacturers-gen.go index 939f13629f4..c159e659f78 100644 --- a/manufacturers/v1/manufacturers-gen.go +++ b/manufacturers/v1/manufacturers-gen.go @@ -456,8 +456,7 @@ func (s *DestinationStatus) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index 3267072feb5..c00e82567fd 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -528,7 +528,7 @@ } } }, - "revision": "20220208", + "revision": "20220317", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -572,7 +572,7 @@ "type": "object" }, "Date": { - "description": "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 (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "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", "id": "Date", "properties": { "day": { @@ -633,6 +633,36 @@ }, "type": "object" }, + "GoogleCloudMemcacheV1MaintenancePolicy": { + "description": "Maintenance policy per instance.", + "id": "GoogleCloudMemcacheV1MaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Required. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_windows is expected to be one.", + "items": { + "$ref": "WeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudMemcacheV1OperationMetadata": { "description": "Represents the metadata of a long-running operation.", "id": "GoogleCloudMemcacheV1OperationMetadata", @@ -978,6 +1008,15 @@ "description": "Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources", "type": "object" }, + "maintenancePolicy": { + "$ref": "GoogleCloudMemcacheV1MaintenancePolicy", + "description": "The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule." + }, + "maintenanceSchedule": { + "$ref": "MaintenanceSchedule", + "description": "Output only. Published maintenance schedule.", + "readOnly": true + }, "memcacheFullVersion": { "description": "Output only. The full version of memcached server running on this instance. System automatically determines the full memcached version for an instance based on the input MemcacheVersion. The full version format will be \"memcached-1.5.16\".", "readOnly": true, @@ -1239,6 +1278,31 @@ }, "type": "object" }, + "MaintenanceSchedule": { + "description": "Upcoming maintenance schedule.", + "id": "MaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "MaintenanceWindow": { "description": "MaintenanceWindow definition.", "id": "MaintenanceWindow", @@ -1574,6 +1638,46 @@ }, "type": "object" }, + "WeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "WeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Required. Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Required. Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Required. Start time of the window in UTC." + } + }, + "type": "object" + }, "ZoneMetadata": { "id": "ZoneMetadata", "properties": {}, diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index 88d157f5e9e..1b70bea2d1e 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -258,11 +258,12 @@ func (s *DailyCycle) MarshalJSON() ([]byte, error) { // 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 (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// 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 Date 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 @@ -389,6 +390,48 @@ func (s *GoogleCloudMemcacheV1LocationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudMemcacheV1MaintenancePolicy: Maintenance policy per +// instance. +type GoogleCloudMemcacheV1MaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Description of what this policy is for. Create/Update + // methods return INVALID_ARGUMENT if the length is greater than 512. + Description string `json:"description,omitempty"` + + // UpdateTime: Output only. The time when the policy was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // WeeklyMaintenanceWindow: Required. Maintenance window that is applied + // to resources covered by this policy. Minimum 1. For the current + // version, the maximum number of weekly_maintenance_windows is expected + // to be one. + WeeklyMaintenanceWindow []*WeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,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 *GoogleCloudMemcacheV1MaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMemcacheV1MaintenancePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudMemcacheV1OperationMetadata: Represents the metadata of a // long-running operation. type GoogleCloudMemcacheV1OperationMetadata struct { @@ -895,6 +938,14 @@ type Instance struct { // https://cloud.google.com/compute/docs/labeling-resources Labels map[string]string `json:"labels,omitempty"` + // MaintenancePolicy: The maintenance policy for the instance. If not + // provided, the maintenance event will be performed based on + // Memorystore internal rollout schedule. + MaintenancePolicy *GoogleCloudMemcacheV1MaintenancePolicy `json:"maintenancePolicy,omitempty"` + + // MaintenanceSchedule: Output only. Published maintenance schedule. + MaintenanceSchedule *MaintenanceSchedule `json:"maintenanceSchedule,omitempty"` + // MemcacheFullVersion: Output only. The full version of memcached // server running on this instance. System automatically determines the // full memcached version for an instance based on the input @@ -1281,6 +1332,43 @@ func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaintenanceSchedule: Upcoming maintenance schedule. +type MaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled + // maintenance for this instance. + EndTime string `json:"endTime,omitempty"` + + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + + // StartTime: Output only. The start time of any upcoming scheduled + // maintenance for this instance. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceSchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MaintenanceWindow: MaintenanceWindow definition. type MaintenanceWindow struct { // DailyCycle: Daily cycle. @@ -1781,6 +1869,51 @@ func (s *WeeklyCycle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WeeklyMaintenanceWindow: Time window specified for weekly operations. +type WeeklyMaintenanceWindow struct { + // Day: Required. Allows to define schedule that runs specified day of + // the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // Duration: Required. Duration of the time window. + Duration string `json:"duration,omitempty"` + + // StartTime: Required. Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,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 *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod WeeklyMaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ZoneMetadata struct { } diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index 3d74e3427f8..acfbe6ea3e0 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20220208", + "revision": "20220317", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -618,7 +618,7 @@ "type": "object" }, "Date": { - "description": "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 (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "description": "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", "id": "Date", "properties": { "day": { @@ -679,6 +679,36 @@ }, "type": "object" }, + "GoogleCloudMemcacheV1beta2MaintenancePolicy": { + "description": "Maintenance policy per instance.", + "id": "GoogleCloudMemcacheV1beta2MaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Required. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_windows is expected to be one.", + "items": { + "$ref": "WeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudMemcacheV1beta2OperationMetadata": { "description": "Represents the metadata of a long-running operation.", "id": "GoogleCloudMemcacheV1beta2OperationMetadata", @@ -1024,6 +1054,15 @@ "description": "Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources", "type": "object" }, + "maintenancePolicy": { + "$ref": "GoogleCloudMemcacheV1beta2MaintenancePolicy", + "description": "The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule." + }, + "maintenanceSchedule": { + "$ref": "MaintenanceSchedule", + "description": "Output only. Published maintenance schedule.", + "readOnly": true + }, "memcacheFullVersion": { "description": "Output only. The full version of memcached server running on this instance. System automatically determines the full memcached version for an instance based on the input MemcacheVersion. The full version format will be \"memcached-1.5.16\".", "readOnly": true, @@ -1290,6 +1329,31 @@ }, "type": "object" }, + "MaintenanceSchedule": { + "description": "Upcoming maintenance schedule.", + "id": "MaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "MaintenanceWindow": { "description": "MaintenanceWindow definition.", "id": "MaintenanceWindow", @@ -1630,6 +1694,46 @@ }, "type": "object" }, + "WeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "WeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Required. Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Required. Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Required. Start time of the window in UTC." + } + }, + "type": "object" + }, "ZoneMetadata": { "id": "ZoneMetadata", "properties": {}, diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 3665aca72e9..e4548ce239f 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -292,11 +292,12 @@ func (s *DailyCycle) MarshalJSON() ([]byte, error) { // 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 (e.g., an anniversary) * A year on its own, with a zero -// month and a zero day * A year and month, with a zero day (e.g., a -// credit card expiration date) Related types: * google.type.TimeOfDay * -// google.type.DateTime * google.protobuf.Timestamp +// 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 Date 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 @@ -423,6 +424,48 @@ func (s *GoogleCloudMemcacheV1beta2LocationMetadata) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudMemcacheV1beta2MaintenancePolicy: Maintenance policy per +// instance. +type GoogleCloudMemcacheV1beta2MaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Description of what this policy is for. Create/Update + // methods return INVALID_ARGUMENT if the length is greater than 512. + Description string `json:"description,omitempty"` + + // UpdateTime: Output only. The time when the policy was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // WeeklyMaintenanceWindow: Required. Maintenance window that is applied + // to resources covered by this policy. Minimum 1. For the current + // version, the maximum number of weekly_maintenance_windows is expected + // to be one. + WeeklyMaintenanceWindow []*WeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,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 *GoogleCloudMemcacheV1beta2MaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMemcacheV1beta2MaintenancePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudMemcacheV1beta2OperationMetadata: Represents the metadata // of a long-running operation. type GoogleCloudMemcacheV1beta2OperationMetadata struct { @@ -928,6 +971,14 @@ type Instance struct { // https://cloud.google.com/compute/docs/labeling-resources Labels map[string]string `json:"labels,omitempty"` + // MaintenancePolicy: The maintenance policy for the instance. If not + // provided, the maintenance event will be performed based on + // Memorystore internal rollout schedule. + MaintenancePolicy *GoogleCloudMemcacheV1beta2MaintenancePolicy `json:"maintenancePolicy,omitempty"` + + // MaintenanceSchedule: Output only. Published maintenance schedule. + MaintenanceSchedule *MaintenanceSchedule `json:"maintenanceSchedule,omitempty"` + // MemcacheFullVersion: Output only. The full version of memcached // server running on this instance. System automatically determines the // full memcached version for an instance based on the input @@ -1318,6 +1369,43 @@ func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaintenanceSchedule: Upcoming maintenance schedule. +type MaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled + // maintenance for this instance. + EndTime string `json:"endTime,omitempty"` + + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + + // StartTime: Output only. The start time of any upcoming scheduled + // maintenance for this instance. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceSchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MaintenanceWindow: MaintenanceWindow definition. type MaintenanceWindow struct { // DailyCycle: Daily cycle. @@ -1822,6 +1910,51 @@ func (s *WeeklyCycle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WeeklyMaintenanceWindow: Time window specified for weekly operations. +type WeeklyMaintenanceWindow struct { + // Day: Required. Allows to define schedule that runs specified day of + // the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // Duration: Required. Duration of the time window. + Duration string `json:"duration,omitempty"` + + // StartTime: Required. Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,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 *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod WeeklyMaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ZoneMetadata struct { } diff --git a/ml/v1/ml-api.json b/ml/v1/ml-api.json index ba0d46e2fa0..69fdb569a1a 100644 --- a/ml/v1/ml-api.json +++ b/ml/v1/ml-api.json @@ -1486,7 +1486,7 @@ } } }, - "revision": "20211112", + "revision": "20220318", "rootUrl": "https://ml.googleapis.com/", "schemas": { "GoogleApi__HttpBody": { @@ -3847,7 +3847,7 @@ "type": "object" }, "GoogleProtobuf__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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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": "GoogleProtobuf__Empty", "properties": {}, "type": "object" diff --git a/ml/v1/ml-gen.go b/ml/v1/ml-gen.go index 01f70c3715a..ee8ed40809e 100644 --- a/ml/v1/ml-gen.go +++ b/ml/v1/ml-gen.go @@ -4636,8 +4636,7 @@ func (s *GoogleLongrunning__Operation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobuf__Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index cd654074eae..17f596b33c1 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -679,7 +679,7 @@ } } }, - "revision": "20220214", + "revision": "20220322", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -995,7 +995,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "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" diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index 67af05c2367..9b6960ab3d3 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -963,8 +963,7 @@ func (s *DroppedLabels) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index d4c3e2888a8..6eabd326bcc 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2571,7 +2571,7 @@ } } }, - "revision": "20220218", + "revision": "20220322", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -3241,7 +3241,7 @@ "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); } The JSON representation for Empty is empty JSON object {}.", + "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" diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index c8cf8496874..577c431337d 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -1738,8 +1738,7 @@ func (s *DroppedLabels) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for Empty is empty -// JSON object {}. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json index 3a7b26f369d..6fa8649145e 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json @@ -530,7 +530,7 @@ } } }, - "revision": "20220215", + "revision": "20220322", "rootUrl": "https://mybusinessaccountmanagement.googleapis.com/", "schemas": { "AcceptInvitationRequest": { @@ -699,7 +699,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go index 4cc1e3fe0c5..f0b113b90d6 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go @@ -375,8 +375,7 @@ type DeclineInvitationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json index 9ed52355d93..9dd6b5b3511 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json @@ -662,7 +662,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://mybusinessbusinessinformation.googleapis.com/", "schemas": { "AdWordsLocationExtensions": { @@ -983,7 +983,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go index aa8863e1203..f9317ee359b 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go @@ -792,8 +792,7 @@ func (s *Date) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/mybusinessnotifications/v1/mybusinessnotifications-api.json b/mybusinessnotifications/v1/mybusinessnotifications-api.json index 09e6d858b14..427b7298161 100644 --- a/mybusinessnotifications/v1/mybusinessnotifications-api.json +++ b/mybusinessnotifications/v1/mybusinessnotifications-api.json @@ -154,7 +154,7 @@ } } }, - "revision": "20220205", + "revision": "20220322", "rootUrl": "https://mybusinessnotifications.googleapis.com/", "schemas": { "NotificationSetting": { @@ -194,7 +194,7 @@ "An answer of the location is updated. The notification will provide the resource name of question and answer.", "Indicates whether there is a change in location metadata's duplicate location field.", "Deprecated: Migrate the existing usages of this value to the more expanded \"VOICE_OF_MERCHANT_UPDATED\".", - "Indicates whether the location has an update in voice of merchant status. Call GetVoiceOfMerchantState rpc for more details" + "Indicates whether the location has an update in Voice of Merchant (VOM) status. VOM dictates whether the location is in good standing and the merchant has control over the business on Google. Any edits made to the location will propagate to Maps after passing the review phase. Call GetVoiceOfMerchantState rpc for more details." ], "type": "string" }, diff --git a/mybusinessnotifications/v1/mybusinessnotifications-gen.go b/mybusinessnotifications/v1/mybusinessnotifications-gen.go index 9b82bf5dd87..454d20a09da 100644 --- a/mybusinessnotifications/v1/mybusinessnotifications-gen.go +++ b/mybusinessnotifications/v1/mybusinessnotifications-gen.go @@ -178,8 +178,11 @@ type NotificationSetting struct { // usages of this value to the more expanded // "VOICE_OF_MERCHANT_UPDATED". // "VOICE_OF_MERCHANT_UPDATED" - Indicates whether the location has an - // update in voice of merchant status. Call GetVoiceOfMerchantState rpc - // for more details + // update in Voice of Merchant (VOM) status. VOM dictates whether the + // location is in good standing and the merchant has control over the + // business on Google. Any edits made to the location will propagate to + // Maps after passing the review phase. Call GetVoiceOfMerchantState rpc + // for more details. NotificationTypes []string `json:"notificationTypes,omitempty"` // PubsubTopic: Optional. The Google Pub/Sub topic that will receive diff --git a/mybusinessplaceactions/v1/mybusinessplaceactions-api.json b/mybusinessplaceactions/v1/mybusinessplaceactions-api.json index ba2f8c3fb55..3564d49d0b0 100644 --- a/mybusinessplaceactions/v1/mybusinessplaceactions-api.json +++ b/mybusinessplaceactions/v1/mybusinessplaceactions-api.json @@ -281,11 +281,11 @@ } } }, - "revision": "20210427", + "revision": "20220322", "rootUrl": "https://mybusinessplaceactions.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go b/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go index a3213a24388..91c56f1c827 100644 --- a/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go +++ b/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go @@ -162,8 +162,7 @@ type PlaceActionTypeMetadataService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/mybusinessqanda/v1/mybusinessqanda-api.json b/mybusinessqanda/v1/mybusinessqanda-api.json index ff8591fee6a..6a22b1e7016 100644 --- a/mybusinessqanda/v1/mybusinessqanda-api.json +++ b/mybusinessqanda/v1/mybusinessqanda-api.json @@ -323,7 +323,7 @@ } } }, - "revision": "20211211", + "revision": "20220322", "rootUrl": "https://mybusinessqanda.googleapis.com/", "schemas": { "Answer": { @@ -397,7 +397,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/mybusinessqanda/v1/mybusinessqanda-gen.go b/mybusinessqanda/v1/mybusinessqanda-gen.go index 7c9568cbad9..e344677b461 100644 --- a/mybusinessqanda/v1/mybusinessqanda-gen.go +++ b/mybusinessqanda/v1/mybusinessqanda-gen.go @@ -254,8 +254,7 @@ func (s *Author) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 71bfc1383a4..ec6d88ed8cb 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -938,7 +938,7 @@ } } }, - "revision": "20220210", + "revision": "20220321", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1012,7 +1012,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 0b4cca143f7..bf286e88869 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -392,8 +392,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index 9516da9d578..37db1f175ca 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -938,7 +938,7 @@ } } }, - "revision": "20211113", + "revision": "20220321", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1012,7 +1012,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 317a3f50753..a61f75146b2 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -392,8 +392,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 26f2c5c3117..73b2d062ed9 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20220228", + "revision": "20220323", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1000,7 +1000,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index e474a210b11..fbd77071c0b 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -884,8 +884,7 @@ func (s *EdgeLocation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 983fab20365..aafb78b7835 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -421,156 +421,184 @@ } } }, - "operations": { + "gateways": { "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "create": { + "description": "Creates a new Gateway in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", "httpMethod": "POST", - "id": "networkservices.projects.locations.operations.cancel", + "id": "networkservices.projects.locations.gateways.create", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", + "gatewayId": { + "description": "Required. Short name of the Gateway resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/global`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+name}:cancel", + "path": "v1beta1/{+parent}/gateways", "request": { - "$ref": "CancelOperationRequest" + "$ref": "Gateway" }, "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "description": "Deletes a single Gateway.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", "httpMethod": "DELETE", - "id": "networkservices.projects.locations.operations.delete", + "id": "networkservices.projects.locations.gateways.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource to be deleted.", + "description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/global/gateways/*`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "description": "Gets details of a single Gateway.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", "httpMethod": "GET", - "id": "networkservices.projects.locations.operations.get", + "id": "networkservices.projects.locations.gateways.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource.", + "description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/global/gateways/*`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "Operation" + "$ref": "Gateway" }, "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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:getIamPolicy", "httpMethod": "GET", - "id": "networkservices.projects.locations.operations.list", + "id": "networkservices.projects.locations.gateways.getIamPolicy", "parameterOrder": [ - "name" + "resource" ], "parameters": { - "filter": { - "description": "The standard list filter.", + "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": "string" + "type": "integer" }, - "name": { - "description": "The name of the operation's parent resource.", + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", "required": true, "type": "string" - }, + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Gateways in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", + "httpMethod": "GET", + "id": "networkservices.projects.locations.gateways.list", + "parameterOrder": [ + "parent" + ], + "parameters": { "pageSize": { - "description": "The standard list page size.", + "description": "Maximum number of Gateways to return per call.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` 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 Gateways should be listed, specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" } }, - "path": "v1beta1/{+name}/operations", + "path": "v1beta1/{+parent}/gateways", "response": { - "$ref": "ListOperationsResponse" + "$ref": "ListGatewaysResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "serviceBindings": { - "methods": { - "create": { - "description": "Creates a new ServiceBinding in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.create", + }, + "patch": { + "description": "Updates the parameters of a single Gateway.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.gateways.patch", "parameterOrder": [ - "parent" + "name" ], "parameters": { - "parent": { - "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + "name": { + "description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/global/gateways/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", "required": true, "type": "string" }, - "serviceBindingId": { - "description": "Required. Short name of the ServiceBinding resource to be created.", + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", "location": "query", "type": "string" } }, - "path": "v1beta1/{+parent}/serviceBindings", + "path": "v1beta1/{+name}", "request": { - "$ref": "ServiceBinding" + "$ref": "Gateway" }, "response": { "$ref": "Operation" @@ -579,24 +607,92 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "delete": { - "description": "Deletes a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.serviceBindings.delete", + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkservices.projects.locations.gateways.setIamPolicy", "parameterOrder": [ - "name" + "resource" ], "parameters": { - "name": { - "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+name}", + "path": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.gateways.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "grpcRoutes": { + "methods": { + "create": { + "description": "Creates a new GrpcRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", + "httpMethod": "POST", + "id": "networkservices.projects.locations.grpcRoutes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "grpcRouteId": { + "description": "Required. Short name of the GrpcRoute resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/grpcRoutes", + "request": { + "$ref": "GrpcRoute" + }, "response": { "$ref": "Operation" }, @@ -604,116 +700,110 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets details of a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.get", + "delete": { + "description": "Deletes a single GrpcRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.grpcRoutes.delete", "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 GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "ServiceBinding" + "$ref": "Operation" }, "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + "get": { + "description": "Gets details of a single GrpcRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + "id": "networkservices.projects.locations.grpcRoutes.get", "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 the operation documentation for the appropriate value for this field.", + "name": { + "description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+resource}:getIamPolicy", + "path": "v1beta1/{+name}", "response": { - "$ref": "Policy" + "$ref": "GrpcRoute" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists ServiceBinding in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + "description": "Lists GrpcRoutes in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.list", + "id": "networkservices.projects.locations.grpcRoutes.list", "parameterOrder": [ "parent" ], "parameters": { "pageSize": { - "description": "Maximum number of ServiceBindings to return per call.", + "description": "Maximum number of GrpcRoutes 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 `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` 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 GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/serviceBindings", + "path": "v1beta1/{+parent}/grpcRoutes", "response": { - "$ref": "ListServiceBindingsResponse" + "$ref": "ListGrpcRoutesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + "description": "Updates the parameters of a single GrpcRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", "httpMethod": "PATCH", - "id": "networkservices.projects.locations.serviceBindings.patch", + "id": "networkservices.projects.locations.grpcRoutes.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name\u003e`.", + "description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding 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.", + "description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute 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" @@ -721,7 +811,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "ServiceBinding" + "$ref": "GrpcRoute" }, "response": { "$ref": "Operation" @@ -729,265 +819,2191 @@ "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", + } + } + }, + "httpRoutes": { + "methods": { + "create": { + "description": "Creates a new HttpRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + "id": "networkservices.projects.locations.httpRoutes.create", "parameterOrder": [ - "resource" + "parent" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "httpRouteId": { + "description": "Required. Short name of the HttpRoute resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+resource}:setIamPolicy", + "path": "v1beta1/{+parent}/httpRoutes", "request": { - "$ref": "SetIamPolicyRequest" + "$ref": "HttpRoute" }, "response": { - "$ref": "Policy" + "$ref": "Operation" }, "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + "delete": { + "description": "Deletes a single HttpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.httpRoutes.delete", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "name": { + "description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+resource}:testIamPermissions", + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single HttpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.httpRoutes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "HttpRoute" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists HttpRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", + "httpMethod": "GET", + "id": "networkservices.projects.locations.httpRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of HttpRoutes to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListHttpRoutesResponse` 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 HttpRoutes should be listed, specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/httpRoutes", + "response": { + "$ref": "ListHttpRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single HttpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.httpRoutes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name\u003e`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", "request": { - "$ref": "TestIamPermissionsRequest" + "$ref": "HttpRoute" }, "response": { - "$ref": "TestIamPermissionsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } } - } - } - } - } - } - }, - "revision": "20220105", - "rootUrl": "https://networkservices.googleapis.com/", - "schemas": { - "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", - "id": "AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", - "id": "AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + }, + "meshes": { + "methods": { + "create": { + "description": "Creates a new Mesh in a given project and location.", + "flatPath": "v1beta1/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": "v1beta1/{+parent}/meshes", + "request": { + "$ref": "Mesh" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Mesh.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Mesh.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "Mesh" + }, + "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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Meshes in a given project and location.", + "flatPath": "v1beta1/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": "v1beta1/{+parent}/meshes", + "response": { + "$ref": "ListMeshesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Mesh.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "request": { + "$ref": "Mesh" + }, + "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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta1/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": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/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": "v1beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceBindings": { + "methods": { + "create": { + "description": "Creates a new ServiceBinding in a given project and location.", + "flatPath": "v1beta1/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": "v1beta1/{+parent}/serviceBindings", + "request": { + "$ref": "ServiceBinding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServiceBinding.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServiceBinding.", + "flatPath": "v1beta1/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": "v1beta1/{+name}", + "response": { + "$ref": "ServiceBinding" + }, + "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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServiceBinding in a given project and location.", + "flatPath": "v1beta1/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": "v1beta1/{+parent}/serviceBindings", + "response": { + "$ref": "ListServiceBindingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServiceBinding.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.serviceBindings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name\u003e`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "ServiceBinding" + }, + "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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tcpRoutes": { + "methods": { + "create": { + "description": "Creates a new TcpRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", + "httpMethod": "POST", + "id": "networkservices.projects.locations.tcpRoutes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tcpRouteId": { + "description": "Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tcpRoutes", + "request": { + "$ref": "TcpRoute" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TcpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.tcpRoutes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TcpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.tcpRoutes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "TcpRoute" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TcpRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", + "httpMethod": "GET", + "id": "networkservices.projects.locations.tcpRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of TcpRoutes to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListTcpRoutesResponse` 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 TcpRoutes should be listed, specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tcpRoutes", + "response": { + "$ref": "ListTcpRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single TcpRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.tcpRoutes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "TcpRoute" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tlsRoutes": { + "methods": { + "create": { + "description": "Creates a new TlsRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", + "httpMethod": "POST", + "id": "networkservices.projects.locations.tlsRoutes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tlsRouteId": { + "description": "Required. Short name of the TlsRoute resource to be created. E.g. TODO(Add an example).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsRoutes", + "request": { + "$ref": "TlsRoute" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TlsRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.tlsRoutes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TlsRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.tlsRoutes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "TlsRoute" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TlsRoute in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", + "httpMethod": "GET", + "id": "networkservices.projects.locations.tlsRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of TlsRoutes to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListTlsRoutesResponse` 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 TlsRoutes should be listed, specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsRoutes", + "response": { + "$ref": "ListTlsRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single TlsRoute.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.tlsRoutes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name\u003e`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "TlsRoute" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220309", + "rootUrl": "https://networkservices.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Cloud Platform 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. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EndpointMatcher": { + "description": "A definition of a matcher that selects endpoints to which the policies should be applied.", + "id": "EndpointMatcher", + "properties": { + "metadataLabelMatcher": { + "$ref": "MetadataLabelMatcher", + "description": "The matcher is based on node metadata presented by xDS clients." + } + }, + "type": "object" + }, + "EndpointPolicy": { + "description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", + "id": "EndpointPolicy", + "properties": { + "authorizationPolicy": { + "description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", + "type": "string" + }, + "clientTlsPolicy": { + "description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "endpointMatcher": { + "$ref": "EndpointMatcher", + "description": "Required. A matcher that selects endpoints to which the policies should be applied." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the EndpointPolicy resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", + "type": "string" + }, + "serverTlsPolicy": { + "description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", + "type": "string" + }, + "trafficPortSelector": { + "$ref": "TrafficPortSelector", + "description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." + }, + "type": { + "description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", + "enum": [ + "ENDPOINT_POLICY_TYPE_UNSPECIFIED", + "SIDECAR_PROXY", + "GRPC_SERVER" + ], + "enumDescriptions": [ + "Default value. Must not be used.", + "Represents a proxy deployed as a sidecar.", + "Represents a proxyless gRPC backend." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "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", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "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.", + "id": "Gateway", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the Gateway resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/global/gateways/`.", + "type": "string" + }, + "ports": { + "description": "Required. One or more ports that the Gateway must receive traffic on. The proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports specified below.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "scope": { + "description": "Required. Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", + "type": "string" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "serverTlsPolicy": { + "description": "Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.", + "type": "string" + }, + "type": { + "description": "Immutable. The type of the customer managed gateway.", + "enum": [ + "TYPE_UNSPECIFIED", + "OPEN_MESH", + "SECURE_WEB_GATEWAY" + ], + "enumDescriptions": [ + "The type of the customer managed gateway is unspecified.", + "The type of the customer managed gateway is TrafficDirector Open Mesh.", + "The type of the customer managed gateway is SecureWebGateway (SWG)." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GrpcRoute": { + "description": "GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or Gateway resource is routed.", + "id": "GrpcRoute", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "gateways": { + "description": "Optional. Gateways defines a list of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", + "items": { + "type": "string" + }, + "type": "array" + }, + "hostnames": { + "description": "Required. Service hostnames with an optional port for which this route describes traffic. Format: [:] Hostname is the fully qualified domain name of a network host. This matches the RFC 1123 definition of a hostname with 2 notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (*.). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.example.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. *.example.com). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateway must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames \"*.foo.bar.com\" and \"*.bar.com\" to be associated with the same route, it is not possible to associate two routes both with \"*.bar.com\" or both with \"bar.com\". If a port is specified, then gRPC clients must use the channel URI with the port to match this rule (i.e. \"xds:///service:123\"), otherwise they must supply the URI without a port (i.e. \"xds:///service\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the GrpcRoute resource.", + "type": "object" + }, + "meshes": { + "description": "Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/`", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", + "type": "string" + }, + "rules": { + "description": "Required. A list of detailed rules defining how to route traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching GrpcRoute.RouteRule will be executed. At least one rule must be supplied.", + "items": { + "$ref": "GrpcRouteRouteRule" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GrpcRouteDestination": { + "description": "The destination to which traffic will be routed.", + "id": "GrpcRouteDestination", + "properties": { + "serviceName": { + "description": "Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.", + "type": "string" + }, + "weight": { + "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GrpcRouteFaultInjectionPolicy": { + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests.", + "id": "GrpcRouteFaultInjectionPolicy", + "properties": { + "abort": { + "$ref": "GrpcRouteFaultInjectionPolicyAbort", + "description": "The specification for aborting to client requests." + }, + "delay": { + "$ref": "GrpcRouteFaultInjectionPolicyDelay", + "description": "The specification for injecting delay to client requests." + } + }, + "type": "object" + }, + "GrpcRouteFaultInjectionPolicyAbort": { + "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", + "id": "GrpcRouteFaultInjectionPolicyAbort", + "properties": { + "httpStatus": { + "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", + "format": "int32", + "type": "integer" + }, + "percentage": { + "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GrpcRouteFaultInjectionPolicyDelay": { + "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", + "id": "GrpcRouteFaultInjectionPolicyDelay", + "properties": { + "fixedDelay": { + "description": "Specify a fixed delay before forwarding the request.", + "format": "google-duration", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GrpcRouteHeaderMatch": { + "description": "A match against a collection of headers.", + "id": "GrpcRouteHeaderMatch", + "properties": { + "key": { + "description": "Required. The key of the header.", + "type": "string" + }, + "type": { + "description": "Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used.", + "enum": [ + "TYPE_UNSPECIFIED", + "EXACT", + "REGULAR_EXPRESSION" + ], + "enumDescriptions": [ + "Unspecified.", + "Will only match the exact value provided.", + "Will match paths conforming to the prefix specified by value. RE2 syntax is supported." + ], + "type": "string" + }, + "value": { + "description": "Required. The value of the header.", + "type": "string" + } + }, + "type": "object" + }, + "GrpcRouteMethodMatch": { + "description": "Specifies a match against a method.", + "id": "GrpcRouteMethodMatch", + "properties": { + "caseSensitive": { + "description": "Optional. Specifies that matches are case sensitive. The default value is true. case_sensitive must not be used with a type of REGULAR_EXPRESSION.", + "type": "boolean" + }, + "grpcMethod": { + "description": "Required. Name of the method to match against. If unspecified, will match all methods.", + "type": "string" + }, + "grpcService": { + "description": "Required. Name of the service to match against. If unspecified, will match all services.", + "type": "string" + }, + "type": { + "description": "Optional. Specifies how to match against the name. If not specified, a default value of \"EXACT\" is used.", + "enum": [ + "TYPE_UNSPECIFIED", + "EXACT", + "REGULAR_EXPRESSION" + ], + "enumDescriptions": [ + "Unspecified.", + "Will only match the exact name provided.", + "Will interpret grpc_method and grpc_service as regexes. RE2 syntax is supported." + ], + "type": "string" + } + }, + "type": "object" + }, + "GrpcRouteRetryPolicy": { + "description": "The specifications for retries.", + "id": "GrpcRouteRetryPolicy", + "properties": { + "numRetries": { + "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specpfied, default to 1.", + "format": "uint32", + "type": "integer" + }, + "retryConditions": { + "description": "- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GrpcRouteRouteAction": { + "description": "Specifies how to route matched traffic.", + "id": "GrpcRouteRouteAction", + "properties": { + "destinations": { + "description": "Optional. The destination services to which traffic should be forwarded. If multiple destinations are specified, traffic will be split between Backend Service(s) according to the weight field of these destinations.", + "items": { + "$ref": "GrpcRouteDestination" + }, + "type": "array" + }, + "faultInjectionPolicy": { + "$ref": "GrpcRouteFaultInjectionPolicy", + "description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" + }, + "retryPolicy": { + "$ref": "GrpcRouteRetryPolicy", + "description": "Optional. Specifies the retry policy associated with this route." + }, + "timeout": { + "description": "Optional. Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GrpcRouteRouteMatch": { + "description": "Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.", + "id": "GrpcRouteRouteMatch", + "properties": { + "headers": { + "description": "Optional. Specifies a collection of headers to match.", + "items": { + "$ref": "GrpcRouteHeaderMatch" + }, + "type": "array" + }, + "method": { + "$ref": "GrpcRouteMethodMatch", + "description": "Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods." + } + }, + "type": "object" + }, + "GrpcRouteRouteRule": { + "description": "Describes how to route traffic.", + "id": "GrpcRouteRouteRule", + "properties": { + "action": { + "$ref": "GrpcRouteRouteAction", + "description": "Required. A detailed rule defining how to route traffic. This field is required." + }, + "matches": { + "description": "Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic.", + "items": { + "$ref": "GrpcRouteRouteMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpRoute": { + "description": "HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.", + "id": "HttpRoute", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "gateways": { + "description": "Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", + "items": { + "type": "string" + }, + "type": "array" + }, + "hostnames": { + "description": "Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (*.). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.example.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. *.example.com). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames \"*.foo.bar.com\" and \"*.bar.com\" to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with \"*.bar.com\" or both with \"bar.com\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the HttpRoute resource.", + "type": "object" + }, + "meshes": { + "description": "Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name\u003e`.", + "type": "string" + }, + "rules": { + "description": "Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.", + "items": { + "$ref": "HttpRouteRouteRule" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "HttpRouteCorsPolicy": { + "description": "The Specification for allowing client side cross-origin requests.", + "id": "HttpRouteCorsPolicy", + "properties": { + "allowCredentials": { + "description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.", + "type": "boolean" + }, + "allowHeaders": { + "description": "Specifies the content for Access-Control-Allow-Headers header.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowMethods": { + "description": "Specifies the content for Access-Control-Allow-Methods header.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowOriginRegexes": { + "description": "Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowOrigins": { + "description": "Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "disabled": { + "description": "If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.", + "type": "boolean" + }, + "exposeHeaders": { + "description": "Specifies the content for Access-Control-Expose-Headers header.", "items": { "type": "string" }, "type": "array" }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], + "maxAge": { + "description": "Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.", "type": "string" } }, "type": "object" }, - "Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "Binding", + "HttpRouteDestination": { + "description": "Specifications of a destination to which the request should be routed to.", + "id": "HttpRouteDestination", "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." - }, - "members": { - "description": "Specifies the principals requesting access for a Cloud Platform 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. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `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. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "serviceName": { + "description": "The URL of a BackendService to route traffic to.", "type": "string" + }, + "weight": { + "description": "Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, + "HttpRouteFaultInjectionPolicy": { + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.", + "id": "HttpRouteFaultInjectionPolicy", + "properties": { + "abort": { + "$ref": "HttpRouteFaultInjectionPolicyAbort", + "description": "The specification for aborting to client requests." + }, + "delay": { + "$ref": "HttpRouteFaultInjectionPolicyDelay", + "description": "The specification for injecting delay to client requests." + } + }, "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); } The JSON representation for `Empty` is empty JSON object `{}`.", - "id": "Empty", - "properties": {}, + "HttpRouteFaultInjectionPolicyAbort": { + "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", + "id": "HttpRouteFaultInjectionPolicyAbort", + "properties": { + "httpStatus": { + "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", + "format": "int32", + "type": "integer" + }, + "percentage": { + "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", + "format": "int32", + "type": "integer" + } + }, "type": "object" }, - "EndpointMatcher": { - "description": "A definition of a matcher that selects endpoints to which the policies should be applied.", - "id": "EndpointMatcher", + "HttpRouteFaultInjectionPolicyDelay": { + "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", + "id": "HttpRouteFaultInjectionPolicyDelay", "properties": { - "metadataLabelMatcher": { - "$ref": "MetadataLabelMatcher", - "description": "The matcher is based on node metadata presented by xDS clients." + "fixedDelay": { + "description": "Specify a fixed delay before forwarding the request.", + "format": "google-duration", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "EndpointPolicy": { - "description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", - "id": "EndpointPolicy", + "HttpRouteHeaderMatch": { + "description": "Specifies how to select a route rule based on HTTP request headers.", + "id": "HttpRouteHeaderMatch", "properties": { - "authorizationPolicy": { - "description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", + "exactMatch": { + "description": "The value of the header should match exactly the content of exact_match.", "type": "string" }, - "clientTlsPolicy": { - "description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", + "header": { + "description": "The name of the HTTP header to match against.", "type": "string" }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, + "invertMatch": { + "description": "If specified, the match result will be inverted before checking. Default value is set to false.", + "type": "boolean" + }, + "prefixMatch": { + "description": "The value of the header must start with the contents of prefix_match.", "type": "string" }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", + "presentMatch": { + "description": "A header with header_name must exist. The match takes place whether or not the header has a value.", + "type": "boolean" + }, + "rangeMatch": { + "$ref": "HttpRouteHeaderMatchIntegerRange", + "description": "If specified, the rule will match if the request header value is within the range." + }, + "regexMatch": { + "description": "The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax", "type": "string" }, - "endpointMatcher": { - "$ref": "EndpointMatcher", - "description": "Required. A matcher that selects endpoints to which the policies should be applied." + "suffixMatch": { + "description": "The value of the header must end with the contents of suffix_match.", + "type": "string" + } + }, + "type": "object" + }, + "HttpRouteHeaderMatchIntegerRange": { + "description": "Represents an integer value range.", + "id": "HttpRouteHeaderMatchIntegerRange", + "properties": { + "end": { + "description": "End of the range (exclusive)", + "format": "int32", + "type": "integer" }, - "labels": { + "start": { + "description": "Start of the range (inclusive)", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "HttpRouteHeaderModifier": { + "description": "The specification for modifying HTTP header in HTTP request and HTTP response.", + "id": "HttpRouteHeaderModifier", + "properties": { + "add": { "additionalProperties": { "type": "string" }, - "description": "Optional. Set of label tags associated with the EndpointPolicy resource.", + "description": "Add the headers with given map where key is the name of the header, value is the value of the header.", "type": "object" }, - "name": { - "description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", + "remove": { + "description": "Remove headers (matching by header names) specified in the list.", + "items": { + "type": "string" + }, + "type": "array" + }, + "set": { + "additionalProperties": { + "type": "string" + }, + "description": "Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.", + "type": "object" + } + }, + "type": "object" + }, + "HttpRouteQueryParameterMatch": { + "description": "Specifications to match a query parameter in the request.", + "id": "HttpRouteQueryParameterMatch", + "properties": { + "exactMatch": { + "description": "The value of the query parameter must exactly match the contents of exact_match. Only one of exact_match, regex_match, or present_match must be set.", "type": "string" }, - "serverTlsPolicy": { - "description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", + "presentMatch": { + "description": "Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. Only one of exact_match, regex_match, or present_match must be set.", + "type": "boolean" + }, + "queryParameter": { + "description": "The name of the query parameter to match.", "type": "string" }, - "trafficPortSelector": { - "$ref": "TrafficPortSelector", - "description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." + "regexMatch": { + "description": "The value of the query parameter must match the regular expression specified by regex_match. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match must be set.", + "type": "string" + } + }, + "type": "object" + }, + "HttpRouteRedirect": { + "description": "The specification for redirecting traffic.", + "id": "HttpRouteRedirect", + "properties": { + "hostRedirect": { + "description": "The host that will be used in the redirect response instead of the one that was supplied in the request.", + "type": "string" }, - "type": { - "description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", + "httpsRedirect": { + "description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.", + "type": "boolean" + }, + "pathRedirect": { + "description": "The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.", + "type": "string" + }, + "portRedirect": { + "description": "The port that will be used in the redirected request instead of the one that was supplied in the request.", + "format": "int32", + "type": "integer" + }, + "prefixRewrite": { + "description": "Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.", + "type": "string" + }, + "responseCode": { + "description": "The HTTP Status code to use for the redirect.", "enum": [ - "ENDPOINT_POLICY_TYPE_UNSPECIFIED", - "SIDECAR_PROXY", - "GRPC_SERVER" + "RESPONSE_CODE_UNSPECIFIED", + "MOVED_PERMANENTLY_DEFAULT", + "FOUND", + "SEE_OTHER", + "TEMPORARY_REDIRECT", + "PERMANENT_REDIRECT" ], "enumDescriptions": [ - "Default value. Must not be used.", - "Represents a proxy deployed as a sidecar.", - "Represents a proxyless gRPC backend." + "Default value", + "Corresponds to 301.", + "Corresponds to 302.", + "Corresponds to 303.", + "Corresponds to 307. In this case, the request method will be retained.", + "Corresponds to 308. In this case, the request method will be retained." ], "type": "string" }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, + "stripQuery": { + "description": "if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.", + "type": "boolean" + } + }, + "type": "object" + }, + "HttpRouteRequestMirrorPolicy": { + "description": "Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow.", + "id": "HttpRouteRequestMirrorPolicy", + "properties": { + "destination": { + "$ref": "HttpRouteDestination", + "description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." + } + }, + "type": "object" + }, + "HttpRouteRetryPolicy": { + "description": "The specifications for retries.", + "id": "HttpRouteRetryPolicy", + "properties": { + "numRetries": { + "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specified, default to 1.", + "format": "int32", + "type": "integer" + }, + "perTryTimeout": { + "description": "Specifies a non-zero timeout per retry attempt.", + "format": "google-duration", "type": "string" + }, + "retryConditions": { + "description": "Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.", + "items": { + "type": "string" + }, + "type": "array" } }, "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", + "HttpRouteRouteAction": { + "description": "The specifications for routing traffic and applying associated policies.", + "id": "HttpRouteRouteAction", "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "corsPolicy": { + "$ref": "HttpRouteCorsPolicy", + "description": "The specification for allowing client side cross-origin requests." + }, + "destinations": { + "description": "The destination to which traffic should be forwarded.", + "items": { + "$ref": "HttpRouteDestination" + }, + "type": "array" + }, + "faultInjectionPolicy": { + "$ref": "HttpRouteFaultInjectionPolicy", + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" + }, + "redirect": { + "$ref": "HttpRouteRedirect", + "description": "If set, the request is directed as configured by this field." + }, + "requestHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "The specification for modifying the headers of a matching request prior to delivery of the request to the destination." + }, + "requestMirrorPolicy": { + "$ref": "HttpRouteRequestMirrorPolicy", + "description": "Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow." + }, + "responseHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "The specification for modifying the headers of a response prior to sending the response back to the client." + }, + "retryPolicy": { + "$ref": "HttpRouteRetryPolicy", + "description": "Specifies the retry policy associated with this route." + }, + "timeout": { + "description": "Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", + "format": "google-duration", "type": "string" }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", + "urlRewrite": { + "$ref": "HttpRouteURLRewrite", + "description": "The specification for rewrite URL before forwarding requests to the destination." + } + }, + "type": "object" + }, + "HttpRouteRouteMatch": { + "description": "RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.", + "id": "HttpRouteRouteMatch", + "properties": { + "fullPathMatch": { + "description": "The HTTP request path value should exactly match this value. Only one of full_path_match, prefix_match, or regex_match should be used.", + "type": "string" + }, + "headers": { + "description": "Specifies a list of HTTP request headers to match against. ALL of the supplied headers must be matched.", + "items": { + "$ref": "HttpRouteHeaderMatch" + }, + "type": "array" + }, + "ignoreCase": { + "description": "Specifies if prefix_match and full_path_match matches are case sensitive. The default value is false.", + "type": "boolean" + }, + "prefixMatch": { + "description": "The HTTP request path value must begin with specified prefix_match. prefix_match must begin with a /. Only one of full_path_match, prefix_match, or regex_match should be used.", + "type": "string" + }, + "queryParameters": { + "description": "Specifies a list of query parameters to match against. ALL of the query parameters must be matched.", + "items": { + "$ref": "HttpRouteQueryParameterMatch" + }, + "type": "array" + }, + "regexMatch": { + "description": "The HTTP request path value must satisfy the regular expression specified by regex_match after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or regex_match should be used.", + "type": "string" + } + }, + "type": "object" + }, + "HttpRouteRouteRule": { + "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", + "id": "HttpRouteRouteRule", + "properties": { + "action": { + "$ref": "HttpRouteRouteAction", + "description": "The detailed rule defining how to route matched traffic." + }, + "matches": { + "description": "A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.", + "items": { + "$ref": "HttpRouteRouteMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpRouteURLRewrite": { + "description": "The specification for modifying the URL of the request, prior to forwarding the request to the destination.", + "id": "HttpRouteURLRewrite", + "properties": { + "hostRewrite": { + "description": "Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.", + "type": "string" + }, + "pathPrefixRewrite": { + "description": "Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.", + "type": "string" + } + }, + "type": "object" + }, + "ListEndpointPoliciesResponse": { + "description": "Response returned by the ListEndpointPolicies method.", + "id": "ListEndpointPoliciesResponse", + "properties": { + "endpointPolicies": { + "description": "List of EndpointPolicy resources.", + "items": { + "$ref": "EndpointPolicy" + }, + "type": "array" + }, + "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" + } + }, + "type": "object" + }, + "ListGatewaysResponse": { + "description": "Response returned by the ListGateways method.", + "id": "ListGatewaysResponse", + "properties": { + "gateways": { + "description": "List of Gateway resources.", + "items": { + "$ref": "Gateway" + }, + "type": "array" }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "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" + } + }, + "type": "object" + }, + "ListGrpcRoutesResponse": { + "description": "Response returned by the ListGrpcRoutes method.", + "id": "ListGrpcRoutesResponse", + "properties": { + "grpcRoutes": { + "description": "List of GrpcRoute resources.", + "items": { + "$ref": "GrpcRoute" + }, + "type": "array" }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "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" } }, "type": "object" }, - "ListEndpointPoliciesResponse": { - "description": "Response returned by the ListEndpointPolicies method.", - "id": "ListEndpointPoliciesResponse", + "ListHttpRoutesResponse": { + "description": "Response returned by the ListHttpRoutes method.", + "id": "ListHttpRoutesResponse", "properties": { - "endpointPolicies": { - "description": "List of EndpointPolicy resources.", + "httpRoutes": { + "description": "List of HttpRoute resources.", "items": { - "$ref": "EndpointPolicy" + "$ref": "HttpRoute" }, "type": "array" }, @@ -1016,6 +3032,24 @@ }, "type": "object" }, + "ListMeshesResponse": { + "description": "Response returned by the ListMeshes method.", + "id": "ListMeshesResponse", + "properties": { + "meshes": { + "description": "List of Mesh resources.", + "items": { + "$ref": "Mesh" + }, + "type": "array" + }, + "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" + } + }, + "type": "object" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -1052,6 +3086,42 @@ }, "type": "object" }, + "ListTcpRoutesResponse": { + "description": "Response returned by the ListTcpRoutes method.", + "id": "ListTcpRoutesResponse", + "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" + }, + "tcpRoutes": { + "description": "List of TcpRoute resources.", + "items": { + "$ref": "TcpRoute" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListTlsRoutesResponse": { + "description": "Response returned by the ListTlsRoutes method.", + "id": "ListTlsRoutesResponse", + "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" + }, + "tlsRoutes": { + "description": "List of TlsRoute resources.", + "items": { + "$ref": "TlsRoute" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -1086,6 +3156,50 @@ }, "type": "object" }, + "Mesh": { + "description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", + "id": "Mesh", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "interceptionPort": { + "description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This will is applicable only for sidecar proxy deployments.", + "format": "int32", + "type": "integer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the Mesh resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", + "type": "string" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "MetadataLabelMatcher": { "description": "The matcher that is based on node metadata presented by xDS clients.", "id": "MetadataLabelMatcher", @@ -1324,6 +3438,133 @@ }, "type": "object" }, + "TcpRoute": { + "description": "TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.", + "id": "TcpRoute", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "gateways": { + "description": "Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the TcpRoute resource.", + "type": "object" + }, + "meshes": { + "description": "Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`.", + "type": "string" + }, + "rules": { + "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", + "items": { + "$ref": "TcpRouteRouteRule" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TcpRouteRouteAction": { + "description": "The specifications for routing traffic and applying associated policies.", + "id": "TcpRouteRouteAction", + "properties": { + "destinations": { + "description": "Optional. The destination services to which traffic should be forwarded. At least one destination service is required.", + "items": { + "$ref": "TcpRouteRouteDestination" + }, + "type": "array" + }, + "originalDestination": { + "description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false.", + "type": "boolean" + } + }, + "type": "object" + }, + "TcpRouteRouteDestination": { + "description": "Describe the destination for traffic to be routed to.", + "id": "TcpRouteRouteDestination", + "properties": { + "serviceName": { + "description": "Required. The URL of a BackendService to route traffic to.", + "type": "string" + }, + "weight": { + "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TcpRouteRouteMatch": { + "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", + "id": "TcpRouteRouteMatch", + "properties": { + "address": { + "description": "Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: \"10.0.0.1\" - matches against this exact IP address. \"10.0.0.0/8\" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. \"0.0.0.0/0\" - matches against any IP address'.", + "type": "string" + }, + "port": { + "description": "Required. Specifies the destination port to match against.", + "type": "string" + } + }, + "type": "object" + }, + "TcpRouteRouteRule": { + "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", + "id": "TcpRouteRouteRule", + "properties": { + "action": { + "$ref": "TcpRouteRouteAction", + "description": "Required. The detailed rule defining how to route matched traffic." + }, + "matches": { + "description": "Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", + "items": { + "$ref": "TcpRouteRouteMatch" + }, + "type": "array" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", @@ -1352,6 +3593,128 @@ }, "type": "object" }, + "TlsRoute": { + "description": "TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.", + "id": "TlsRoute", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the 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" + }, + "gateways": { + "description": "Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", + "items": { + "type": "string" + }, + "type": "array" + }, + "meshes": { + "description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name\u003e`.", + "type": "string" + }, + "rules": { + "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", + "items": { + "$ref": "TlsRouteRouteRule" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined URL of this resource", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TlsRouteRouteAction": { + "description": "The specifications for routing traffic and applying associated policies.", + "id": "TlsRouteRouteAction", + "properties": { + "destinations": { + "description": "Required. The destination services to which traffic should be forwarded. At least one destination service is required.", + "items": { + "$ref": "TlsRouteRouteDestination" + }, + "type": "array" + } + }, + "type": "object" + }, + "TlsRouteRouteDestination": { + "description": "Describe the destination for traffic to be routed to.", + "id": "TlsRouteRouteDestination", + "properties": { + "serviceName": { + "description": "Required. The URL of a BackendService to route traffic to.", + "type": "string" + }, + "weight": { + "description": "Optional. Specifies the proportion of requests forwareded to the backend referenced by the service_name field. This is computed as: weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TlsRouteRouteMatch": { + "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are “AND”ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", + "id": "TlsRouteRouteMatch", + "properties": { + "alpn": { + "description": "Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: \"http/1.1\", \"h2\". At least one of sni_host and alpn is required. Up to 5 alpns across all matches can be set.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sniHost": { + "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. www.example.com will be first matched against www.example.com, then *.example.com, then *.com. Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 5 sni hosts across all matches can be set.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TlsRouteRouteRule": { + "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", + "id": "TlsRouteRouteRule", + "properties": { + "action": { + "$ref": "TlsRouteRouteAction", + "description": "Required. The detailed rule defining how to route matched traffic." + }, + "matches": { + "description": "Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are “OR”ed for evaluation.", + "items": { + "$ref": "TlsRouteRouteMatch" + }, + "type": "array" + } + }, + "type": "object" + }, "TrafficPortSelector": { "description": "Specification of a port-based selector.", "id": "TrafficPortSelector", diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index f26b1be74a2..672683e6e56 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -152,8 +152,14 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s) + rs.Gateways = NewProjectsLocationsGatewaysService(s) + rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) + rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) + rs.Meshes = NewProjectsLocationsMeshesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) + rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s) + rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s) return rs } @@ -162,9 +168,21 @@ type ProjectsLocationsService struct { EndpointPolicies *ProjectsLocationsEndpointPoliciesService + Gateways *ProjectsLocationsGatewaysService + + GrpcRoutes *ProjectsLocationsGrpcRoutesService + + HttpRoutes *ProjectsLocationsHttpRoutesService + + Meshes *ProjectsLocationsMeshesService + Operations *ProjectsLocationsOperationsService ServiceBindings *ProjectsLocationsServiceBindingsService + + TcpRoutes *ProjectsLocationsTcpRoutesService + + TlsRoutes *ProjectsLocationsTlsRoutesService } func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService { @@ -176,6 +194,42 @@ type ProjectsLocationsEndpointPoliciesService struct { s *Service } +func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService { + rs := &ProjectsLocationsGatewaysService{s: s} + return rs +} + +type ProjectsLocationsGatewaysService struct { + s *Service +} + +func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService { + rs := &ProjectsLocationsGrpcRoutesService{s: s} + return rs +} + +type ProjectsLocationsGrpcRoutesService struct { + s *Service +} + +func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService { + rs := &ProjectsLocationsHttpRoutesService{s: s} + return rs +} + +type ProjectsLocationsHttpRoutesService struct { + s *Service +} + +func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService { + rs := &ProjectsLocationsMeshesService{s: s} + return rs +} + +type ProjectsLocationsMeshesService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -194,6 +248,24 @@ type ProjectsLocationsServiceBindingsService struct { s *Service } +func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService { + rs := &ProjectsLocationsTcpRoutesService{s: s} + return rs +} + +type ProjectsLocationsTcpRoutesService struct { + s *Service +} + +func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService { + rs := &ProjectsLocationsTlsRoutesService{s: s} + return rs +} + +type ProjectsLocationsTlsRoutesService struct { + s *Service +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -570,23 +642,67 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListEndpointPoliciesResponse: Response returned by the -// ListEndpointPolicies method. -type ListEndpointPoliciesResponse struct { - // EndpointPolicies: List of EndpointPolicy resources. - EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,omitempty"` +// 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. +type Gateway struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` - // 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"` + // Description: Optional. A free-text description of the resource. Max + // length 1024 characters. + Description string `json:"description,omitempty"` + + // Labels: Optional. Set of label tags associated with the Gateway + // resource. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Required. Name of the Gateway resource. It matches pattern + // `projects/*/locations/global/gateways/`. + Name string `json:"name,omitempty"` + + // Ports: Required. One or more ports that the Gateway must receive + // traffic on. The proxy binds to the ports specified. Gateway listen on + // 0.0.0.0 on the ports specified below. + Ports []int64 `json:"ports,omitempty"` + + // Scope: Required. Immutable. Scope determines how configuration across + // multiple Gateway instances are merged. The configuration for multiple + // Gateway instances with the same scope will be merged as presented as + // a single coniguration to the proxy/load balancer. Max length 64 + // characters. Scope should start with a letter and can only have + // letters, numbers, hyphens. + Scope string `json:"scope,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,omitempty"` + + // ServerTlsPolicy: Optional. A fully-qualified ServerTLSPolicy URL + // reference. Specifies how TLS traffic is terminated. If empty, TLS + // termination is disabled. + ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` + + // Type: Immutable. The type of the customer managed gateway. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the customer managed gateway is + // unspecified. + // "OPEN_MESH" - The type of the customer managed gateway is + // TrafficDirector Open Mesh. + // "SECURE_WEB_GATEWAY" - The type of the customer managed gateway is + // SecureWebGateway (SWG). + Type string `json:"type,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. "EndpointPolicies") to + // 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 @@ -594,37 +710,92 @@ type ListEndpointPoliciesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "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 *ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListEndpointPoliciesResponse +func (s *Gateway) MarshalJSON() ([]byte, error) { + type NoMethod Gateway 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"` +// GrpcRoute: GrpcRoute is the resource defining how gRPC traffic routed +// by a Mesh or Gateway resource is routed. +type GrpcRoute struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` + // Description: Optional. A free-text description of the resource. Max + // length 1024 characters. + Description string `json:"description,omitempty"` + + // Gateways: Optional. Gateways defines a list of gateways this + // GrpcRoute is attached to, as one of the routing rules to route the + // requests served by the gateway. Each gateway reference should match + // the pattern: `projects/*/locations/global/gateways/` + Gateways []string `json:"gateways,omitempty"` + + // Hostnames: Required. Service hostnames with an optional port for + // which this route describes traffic. Format: [:] Hostname is the fully + // qualified domain name of a network host. This matches the RFC 1123 + // definition of a hostname with 2 notable exceptions: - IPs are not + // allowed. - A hostname may be prefixed with a wildcard label (*.). The + // wildcard label must appear by itself as the first label. Hostname can + // be "precise" which is a domain name without the terminating dot of a + // network host (e.g. "foo.example.com") or "wildcard", which is a + // domain name prefixed with a single wildcard label (e.g. + // *.example.com). Note that as per RFC1035 and RFC1123, a label must + // consist of lower case alphanumeric characters or '-', and must start + // and end with an alphanumeric character. No other punctuation is + // allowed. The routes associated with a Mesh or Gateway must have + // unique hostnames. If you attempt to attach multiple routes with + // conflicting hostnames, the configuration will be rejected. For + // example, while it is acceptable for routes for the hostnames + // "*.foo.bar.com" and "*.bar.com" to be associated with the same route, + // it is not possible to associate two routes both with "*.bar.com" or + // both with "bar.com". If a port is specified, then gRPC clients must + // use the channel URI with the port to match this rule (i.e. + // "xds:///service:123"), otherwise they must supply the URI without a + // port (i.e. "xds:///service"). + Hostnames []string `json:"hostnames,omitempty"` + + // Labels: Optional. Set of label tags associated with the GrpcRoute + // resource. + Labels map[string]string `json:"labels,omitempty"` + + // Meshes: Optional. Meshes defines a list of meshes this GrpcRoute is + // attached to, as one of the routing rules to route the requests served + // by the mesh. Each mesh reference should match the pattern: + // `projects/*/locations/global/meshes/` + Meshes []string `json:"meshes,omitempty"` + + // Name: Required. Name of the GrpcRoute resource. It matches pattern + // `projects/*/locations/global/grpcRoutes/` + Name string `json:"name,omitempty"` + + // Rules: Required. A list of detailed rules defining how to route + // traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction + // associated with the first matching GrpcRoute.RouteRule will be + // executed. At least one rule must be supplied. + Rules []*GrpcRouteRouteRule `json:"rules,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,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. "Locations") to + // 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 @@ -632,7 +803,7 @@ 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 + // 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 @@ -641,27 +812,33 @@ type ListLocationsResponse struct { NullFields []string `json:"-"` } -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *GrpcRoute) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRoute 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 +// GrpcRouteDestination: The destination to which traffic will be +// routed. +type GrpcRouteDestination struct { + // ServiceName: Required. The URL of a destination service to which to + // route traffic. Must refer to either a BackendService or + // ServiceDirectoryService. + ServiceName string `json:"serviceName,omitempty"` + + // Weight: Optional. Specifies the proportion of requests forwarded to + // the backend referenced by the serviceName field. This is computed as: + // weight/Sum(weights in this destination list). For non-zero values, + // there may be some epsilon from the exact proportion defined here + // depending on the precision an implementation supports. If only one + // serviceName is specified and it has a weight greater than 0, 100% of + // the traffic is forwarded to that backend. If weights are specified + // for any one service name, they need to be specified for all of them. + // If weights are unspecified for all services, then, traffic is + // distributed in equal proportions to all of them. + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -669,7 +846,7 @@ type ListOperationsResponse struct { // 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 + // NullFields is a list of field names (e.g. "ServiceName") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -678,29 +855,27 @@ type ListOperationsResponse struct { NullFields []string `json:"-"` } -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse +func (s *GrpcRouteDestination) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteDestination raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListServiceBindingsResponse: Response returned by the -// ListServiceBindings method. -type ListServiceBindingsResponse 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"` - - // ServiceBindings: List of ServiceBinding resources. - ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"` +// GrpcRouteFaultInjectionPolicy: The specification for fault injection +// introduced into traffic to test the resiliency of clients to +// destination service failure. As part of fault injection, when clients +// send requests to a destination, delays can be introduced on a +// percentage of requests before sending those requests to the +// destination service. Similarly requests from clients can be aborted +// by for a percentage of requests. +type GrpcRouteFaultInjectionPolicy struct { + // Abort: The specification for aborting to client requests. + Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Delay: The specification for injecting delay to client requests. + Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Abort") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -708,49 +883,34 @@ type ListServiceBindingsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Abort") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceBindingsResponse +func (s *GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteFaultInjectionPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` - - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` +// GrpcRouteFaultInjectionPolicyAbort: Specification of how client +// requests are aborted as part of fault injection before being sent to +// a destination. +type GrpcRouteFaultInjectionPolicyAbort struct { + // HttpStatus: The HTTP status code used to abort the request. The value + // must be between 200 and 599 inclusive. + HttpStatus int64 `json:"httpStatus,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Percentage: The percentage of traffic which will be aborted. The + // value must be between [0, 100] + Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "HttpStatus") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -758,90 +918,74 @@ type Location struct { // 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 + // NullFields is a list of field names (e.g. "HttpStatus") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Location) MarshalJSON() ([]byte, error) { - type NoMethod Location +func (s *GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteFaultInjectionPolicyAbort raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MetadataLabelMatcher: The matcher that is based on node metadata -// presented by xDS clients. -type MetadataLabelMatcher struct { - // MetadataLabelMatchCriteria: Specifies how matching should be done. - // Supported values are: MATCH_ANY: At least one of the Labels specified - // in the matcher should match the metadata presented by xDS client. - // MATCH_ALL: The metadata presented by the xDS client should contain - // all of the labels specified here. The selection is determined based - // on the best match. For example, suppose there are three - // EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as - // MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client - // with label connects, the config from P1 will be selected. If a client - // with label connects, the config from P2 will be selected. If a client - // with label connects, the config from P3 will be selected. If there is - // more than one best match, (for example, if a config P4 with selector - // exists and if a client with label connects), an error will be thrown. - // - // Possible values: - // "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should - // not be used. - // "MATCH_ANY" - At least one of the Labels specified in the matcher - // should match the metadata presented by xDS client. - // "MATCH_ALL" - The metadata presented by the xDS client should - // contain all of the labels specified here. - MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"` +// GrpcRouteFaultInjectionPolicyDelay: Specification of how client +// requests are delayed as part of fault injection before being sent to +// a destination. +type GrpcRouteFaultInjectionPolicyDelay struct { + // FixedDelay: Specify a fixed delay before forwarding the request. + FixedDelay string `json:"fixedDelay,omitempty"` - // MetadataLabels: The list of label value pairs that must match labels - // in the provided metadata based on filterMatchCriteria This list can - // have at most 64 entries. The list can be empty if the match criteria - // is MATCH_ANY, to specify a wildcard match (i.e this matches any - // client). - MetadataLabels []*MetadataLabels `json:"metadataLabels,omitempty"` + // Percentage: The percentage of traffic on which delay will be + // injected. The value must be between [0, 100] + Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MetadataLabelMatchCriteria") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent 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. "FixedDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "MetadataLabelMatchCriteria") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "FixedDelay") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *MetadataLabelMatcher) MarshalJSON() ([]byte, error) { - type NoMethod MetadataLabelMatcher +func (s *GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteFaultInjectionPolicyDelay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MetadataLabels: Defines a name-pair value for a single label. -type MetadataLabels struct { - // LabelName: Required. Label name presented as key in xDS Node - // Metadata. - LabelName string `json:"labelName,omitempty"` +// GrpcRouteHeaderMatch: A match against a collection of headers. +type GrpcRouteHeaderMatch struct { + // Key: Required. The key of the header. + Key string `json:"key,omitempty"` - // LabelValue: Required. Label value presented as value corresponding to - // the above key, in xDS Node Metadata. - LabelValue string `json:"labelValue,omitempty"` + // Type: Optional. Specifies how to match against the value of the + // header. If not specified, a default value of EXACT is used. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified. + // "EXACT" - Will only match the exact value provided. + // "REGULAR_EXPRESSION" - Will match paths conforming to the prefix + // specified by value. RE2 syntax is supported. + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelName") to + // Value: Required. The value of the header. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -849,8 +993,8 @@ type MetadataLabels struct { // 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 + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -858,52 +1002,80 @@ type MetadataLabels struct { NullFields []string `json:"-"` } -func (s *MetadataLabels) MarshalJSON() ([]byte, error) { - type NoMethod MetadataLabels +func (s *GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteHeaderMatch 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"` +// GrpcRouteMethodMatch: Specifies a match against a method. +type GrpcRouteMethodMatch struct { + // CaseSensitive: Optional. Specifies that matches are case sensitive. + // The default value is true. case_sensitive must not be used with a + // type of REGULAR_EXPRESSION. + CaseSensitive bool `json:"caseSensitive,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` + // GrpcMethod: Required. Name of the method to match against. If + // unspecified, will match all methods. + GrpcMethod string `json:"grpcMethod,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"` + // GrpcService: Required. Name of the service to match against. If + // unspecified, will match all services. + GrpcService string `json:"grpcService,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"` + // Type: Optional. Specifies how to match against the name. If not + // specified, a default value of "EXACT" is used. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified. + // "EXACT" - Will only match the exact name provided. + // "REGULAR_EXPRESSION" - Will interpret grpc_method and grpc_service + // as regexes. RE2 syntax is supported. + Type string `json:"type,omitempty"` - // Response: The normal response of the operation in case of success. 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"` + // ForceSendFields is a list of field names (e.g. "CaseSensitive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NullFields is a list of field names (e.g. "CaseSensitive") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // ForceSendFields is a list of field names (e.g. "Done") to +func (s *GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteMethodMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GrpcRouteRetryPolicy: The specifications for retries. +type GrpcRouteRetryPolicy struct { + // NumRetries: Specifies the allowed number of retries. This number must + // be > 0. If not specpfied, default to 1. + NumRetries int64 `json:"numRetries,omitempty"` + + // RetryConditions: - connect-failure: Router will retry on failures + // connecting to Backend Services, for example due to connection + // timeouts. - refused-stream: Router will retry if the backend service + // resets the stream with a REFUSED_STREAM error code. This reset type + // indicates that it is safe to retry. - cancelled: Router will retry if + // the gRPC status code in the response header is set to cancelled - + // deadline-exceeded: Router will retry if the gRPC status code in the + // response header is set to deadline-exceeded - resource-exhausted: + // Router will retry if the gRPC status code in the response header is + // set to resource-exhausted - unavailable: Router will retry if the + // gRPC status code in the response header is set to unavailable + RetryConditions []string `json:"retryConditions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumRetries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -911,8 +1083,8 @@ type Operation 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. "NumRetries") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -920,42 +1092,74 @@ type Operation struct { NullFields []string `json:"-"` } -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation +func (s *GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteRetryPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadata: Represents the metadata of the long-running -// operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` +// GrpcRouteRouteAction: Specifies how to route matched traffic. +type GrpcRouteRouteAction struct { + // Destinations: Optional. The destination services to which traffic + // should be forwarded. If multiple destinations are specified, traffic + // will be split between Backend Service(s) according to the weight + // field of these destinations. + Destinations []*GrpcRouteDestination `json:"destinations,omitempty"` + + // FaultInjectionPolicy: Optional. The specification for fault injection + // introduced into traffic to test the resiliency of clients to + // destination service failure. As part of fault injection, when clients + // send requests to a destination, delays can be introduced on a + // percentage of requests before sending those requests to the + // destination service. Similarly requests from clients can be aborted + // by for a percentage of requests. timeout and retry_policy will be + // ignored by clients that are configured with a fault_injection_policy + FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + + // RetryPolicy: Optional. Specifies the retry policy associated with + // this route. + RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"` + + // Timeout: Optional. Specifies the timeout for selected route. Timeout + // is computed from the time the request has been fully processed (i.e. + // end of stream) up until the response has been completely processed. + // Timeout includes all retries. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` +func (s *GrpcRouteRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteRouteAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` +// GrpcRouteRouteMatch: Criteria for matching traffic. A RouteMatch will +// be considered to match when all supplied fields match. +type GrpcRouteRouteMatch struct { + // Headers: Optional. Specifies a collection of headers to match. + Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"` - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` + // Method: Optional. A gRPC method to match against. If this field is + // empty or omitted, will match all methods. + Method *GrpcRouteMethodMatch `json:"method,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // ForceSendFields is a list of field names (e.g. "Headers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -963,7 +1167,7 @@ type OperationMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Headers") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -972,100 +1176,26 @@ type OperationMetadata struct { NullFields []string `json:"-"` } -func (s *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata +func (s *GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteRouteMatch 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 -// principals, to a single `role`. Principals can be user accounts, -// service accounts, Google groups, and domains (such as G Suite). A -// `role` is a named list of permissions; each `role` can be an IAM -// predefined role or a user-created custom role. For some types of -// Google Cloud resources, a `binding` can also specify a `condition`, -// which is a logical expression that allows access to a resource only -// if the expression evaluates to `true`. A condition can add -// constraints based on attributes of the request, the resource, or -// both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { -// "role": "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - -// serviceAccount:my-project-id@appspot.gserviceaccount.com role: -// roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access -// after Sep 2020 expression: request.time < -// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` - - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` +// GrpcRouteRouteRule: Describes how to route traffic. +type GrpcRouteRouteRule struct { + // Action: Required. A detailed rule defining how to route traffic. This + // field is required. + Action *GrpcRouteRouteAction `json:"action,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Matches: Optional. Matches define conditions used for matching the + // rule against incoming gRPC requests. Each match is independent, i.e. + // this rule will be matched if ANY one of the matches is satisfied. If + // no matches field is specified, this rule will unconditionally match + // traffic. + Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // ForceSendFields is a list of field names (e.g. "Action") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1073,24 +1203,24 @@ type Policy 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. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy +func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteRouteRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceBinding: ServiceBinding is the resource that defines a Service -// Directory Service to be used in a BackendService resource. -type ServiceBinding struct { +// HttpRoute: HttpRoute is the resource defining how HTTP traffic should +// be routed by a Mesh or Gateway resource. +type HttpRoute struct { // CreateTime: Output only. The timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` @@ -1098,23 +1228,55 @@ type ServiceBinding struct { // length 1024 characters. Description string `json:"description,omitempty"` - // EndpointFilter: Optional. The endpoint filter associated with the - // Service Binding. The syntax is described in - // http://cloud/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#google.cloud.servicedirectory.v1.ResolveServiceRequest - EndpointFilter string `json:"endpointFilter,omitempty"` - - // Labels: Optional. Set of label tags associated with the - // ServiceBinding resource. + // Gateways: Optional. Gateways defines a list of gateways this + // HttpRoute is attached to, as one of the routing rules to route the + // requests served by the gateway. Each gateway reference should match + // the pattern: `projects/*/locations/global/gateways/` + Gateways []string `json:"gateways,omitempty"` + + // Hostnames: Required. Hostnames define a set of hosts that should + // match against the HTTP host header to select a HttpRoute to process + // the request. Hostname is the fully qualified domain name of a network + // host, as defined by RFC 1123 with the exception that: - IPs are not + // allowed. - A hostname may be prefixed with a wildcard label (*.). The + // wildcard label must appear by itself as the first label. Hostname can + // be "precise" which is a domain name without the terminating dot of a + // network host (e.g. "foo.example.com") or "wildcard", which is a + // domain name prefixed with a single wildcard label (e.g. + // *.example.com). Note that as per RFC1035 and RFC1123, a label must + // consist of lower case alphanumeric characters or '-', and must start + // and end with an alphanumeric character. No other punctuation is + // allowed. The routes associated with a Mesh or Gateways must have + // unique hostnames. If you attempt to attach multiple routes with + // conflicting hostnames, the configuration will be rejected. For + // example, while it is acceptable for routes for the hostnames + // "*.foo.bar.com" and "*.bar.com" to be associated with the same Mesh + // (or Gateways under the same scope), it is not possible to associate + // two routes both with "*.bar.com" or both with "bar.com". + Hostnames []string `json:"hostnames,omitempty"` + + // Labels: Optional. Set of label tags associated with the HttpRoute + // resource. Labels map[string]string `json:"labels,omitempty"` - // Name: Required. Name of the ServiceBinding resource. It matches - // pattern - // `projects/*/locations/global/serviceBindings/service_binding_name>`. + // Meshes: Optional. Meshes defines a list of meshes this HttpRoute is + // attached to, as one of the routing rules to route the requests served + // by the mesh. Each mesh reference should match the pattern: + // `projects/*/locations/global/meshes/` The attached Mesh should be of + // a type SIDECAR + Meshes []string `json:"meshes,omitempty"` + + // Name: Required. Name of the HttpRoute resource. It matches pattern + // `projects/*/locations/global/httpRoutes/http_route_name>`. Name string `json:"name,omitempty"` - // Service: Required. The full service directory service name of the - // format /projects/*/locations/*/namespaces/*/services/* - Service string `json:"service,omitempty"` + // Rules: Required. Rules that define how traffic is routed and handled. + // Rules will be matched sequentially based on the RouteMatch specified + // for the rule. + Rules []*HttpRouteRouteRule `json:"rules,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. UpdateTime string `json:"updateTime,omitempty"` @@ -1140,27 +1302,53 @@ type ServiceBinding struct { NullFields []string `json:"-"` } -func (s *ServiceBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServiceBinding +func (s *HttpRoute) MarshalJSON() ([]byte, error) { + type NoMethod HttpRoute 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 Cloud Platform services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` +// HttpRouteCorsPolicy: The Specification for allowing client side +// cross-origin requests. +type HttpRouteCorsPolicy struct { + // AllowCredentials: In response to a preflight request, setting this to + // true indicates that the actual request can include user credentials. + // This translates to the Access-Control-Allow-Credentials header. + // Default value is false. + AllowCredentials bool `json:"allowCredentials,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"` + // AllowHeaders: Specifies the content for Access-Control-Allow-Headers + // header. + AllowHeaders []string `json:"allowHeaders,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // AllowMethods: Specifies the content for Access-Control-Allow-Methods + // header. + AllowMethods []string `json:"allowMethods,omitempty"` + + // AllowOriginRegexes: Specifies the regular expression patterns that + // match allowed origins. For regular expression grammar, please see + // https://github.com/google/re2/wiki/Syntax. + AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` + + // AllowOrigins: Specifies the list of origins that will be allowed to + // do CORS requests. An origin is allowed if it matches either an item + // in allow_origins or an item in allow_origin_regexes. + AllowOrigins []string `json:"allowOrigins,omitempty"` + + // Disabled: If true, the CORS policy is disabled. The default value is + // false, which indicates that the CORS policy is in effect. + Disabled bool `json:"disabled,omitempty"` + + // ExposeHeaders: Specifies the content for + // Access-Control-Expose-Headers header. + ExposeHeaders []string `json:"exposeHeaders,omitempty"` + + // MaxAge: Specifies how long result of a preflight request can be + // cached in seconds. This translates to the Access-Control-Max-Age + // header. + MaxAge string `json:"maxAge,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowCredentials") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1168,43 +1356,78 @@ 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 - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if 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. "AllowCredentials") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field 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 +func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteCorsPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// HttpRouteDestination: Specifications of a destination to which the +// request should be routed to. +type HttpRouteDestination struct { + // ServiceName: The URL of a BackendService to route traffic to. + ServiceName string `json:"serviceName,omitempty"` + + // Weight: Specifies the proportion of requests forwarded to the backend + // referenced by the serviceName field. This is computed as: + // weight/Sum(weights in this destination list). For non-zero values, + // there may be some epsilon from the exact proportion defined here + // depending on the precision an implementation supports. If only one + // serviceName is specified and it has a weight greater than 0, 100% of + // the traffic is forwarded to that backend. If weights are specified + // for any one service name, they need to be specified for all of them. + // If weights are unspecified for all services, then, traffic is + // distributed in equal proportions to all of them. + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // 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"` + // NullFields is a list of field names (e.g. "ServiceName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // 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"` +func (s *HttpRouteDestination) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "Code") to +// HttpRouteFaultInjectionPolicy: The specification for fault injection +// introduced into traffic to test the resiliency of clients to +// destination service failure. As part of fault injection, when clients +// send requests to a destination, delays can be introduced by client +// proxy on a percentage of requests before sending those requests to +// the destination service. Similarly requests can be aborted by client +// proxy for a percentage of requests. +type HttpRouteFaultInjectionPolicy struct { + // Abort: The specification for aborting to client requests. + Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` + + // Delay: The specification for injecting delay to client requests. + Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Abort") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1212,7 +1435,7 @@ type Status 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 + // NullFields is a list of field names (e.g. "Abort") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1221,22 +1444,25 @@ type Status struct { NullFields []string `json:"-"` } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status +func (s *HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteFaultInjectionPolicy 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"` +// HttpRouteFaultInjectionPolicyAbort: Specification of how client +// requests are aborted as part of fault injection before being sent to +// a destination. +type HttpRouteFaultInjectionPolicyAbort struct { + // HttpStatus: The HTTP status code used to abort the request. The value + // must be between 200 and 599 inclusive. + HttpStatus int64 `json:"httpStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // Percentage: The percentage of traffic which will be aborted. The + // value must be between [0, 100] + Percentage int64 `json:"percentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HttpStatus") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1244,7 +1470,284 @@ type TestIamPermissionsRequest struct { // 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 + // NullFields is a list of field names (e.g. "HttpStatus") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteFaultInjectionPolicyAbort + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteFaultInjectionPolicyDelay: Specification of how client +// requests are delayed as part of fault injection before being sent to +// a destination. +type HttpRouteFaultInjectionPolicyDelay struct { + // FixedDelay: Specify a fixed delay before forwarding the request. + FixedDelay string `json:"fixedDelay,omitempty"` + + // Percentage: The percentage of traffic on which delay will be + // injected. The value must be between [0, 100] + Percentage int64 `json:"percentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FixedDelay") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FixedDelay") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteFaultInjectionPolicyDelay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteHeaderMatch: Specifies how to select a route rule based on +// HTTP request headers. +type HttpRouteHeaderMatch struct { + // ExactMatch: The value of the header should match exactly the content + // of exact_match. + ExactMatch string `json:"exactMatch,omitempty"` + + // Header: The name of the HTTP header to match against. + Header string `json:"header,omitempty"` + + // InvertMatch: If specified, the match result will be inverted before + // checking. Default value is set to false. + InvertMatch bool `json:"invertMatch,omitempty"` + + // PrefixMatch: The value of the header must start with the contents of + // prefix_match. + PrefixMatch string `json:"prefixMatch,omitempty"` + + // PresentMatch: A header with header_name must exist. The match takes + // place whether or not the header has a value. + PresentMatch bool `json:"presentMatch,omitempty"` + + // RangeMatch: If specified, the rule will match if the request header + // value is within the range. + RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"` + + // RegexMatch: The value of the header must match the regular expression + // specified in regex_match. For regular expression grammar, please see: + // https://github.com/google/re2/wiki/Syntax + RegexMatch string `json:"regexMatch,omitempty"` + + // SuffixMatch: The value of the header must end with the contents of + // suffix_match. + SuffixMatch string `json:"suffixMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteHeaderMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteHeaderMatchIntegerRange: Represents an integer value range. +type HttpRouteHeaderMatchIntegerRange struct { + // End: End of the range (exclusive) + End int64 `json:"end,omitempty"` + + // Start: Start of the range (inclusive) + Start int64 `json:"start,omitempty"` + + // ForceSendFields is a list of field names (e.g. "End") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "End") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteHeaderMatchIntegerRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteHeaderModifier: The specification for modifying HTTP header +// in HTTP request and HTTP response. +type HttpRouteHeaderModifier struct { + // Add: Add the headers with given map where key is the name of the + // header, value is the value of the header. + Add map[string]string `json:"add,omitempty"` + + // Remove: Remove headers (matching by header names) specified in the + // list. + Remove []string `json:"remove,omitempty"` + + // Set: Completely overwrite/replace the headers with given map where + // key is the name of the header, value is the value of the header. + Set map[string]string `json:"set,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Add") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Add") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteHeaderModifier + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteQueryParameterMatch: Specifications to match a query +// parameter in the request. +type HttpRouteQueryParameterMatch struct { + // ExactMatch: The value of the query parameter must exactly match the + // contents of exact_match. Only one of exact_match, regex_match, or + // present_match must be set. + ExactMatch string `json:"exactMatch,omitempty"` + + // PresentMatch: Specifies that the QueryParameterMatcher matches if + // request contains query parameter, irrespective of whether the + // parameter has a value or not. Only one of exact_match, regex_match, + // or present_match must be set. + PresentMatch bool `json:"presentMatch,omitempty"` + + // QueryParameter: The name of the query parameter to match. + QueryParameter string `json:"queryParameter,omitempty"` + + // RegexMatch: The value of the query parameter must match the regular + // expression specified by regex_match. For regular expression grammar, + // please see https://github.com/google/re2/wiki/Syntax Only one of + // exact_match, regex_match, or present_match must be set. + RegexMatch string `json:"regexMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteQueryParameterMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteRedirect: The specification for redirecting traffic. +type HttpRouteRedirect struct { + // HostRedirect: The host that will be used in the redirect response + // instead of the one that was supplied in the request. + HostRedirect string `json:"hostRedirect,omitempty"` + + // HttpsRedirect: If set to true, the URL scheme in the redirected + // request is set to https. If set to false, the URL scheme of the + // redirected request will remain the same as that of the request. The + // default is set to false. + HttpsRedirect bool `json:"httpsRedirect,omitempty"` + + // PathRedirect: The path that will be used in the redirect response + // instead of the one that was supplied in the request. path_redirect + // can not be supplied together with prefix_redirect. Supply one alone + // or neither. If neither is supplied, the path of the original request + // will be used for the redirect. + PathRedirect string `json:"pathRedirect,omitempty"` + + // PortRedirect: The port that will be used in the redirected request + // instead of the one that was supplied in the request. + PortRedirect int64 `json:"portRedirect,omitempty"` + + // PrefixRewrite: Indicates that during redirection, the matched prefix + // (or path) should be swapped with this value. This option allows URLs + // be dynamically created based on the request. + PrefixRewrite string `json:"prefixRewrite,omitempty"` + + // ResponseCode: The HTTP Status code to use for the redirect. + // + // Possible values: + // "RESPONSE_CODE_UNSPECIFIED" - Default value + // "MOVED_PERMANENTLY_DEFAULT" - Corresponds to 301. + // "FOUND" - Corresponds to 302. + // "SEE_OTHER" - Corresponds to 303. + // "TEMPORARY_REDIRECT" - Corresponds to 307. In this case, the + // request method will be retained. + // "PERMANENT_REDIRECT" - Corresponds to 308. In this case, the + // request method will be retained. + ResponseCode string `json:"responseCode,omitempty"` + + // StripQuery: if set to true, any accompanying query portion of the + // original URL is removed prior to redirecting the request. If set to + // false, the query portion of the original URL is retained. The default + // is set to false. + StripQuery bool `json:"stripQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostRedirect") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostRedirect") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1253,24 +1756,23 @@ type TestIamPermissionsRequest struct { NullFields []string `json:"-"` } -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest +func (s *HttpRouteRedirect) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRedirect 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:"-"` +// HttpRouteRequestMirrorPolicy: Specifies the policy on how requests +// are shadowed to a separate mirrored destination service. The proxy +// does not wait for responses from the shadow service. Prior to sending +// traffic to the shadow service, the host/authority header is suffixed +// with -shadow. +type HttpRouteRequestMirrorPolicy struct { + // Destination: The destination the requests will be mirrored to. The + // weight of the destination will be ignored. + Destination *HttpRouteDestination `json:"destination,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // ForceSendFields is a list of field names (e.g. "Destination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1278,7 +1780,7 @@ type TestIamPermissionsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Destination") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1287,21 +1789,115 @@ type TestIamPermissionsResponse struct { NullFields []string `json:"-"` } -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse +func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRequestMirrorPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TrafficPortSelector: Specification of a port-based selector. -type TrafficPortSelector struct { - // Ports: Optional. A list of ports. Can be port numbers or port range - // (example, [80-90] specifies all ports from 80 to 90, including 80 and - // 90) or named ports or * to specify all ports. If the list is empty, - // all ports are selected. - Ports []string `json:"ports,omitempty"` +// HttpRouteRetryPolicy: The specifications for retries. +type HttpRouteRetryPolicy struct { + // NumRetries: Specifies the allowed number of retries. This number must + // be > 0. If not specified, default to 1. + NumRetries int64 `json:"numRetries,omitempty"` + + // PerTryTimeout: Specifies a non-zero timeout per retry attempt. + PerTryTimeout string `json:"perTryTimeout,omitempty"` + + // RetryConditions: Specifies one or more conditions when this retry + // policy applies. Valid values are: 5xx: Proxy will attempt a retry if + // the destination service responds with any 5xx response code, of if + // the destination service does not respond at all, example: disconnect, + // reset, read timeout, connection failure and refused streams. + // gateway-error: Similar to 5xx, but only applies to response codes + // 502, 503, 504. reset: Proxy will attempt a retry if the destination + // service does not respond at all (disconnect/reset/read timeout) + // connect-failure: Proxy will retry on failures connecting to + // destination for example due to connection timeouts. retriable-4xx: + // Proxy will retry fro retriable 4xx response codes. Currently the only + // retriable error supported is 409. refused-stream: Proxy will retry if + // the destination resets the stream with a REFUSED_STREAM error code. + // This reset type indicates that it is safe to retry. + RetryConditions []string `json:"retryConditions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumRetries") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the 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. "Ports") to + // NullFields is a list of field names (e.g. "NumRetries") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRetryPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteRouteAction: The specifications for routing traffic and +// applying associated policies. +type HttpRouteRouteAction struct { + // CorsPolicy: The specification for allowing client side cross-origin + // requests. + CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"` + + // Destinations: The destination to which traffic should be forwarded. + Destinations []*HttpRouteDestination `json:"destinations,omitempty"` + + // FaultInjectionPolicy: The specification for fault injection + // introduced into traffic to test the resiliency of clients to backend + // service failure. As part of fault injection, when clients send + // requests to a backend service, delays can be introduced on a + // percentage of requests before sending those requests to the backend + // service. Similarly requests from clients can be aborted for a + // percentage of requests. timeout and retry_policy will be ignored by + // clients that are configured with a fault_injection_policy + FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + + // Redirect: If set, the request is directed as configured by this + // field. + Redirect *HttpRouteRedirect `json:"redirect,omitempty"` + + // RequestHeaderModifier: The specification for modifying the headers of + // a matching request prior to delivery of the request to the + // destination. + RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` + + // RequestMirrorPolicy: Specifies the policy on how requests intended + // for the routes destination are shadowed to a separate mirrored + // destination. Proxy will not wait for the shadow destination to + // respond before returning the response. Prior to sending traffic to + // the shadow service, the host/authority header is suffixed with + // -shadow. + RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` + + // ResponseHeaderModifier: The specification for modifying the headers + // of a response prior to sending the response back to the client. + ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` + + // RetryPolicy: Specifies the retry policy associated with this route. + RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"` + + // Timeout: Specifies the timeout for selected route. Timeout is + // computed from the time the request has been fully processed (i.e. end + // of stream) up until the response has been completely processed. + // Timeout includes all retries. + Timeout string `json:"timeout,omitempty"` + + // UrlRewrite: The specification for rewrite URL before forwarding + // requests to the destination. + UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorsPolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1309,8 +1905,8 @@ type TrafficPortSelector struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ports") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CorsPolicy") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1318,101 +1914,7271 @@ type TrafficPortSelector struct { NullFields []string `json:"-"` } -func (s *TrafficPortSelector) MarshalJSON() ([]byte, error) { - type NoMethod TrafficPortSelector +func (s *HttpRouteRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRouteAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "networkservices.projects.locations.get": +// HttpRouteRouteMatch: RouteMatch defines specifications used to match +// requests. If multiple match types are set, this RouteMatch will match +// if ALL type of matches are matched. +type HttpRouteRouteMatch struct { + // FullPathMatch: The HTTP request path value should exactly match this + // value. Only one of full_path_match, prefix_match, or regex_match + // should be used. + FullPathMatch string `json:"fullPathMatch,omitempty"` + + // Headers: Specifies a list of HTTP request headers to match against. + // ALL of the supplied headers must be matched. + Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"` + + // IgnoreCase: Specifies if prefix_match and full_path_match matches are + // case sensitive. The default value is false. + IgnoreCase bool `json:"ignoreCase,omitempty"` + + // PrefixMatch: The HTTP request path value must begin with specified + // prefix_match. prefix_match must begin with a /. Only one of + // full_path_match, prefix_match, or regex_match should be used. + PrefixMatch string `json:"prefixMatch,omitempty"` + + // QueryParameters: Specifies a list of query parameters to match + // against. ALL of the query parameters must be matched. + QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"` + + // RegexMatch: The HTTP request path value must satisfy the regular + // expression specified by regex_match after removing any query + // parameters and anchor supplied with the original URL. For regular + // expression grammar, please see + // https://github.com/google/re2/wiki/Syntax Only one of + // full_path_match, prefix_match, or regex_match should be used. + RegexMatch string `json:"regexMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullPathMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullPathMatch") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteRouteMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRouteMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteRouteRule: Specifies how to match traffic and how to route +// traffic when traffic is matched. +type HttpRouteRouteRule struct { + // Action: The detailed rule defining how to route matched traffic. + Action *HttpRouteRouteAction `json:"action,omitempty"` + + // Matches: A list of matches define conditions used for matching the + // rule against incoming HTTP requests. Each match is independent, i.e. + // this rule will be matched if ANY one of the matches is satisfied. If + // no matches field is specified, this rule will unconditionally match + // traffic. If a default rule is desired to be configured, add a rule + // with no matches specified to the end of the rules list. + Matches []*HttpRouteRouteMatch `json:"matches,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRouteRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteURLRewrite: The specification for modifying the URL of the +// request, prior to forwarding the request to the destination. +type HttpRouteURLRewrite struct { + // HostRewrite: Prior to forwarding the request to the selected + // destination, the requests host header is replaced by this value. + HostRewrite string `json:"hostRewrite,omitempty"` + + // PathPrefixRewrite: Prior to forwarding the request to the selected + // destination, the matching portion of the requests path is replaced by + // this value. + PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostRewrite") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostRewrite") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteURLRewrite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListEndpointPoliciesResponse: Response returned by the +// ListEndpointPolicies method. +type ListEndpointPoliciesResponse struct { + // EndpointPolicies: List of EndpointPolicy resources. + EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,omitempty"` + + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EndpointPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndpointPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListEndpointPoliciesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGatewaysResponse: Response returned by the ListGateways method. +type ListGatewaysResponse struct { + // Gateways: List of Gateway resources. + Gateways []*Gateway `json:"gateways,omitempty"` + + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Gateways") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Gateways") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGatewaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGatewaysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGrpcRoutesResponse: Response returned by the ListGrpcRoutes +// method. +type ListGrpcRoutesResponse struct { + // GrpcRoutes: List of GrpcRoute resources. + GrpcRoutes []*GrpcRoute `json:"grpcRoutes,omitempty"` + + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "GrpcRoutes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GrpcRoutes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGrpcRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListHttpRoutesResponse: Response returned by the ListHttpRoutes +// method. +type ListHttpRoutesResponse struct { + // HttpRoutes: List of HttpRoute resources. + HttpRoutes []*HttpRoute `json:"httpRoutes,omitempty"` + + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "HttpRoutes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HttpRoutes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListHttpRoutesResponse + 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) +} + +// ListMeshesResponse: Response returned by the ListMeshes method. +type ListMeshesResponse struct { + // Meshes: List of Mesh resources. + Meshes []*Mesh `json:"meshes,omitempty"` + + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Meshes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Meshes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListMeshesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMeshesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServiceBindingsResponse: Response returned by the +// ListServiceBindings method. +type ListServiceBindingsResponse 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"` + + // ServiceBindings: List of ServiceBinding resources. + ServiceBindings []*ServiceBinding `json:"serviceBindings,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 *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceBindingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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"` + + // TcpRoutes: List of TcpRoute resources. + TcpRoutes []*TcpRoute `json:"tcpRoutes,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 *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTcpRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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 Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Mesh: Mesh represents a logical configuration grouping for workload +// to workload communication within a service mesh. Routes that point to +// mesh dictate how requests are routed within this logical mesh +// boundary. +type Mesh struct { + // CreateTime: Output only. The timestamp when the 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"` + + // InterceptionPort: Optional. If set to a valid TCP port (1-65535), + // instructs the SIDECAR proxy to listen on the specified port of + // localhost (127.0.0.1) address. The SIDECAR proxy will expect all + // traffic to be redirected to this port regardless of its actual + // ip:port destination. If unset, a port '15001' is used as the + // interception port. This will is applicable only for sidecar proxy + // deployments. + InterceptionPort int64 `json:"interceptionPort,omitempty"` + + // Labels: Optional. Set of label tags associated with the Mesh + // resource. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Required. Name of the Mesh resource. It matches pattern + // `projects/*/locations/global/meshes/`. + Name string `json:"name,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,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 *Mesh) MarshalJSON() ([]byte, error) { + type NoMethod Mesh + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataLabelMatcher: The matcher that is based on node metadata +// presented by xDS clients. +type MetadataLabelMatcher struct { + // MetadataLabelMatchCriteria: Specifies how matching should be done. + // Supported values are: MATCH_ANY: At least one of the Labels specified + // in the matcher should match the metadata presented by xDS client. + // MATCH_ALL: The metadata presented by the xDS client should contain + // all of the labels specified here. The selection is determined based + // on the best match. For example, suppose there are three + // EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as + // MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client + // with label connects, the config from P1 will be selected. If a client + // with label connects, the config from P2 will be selected. If a client + // with label connects, the config from P3 will be selected. If there is + // more than one best match, (for example, if a config P4 with selector + // exists and if a client with label connects), an error will be thrown. + // + // Possible values: + // "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should + // not be used. + // "MATCH_ANY" - At least one of the Labels specified in the matcher + // should match the metadata presented by xDS client. + // "MATCH_ALL" - The metadata presented by the xDS client should + // contain all of the labels specified here. + MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"` + + // MetadataLabels: The list of label value pairs that must match labels + // in the provided metadata based on filterMatchCriteria This list can + // have at most 64 entries. The list can be empty if the match criteria + // is MATCH_ANY, to specify a wildcard match (i.e this matches any + // client). + MetadataLabels []*MetadataLabels `json:"metadataLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "MetadataLabelMatchCriteria") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "MetadataLabelMatchCriteria") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MetadataLabelMatcher) MarshalJSON() ([]byte, error) { + type NoMethod MetadataLabelMatcher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataLabels: Defines a name-pair value for a single label. +type MetadataLabels struct { + // LabelName: Required. Label name presented as key in xDS Node + // Metadata. + LabelName string `json:"labelName,omitempty"` + + // LabelValue: Required. Label value presented as value corresponding to + // the above key, in xDS Node Metadata. + 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 *MetadataLabels) MarshalJSON() ([]byte, error) { + type NoMethod MetadataLabels + 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 response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceBinding: ServiceBinding is the resource that defines a Service +// Directory Service to be used in a BackendService resource. +type ServiceBinding struct { + // CreateTime: Output only. The timestamp when the 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"` + + // EndpointFilter: Optional. The endpoint filter associated with the + // Service Binding. The syntax is described in + // http://cloud/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#google.cloud.servicedirectory.v1.ResolveServiceRequest + EndpointFilter string `json:"endpointFilter,omitempty"` + + // Labels: Optional. Set of label tags associated with the + // ServiceBinding resource. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Required. Name of the ServiceBinding resource. It matches + // pattern + // `projects/*/locations/global/serviceBindings/service_binding_name>`. + Name string `json:"name,omitempty"` + + // Service: Required. The full service directory service name of the + // format /projects/*/locations/*/namespaces/*/services/* + Service string `json:"service,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 *ServiceBinding) MarshalJSON() ([]byte, error) { + type NoMethod ServiceBinding + 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 Cloud Platform 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) +} + +// 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) +} + +// TcpRoute: TcpRoute is the resource defining how TCP traffic should be +// routed by a Mesh/Gateway resource. +type TcpRoute struct { + // CreateTime: Output only. The timestamp when the 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"` + + // Gateways: Optional. Gateways defines a list of gateways this TcpRoute + // is attached to, as one of the routing rules to route the requests + // served by the gateway. Each gateway reference should match the + // pattern: `projects/*/locations/global/gateways/` + Gateways []string `json:"gateways,omitempty"` + + // Labels: Optional. Set of label tags associated with the TcpRoute + // resource. + Labels map[string]string `json:"labels,omitempty"` + + // Meshes: Optional. Meshes defines a list of meshes this TcpRoute is + // attached to, as one of the routing rules to route the requests served + // by the mesh. Each mesh reference should match the pattern: + // `projects/*/locations/global/meshes/` The attached Mesh should be of + // a type SIDECAR + Meshes []string `json:"meshes,omitempty"` + + // Name: Required. Name of the TcpRoute resource. It matches pattern + // `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + Name string `json:"name,omitempty"` + + // Rules: Required. Rules that define how traffic is routed and handled. + // At least one RouteRule must be supplied. If there are multiple rules + // then the action taken will be the first rule to match. + Rules []*TcpRouteRouteRule `json:"rules,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,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 *TcpRoute) MarshalJSON() ([]byte, error) { + type NoMethod TcpRoute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TcpRouteRouteAction: The specifications for routing traffic and +// applying associated policies. +type TcpRouteRouteAction struct { + // Destinations: Optional. The destination services to which traffic + // should be forwarded. At least one destination service is required. + Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"` + + // OriginalDestination: Optional. If true, Router will use the + // destination IP and port of the original connection as the destination + // of the request. Default is false. + OriginalDestination bool `json:"originalDestination,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TcpRouteRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod TcpRouteRouteAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TcpRouteRouteDestination: Describe the destination for traffic to be +// routed to. +type TcpRouteRouteDestination struct { + // ServiceName: Required. The URL of a BackendService to route traffic + // to. + ServiceName string `json:"serviceName,omitempty"` + + // Weight: Optional. Specifies the proportion of requests forwarded to + // the backend referenced by the serviceName field. This is computed as: + // weight/Sum(weights in this destination list). For non-zero values, + // there may be some epsilon from the exact proportion defined here + // depending on the precision an implementation supports. If only one + // serviceName is specified and it has a weight greater than 0, 100% of + // the traffic is forwarded to that backend. If weights are specified + // for any one service name, they need to be specified for all of them. + // If weights are unspecified for all services, then, traffic is + // distributed in equal proportions to all of them. + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TcpRouteRouteDestination) MarshalJSON() ([]byte, error) { + type NoMethod TcpRouteRouteDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TcpRouteRouteMatch: RouteMatch defines the predicate used to match +// requests to a given action. Multiple match types are "OR"ed for +// evaluation. If no routeMatch field is specified, this rule will +// unconditionally match traffic. +type TcpRouteRouteMatch struct { + // Address: Required. Must be specified in the CIDR range format. A CIDR + // range consists of an IP Address and a prefix length to construct the + // subnet mask. By default, the prefix length is 32 (i.e. matches a + // single IP address). Only IPV4 addresses are supported. Examples: + // "10.0.0.1" - matches against this exact IP address. "10.0.0.0/8" - + // matches against any IP address within the 10.0.0.0 subnet and + // 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP address'. + Address string `json:"address,omitempty"` + + // Port: Required. Specifies the destination port to match against. + Port string `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TcpRouteRouteMatch) MarshalJSON() ([]byte, error) { + type NoMethod TcpRouteRouteMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TcpRouteRouteRule: Specifies how to match traffic and how to route +// traffic when traffic is matched. +type TcpRouteRouteRule struct { + // Action: Required. The detailed rule defining how to route matched + // traffic. + Action *TcpRouteRouteAction `json:"action,omitempty"` + + // Matches: Optional. RouteMatch defines the predicate used to match + // requests to a given action. Multiple match types are "OR"ed for + // evaluation. If no routeMatch field is specified, this rule will + // unconditionally match traffic. + Matches []*TcpRouteRouteMatch `json:"matches,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TcpRouteRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod TcpRouteRouteRule + 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) +} + +// TlsRoute: TlsRoute defines how traffic should be routed based on SNI +// and other matching L3 attributes. +type TlsRoute struct { + // CreateTime: Output only. The timestamp when the 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"` + + // Gateways: Optional. Gateways defines a list of gateways this TlsRoute + // is attached to, as one of the routing rules to route the requests + // served by the gateway. Each gateway reference should match the + // pattern: `projects/*/locations/global/gateways/` + Gateways []string `json:"gateways,omitempty"` + + // Meshes: Optional. Meshes defines a list of meshes this TlsRoute is + // attached to, as one of the routing rules to route the requests served + // by the mesh. Each mesh reference should match the pattern: + // `projects/*/locations/global/meshes/` The attached Mesh should be of + // a type SIDECAR + Meshes []string `json:"meshes,omitempty"` + + // Name: Required. Name of the TlsRoute resource. It matches pattern + // `projects/*/locations/global/tlsRoutes/tls_route_name>`. + Name string `json:"name,omitempty"` + + // Rules: Required. Rules that define how traffic is routed and handled. + // At least one RouteRule must be supplied. If there are multiple rules + // then the action taken will be the first rule to match. + Rules []*TlsRouteRouteRule `json:"rules,omitempty"` + + // SelfLink: Output only. Server-defined URL of this resource + SelfLink string `json:"selfLink,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 *TlsRoute) MarshalJSON() ([]byte, error) { + type NoMethod TlsRoute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TlsRouteRouteAction: The specifications for routing traffic and +// applying associated policies. +type TlsRouteRouteAction struct { + // Destinations: Required. The destination services to which traffic + // should be forwarded. At least one destination service is required. + Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destinations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destinations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TlsRouteRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod TlsRouteRouteAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TlsRouteRouteDestination: Describe the destination for traffic to be +// routed to. +type TlsRouteRouteDestination struct { + // ServiceName: Required. The URL of a BackendService to route traffic + // to. + ServiceName string `json:"serviceName,omitempty"` + + // Weight: Optional. Specifies the proportion of requests forwareded to + // the backend referenced by the service_name field. This is computed + // as: weight/Sum(weights in destinations) Weights in all destinations + // does not need to sum up to 100. + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TlsRouteRouteDestination) MarshalJSON() ([]byte, error) { + type NoMethod TlsRouteRouteDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TlsRouteRouteMatch: RouteMatch defines the predicate used to match +// requests to a given action. Multiple match types are “AND”ed for +// evaluation. If no routeMatch field is specified, this rule will +// unconditionally match traffic. +type TlsRouteRouteMatch struct { + // Alpn: Optional. ALPN (Application-Layer Protocol Negotiation) to + // match against. Examples: "http/1.1", "h2". At least one of sni_host + // and alpn is required. Up to 5 alpns across all matches can be set. + Alpn []string `json:"alpn,omitempty"` + + // SniHost: Optional. SNI (server name indicator) to match against. SNI + // will be matched against all wildcard domains, i.e. www.example.com + // will be first matched against www.example.com, then *.example.com, + // then *.com. Partial wildcards are not supported, and values like + // *w.example.com are invalid. At least one of sni_host and alpn is + // required. Up to 5 sni hosts across all matches can be set. + SniHost []string `json:"sniHost,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alpn") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alpn") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TlsRouteRouteMatch) MarshalJSON() ([]byte, error) { + type NoMethod TlsRouteRouteMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TlsRouteRouteRule: Specifies how to match traffic and how to route +// traffic when traffic is matched. +type TlsRouteRouteRule struct { + // Action: Required. The detailed rule defining how to route matched + // traffic. + Action *TlsRouteRouteAction `json:"action,omitempty"` + + // Matches: Required. RouteMatch defines the predicate used to match + // requests to a given action. Multiple match types are “OR”ed for + // evaluation. + Matches []*TlsRouteRouteMatch `json:"matches,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TlsRouteRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod TlsRouteRouteRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TrafficPortSelector: Specification of a port-based selector. +type TrafficPortSelector struct { + // Ports: Optional. A list of ports. Can be port numbers or port range + // (example, [80-90] specifies all ports from 80 to 90, including 80 and + // 90) or named ports or * to specify all ports. If the list is empty, + // all ports are selected. + Ports []string `json:"ports,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ports") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ports") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TrafficPortSelector) MarshalJSON() ([]byte, error) { + type NoMethod TrafficPortSelector + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "networkservices.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "networkservices.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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// 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 "networkservices.projects.locations.endpointPolicies.create": + +type ProjectsLocationsEndpointPoliciesCreateCall struct { + s *Service + parent string + endpointpolicy *EndpointPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new EndpointPolicy in a given project and location. +// +// - parent: The parent resource of the EndpointPolicy. Must be in the +// format `projects/*/locations/global`. +func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall { + c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.endpointpolicy = endpointpolicy + return c +} + +// EndpointPolicyId sets the optional parameter "endpointPolicyId": +// Required. Short name of the EndpointPolicy resource to be created. +// E.g. "CustomECS". +func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall { + c.urlParams_.Set("endpointPolicyId", endpointPolicyId) + 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 *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall { + 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 *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall { + 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 *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesCreateCall) 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.endpointpolicy) + 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}/endpointPolicies") + 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.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 EndpointPolicy in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.endpointPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "endpointPolicyId": { + // "description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/endpointPolicies", + // "request": { + // "$ref": "EndpointPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.delete": + +type ProjectsLocationsEndpointPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single EndpointPolicy. +// +// - name: A name of the EndpointPolicy to delete. Must be in the format +// `projects/*/locations/global/endpointPolicies/*`. +func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall { + c := &ProjectsLocationsEndpointPoliciesDeleteCall{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 *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall { + 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 *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall { + 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 *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesDeleteCall) 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 "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 EndpointPolicy.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.endpointPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.get": + +type ProjectsLocationsEndpointPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single EndpointPolicy. +// +// - name: A name of the EndpointPolicy to get. Must be in the format +// `projects/*/locations/global/endpointPolicies/*`. +func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall { + c := &ProjectsLocationsEndpointPoliciesGetCall{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 *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall { + 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 *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall { + 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 *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall { + 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 *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesGetCall) 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 "networkservices.projects.locations.endpointPolicies.get" call. +// Exactly one of *EndpointPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *EndpointPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &EndpointPolicy{ + 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 EndpointPolicy.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.endpointPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "EndpointPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.getIamPolicy": + +type ProjectsLocationsEndpointPoliciesGetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsEndpointPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { + c := &ProjectsLocationsEndpointPoliciesGetIamPolicyCall{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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) 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/{+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.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.endpointPolicies.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.list": + +type ProjectsLocationsEndpointPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists EndpointPolicies in a given project and location. +// +// - parent: The project and location from which the EndpointPolicies +// should be listed, specified in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall { + c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// EndpointPolicies to return per call. +func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListEndpointPoliciesResponse` Indicates that this is a +// continuation of a prior `ListEndpointPolicies` call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall { + 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 *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall { + 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 *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall { + 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 *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall { + 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 *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesListCall) 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/{+parent}/endpointPolicies") + 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.endpointPolicies.list" call. +// Exactly one of *ListEndpointPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListEndpointPoliciesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListEndpointPoliciesResponse{ + 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 EndpointPolicies in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.endpointPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of EndpointPolicies to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` 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 EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/endpointPolicies", + // "response": { + // "$ref": "ListEndpointPoliciesResponse" + // }, + // "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 *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) 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.endpointPolicies.patch": + +type ProjectsLocationsEndpointPoliciesPatchCall struct { + s *Service + name string + endpointpolicy *EndpointPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single EndpointPolicy. +// +// - name: Name of the EndpointPolicy resource. It matches pattern +// `projects/{project}/locations/global/endpointPolicies/{endpoint_poli +// cy}`. +func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall { + c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.endpointpolicy = endpointpolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the EndpointPolicy +// 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 *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall { + 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 *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall { + 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 *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall { + 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 *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesPatchCall) 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.endpointpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 EndpointPolicy.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.endpointPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "EndpointPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.setIamPolicy": + +type ProjectsLocationsEndpointPoliciesSetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsEndpointPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { + c := &ProjectsLocationsEndpointPoliciesSetIamPolicyCall{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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { + 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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) 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, "v1beta1/{+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.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.endpointPolicies.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.endpointPolicies.testIamPermissions": + +type ProjectsLocationsEndpointPoliciesTestIamPermissionsCall 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 the operation documentation for the +// appropriate value for this field. +func (r *ProjectsLocationsEndpointPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsEndpointPoliciesTestIamPermissionsCall{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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { + 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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { + 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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) 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, "v1beta1/{+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.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.endpointPolicies.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.create": + +type ProjectsLocationsGatewaysCreateCall struct { + s *Service + parent string + gateway *Gateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Gateway in a given project and location. +// +// - parent: The parent resource of the Gateway. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall { + c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gateway = gateway + return c +} + +// GatewayId sets the optional parameter "gatewayId": Required. Short +// name of the Gateway resource to be created. +func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall { + c.urlParams_.Set("gatewayId", gatewayId) + 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 *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall { + 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 *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall { + 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 *ProjectsLocationsGatewaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysCreateCall) 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.gateway) + 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}/gateways") + 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.gateways.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 *ProjectsLocationsGatewaysCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 Gateway in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.gateways.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "gatewayId": { + // "description": "Required. Short name of the Gateway resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/gateways", + // "request": { + // "$ref": "Gateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.delete": + +type ProjectsLocationsGatewaysDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Gateway. +// +// - name: A name of the Gateway to delete. Must be in the format +// `projects/*/locations/global/gateways/*`. +func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall { + c := &ProjectsLocationsGatewaysDeleteCall{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 *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall { + 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 *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall { + 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 *ProjectsLocationsGatewaysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysDeleteCall) 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 "networkservices.projects.locations.gateways.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 *ProjectsLocationsGatewaysDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 Gateway.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.gateways.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/global/gateways/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.get": + +type ProjectsLocationsGatewaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Gateway. +// +// - name: A name of the Gateway to get. Must be in the format +// `projects/*/locations/global/gateways/*`. +func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall { + c := &ProjectsLocationsGatewaysGetCall{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 *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall { + 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 *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall { + 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 *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall { + 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 *ProjectsLocationsGatewaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysGetCall) 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 "networkservices.projects.locations.gateways.get" call. +// Exactly one of *Gateway or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Gateway.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Gateway{ + 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 Gateway.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.gateways.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/global/gateways/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Gateway" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.getIamPolicy": + +type ProjectsLocationsGatewaysGetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsGatewaysGetIamPolicyCall { + c := &ProjectsLocationsGatewaysGetIamPolicyCall{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 *ProjectsLocationsGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsGatewaysGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysGetIamPolicyCall) 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/{+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.gateways.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 *ProjectsLocationsGatewaysGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.gateways.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.list": + +type ProjectsLocationsGatewaysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Gateways in a given project and location. +// +// - parent: The project and location from which the Gateways should be +// listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall { + c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Gateways to return per call. +func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListGatewaysResponse` Indicates that this is a +// continuation of a prior `ListGateways` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall { + 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 *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall { + 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 *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall { + 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 *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall { + 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 *ProjectsLocationsGatewaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysListCall) 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/{+parent}/gateways") + 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.gateways.list" call. +// Exactly one of *ListGatewaysResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListGatewaysResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListGatewaysResponse{ + 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 Gateways in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.gateways.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Gateways to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` 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 Gateways should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/gateways", + // "response": { + // "$ref": "ListGatewaysResponse" + // }, + // "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 *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) 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.gateways.patch": + +type ProjectsLocationsGatewaysPatchCall struct { + s *Service + name string + gateway *Gateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Gateway. +// +// - name: Name of the Gateway resource. It matches pattern +// `projects/*/locations/global/gateways/`. +func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall { + c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gateway = gateway + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the Gateway 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 *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall { + 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 *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall { + 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 *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall { + 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 *ProjectsLocationsGatewaysPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysPatchCall) 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.gateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.gateways.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 *ProjectsLocationsGatewaysPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 Gateway.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.gateways.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/global/gateways/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "Gateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.setIamPolicy": + +type ProjectsLocationsGatewaysSetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsGatewaysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGatewaysSetIamPolicyCall { + c := &ProjectsLocationsGatewaysSetIamPolicyCall{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 *ProjectsLocationsGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysSetIamPolicyCall { + 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 *ProjectsLocationsGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysSetIamPolicyCall { + 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 *ProjectsLocationsGatewaysSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysSetIamPolicyCall) 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, "v1beta1/{+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.gateways.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 *ProjectsLocationsGatewaysSetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.gateways.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.gateways.testIamPermissions": + +type ProjectsLocationsGatewaysTestIamPermissionsCall 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 the operation documentation for the +// appropriate value for this field. +func (r *ProjectsLocationsGatewaysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsGatewaysTestIamPermissionsCall{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 *ProjectsLocationsGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysTestIamPermissionsCall { + 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 *ProjectsLocationsGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGatewaysTestIamPermissionsCall { + 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 *ProjectsLocationsGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) 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, "v1beta1/{+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.gateways.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 *ProjectsLocationsGatewaysTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.gateways.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.grpcRoutes.create": + +type ProjectsLocationsGrpcRoutesCreateCall struct { + s *Service + parent string + grpcroute *GrpcRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new GrpcRoute in a given project and location. +// +// - parent: The parent resource of the GrpcRoute. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall { + c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.grpcroute = grpcroute + return c +} + +// GrpcRouteId sets the optional parameter "grpcRouteId": Required. +// Short name of the GrpcRoute resource to be created. +func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall { + c.urlParams_.Set("grpcRouteId", grpcRouteId) + 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 *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall { + 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 *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall { + 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 *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGrpcRoutesCreateCall) 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.grpcroute) + 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}/grpcRoutes") + 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.grpcRoutes.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 *ProjectsLocationsGrpcRoutesCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 GrpcRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.grpcRoutes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "grpcRouteId": { + // "description": "Required. Short name of the GrpcRoute resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/grpcRoutes", + // "request": { + // "$ref": "GrpcRoute" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.grpcRoutes.delete": + +type ProjectsLocationsGrpcRoutesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single GrpcRoute. +// +// - name: A name of the GrpcRoute to delete. Must be in the format +// `projects/*/locations/global/grpcRoutes/*`. +func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall { + c := &ProjectsLocationsGrpcRoutesDeleteCall{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 *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall { + 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 *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall { + 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 *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGrpcRoutesDeleteCall) 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 "networkservices.projects.locations.grpcRoutes.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 *ProjectsLocationsGrpcRoutesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 GrpcRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.grpcRoutes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.grpcRoutes.get": + +type ProjectsLocationsGrpcRoutesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single GrpcRoute. +// +// - name: A name of the GrpcRoute to get. Must be in the format +// `projects/*/locations/global/grpcRoutes/*`. +func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall { + c := &ProjectsLocationsGrpcRoutesGetCall{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 *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall { + 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 *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall { + 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 *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall { + 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 *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGrpcRoutesGetCall) 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 "networkservices.projects.locations.grpcRoutes.get" call. +// Exactly one of *GrpcRoute or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *GrpcRoute.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GrpcRoute{ + 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 GrpcRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.grpcRoutes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GrpcRoute" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.grpcRoutes.list": + +type ProjectsLocationsGrpcRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists GrpcRoutes in a given project and location. +// +// - parent: The project and location from which the GrpcRoutes should +// be listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall { + c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// GrpcRoutes to return per call. +func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListGrpcRoutesResponse` Indicates that this is a +// continuation of a prior `ListGrpcRoutes` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall { + 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 *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall { + 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 *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall { + 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 *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall { + 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 *ProjectsLocationsGrpcRoutesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGrpcRoutesListCall) 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/{+parent}/grpcRoutes") + 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.grpcRoutes.list" call. +// Exactly one of *ListGrpcRoutesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListGrpcRoutesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListGrpcRoutesResponse{ + 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 GrpcRoutes in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.grpcRoutes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of GrpcRoutes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` 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 GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/grpcRoutes", + // "response": { + // "$ref": "ListGrpcRoutesResponse" + // }, + // "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 *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) 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.grpcRoutes.patch": + +type ProjectsLocationsGrpcRoutesPatchCall struct { + s *Service + name string + grpcroute *GrpcRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single GrpcRoute. +// +// - name: Name of the GrpcRoute resource. It matches pattern +// `projects/*/locations/global/grpcRoutes/`. +func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall { + c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.grpcroute = grpcroute + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the GrpcRoute +// 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 *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall { + 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 *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall { + 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 *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall { + 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 *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGrpcRoutesPatchCall) 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.grpcroute) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.grpcRoutes.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 *ProjectsLocationsGrpcRoutesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 GrpcRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.grpcRoutes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "GrpcRoute" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.httpRoutes.create": + +type ProjectsLocationsHttpRoutesCreateCall struct { + s *Service + parent string + httproute *HttpRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new HttpRoute in a given project and location. +// +// - parent: The parent resource of the HttpRoute. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall { + c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.httproute = httproute + return c +} + +// HttpRouteId sets the optional parameter "httpRouteId": Required. +// Short name of the HttpRoute resource to be created. +func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall { + c.urlParams_.Set("httpRouteId", httpRouteId) + 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 *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall { + 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 *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall { + 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 *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsHttpRoutesCreateCall) 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.httproute) + 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}/httpRoutes") + 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.httpRoutes.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 *ProjectsLocationsHttpRoutesCreateCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 HttpRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.httpRoutes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "httpRouteId": { + // "description": "Required. Short name of the HttpRoute resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/httpRoutes", + // "request": { + // "$ref": "HttpRoute" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.httpRoutes.delete": + +type ProjectsLocationsHttpRoutesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single HttpRoute. +// +// - name: A name of the HttpRoute to delete. Must be in the format +// `projects/*/locations/global/httpRoutes/*`. +func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall { + c := &ProjectsLocationsHttpRoutesDeleteCall{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 *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall { + 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 *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall { + 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 *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsHttpRoutesDeleteCall) 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 "networkservices.projects.locations.httpRoutes.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 *ProjectsLocationsHttpRoutesDeleteCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 HttpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.httpRoutes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.httpRoutes.get": + +type ProjectsLocationsHttpRoutesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single HttpRoute. +// +// - name: A name of the HttpRoute to get. Must be in the format +// `projects/*/locations/global/httpRoutes/*`. +func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall { + c := &ProjectsLocationsHttpRoutesGetCall{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 *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall { + 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 *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall { + 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 *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall { + 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 *ProjectsLocationsHttpRoutesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsHttpRoutesGetCall) 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 "networkservices.projects.locations.httpRoutes.get" call. +// Exactly one of *HttpRoute or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HttpRoute.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HttpRoute{ + 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 HttpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.httpRoutes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "HttpRoute" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.httpRoutes.list": + +type ProjectsLocationsHttpRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists HttpRoute in a given project and location. +// +// - parent: The project and location from which the HttpRoutes should +// be listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall { + c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// HttpRoutes to return per call. +func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListHttpRoutesResponse` Indicates that this is a +// continuation of a prior `ListRouters` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall { + 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 *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall { + 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 *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall { + 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 *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall { + 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 *ProjectsLocationsHttpRoutesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsHttpRoutesListCall) 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/{+parent}/httpRoutes") + 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.httpRoutes.list" call. +// Exactly one of *ListHttpRoutesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListHttpRoutesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListHttpRoutesResponse{ + 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 HttpRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.httpRoutes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of HttpRoutes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListHttpRoutesResponse` 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 HttpRoutes should be listed, specified in the format `projects/*/locations/global`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/httpRoutes", + // "response": { + // "$ref": "ListHttpRoutesResponse" + // }, + // "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 *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) 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.httpRoutes.patch": + +type ProjectsLocationsHttpRoutesPatchCall struct { + s *Service + name string + httproute *HttpRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single HttpRoute. +// +// - name: Name of the HttpRoute resource. It matches pattern +// `projects/*/locations/global/httpRoutes/http_route_name>`. +func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall { + c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.httproute = httproute + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the HttpRoute +// 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 *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall { + 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 *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall { + 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 *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall { + 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 *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsHttpRoutesPatchCall) 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.httproute) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.httpRoutes.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 *ProjectsLocationsHttpRoutesPatchCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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 HttpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.httpRoutes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name\u003e`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "HttpRoute" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.create": + +type ProjectsLocationsMeshesCreateCall struct { + s *Service + parent string + mesh *Mesh + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Mesh 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)} + 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 *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { + 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 *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, "v1beta1/{+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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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, "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 "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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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, "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 "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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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 the operation documentation 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, "v1beta1/{+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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+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, "v1beta1/{+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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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 the operation documentation 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, "v1beta1/{+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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.meshes.testIamPermissions": -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMeshesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// 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: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See the operation documentation 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall { 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 { +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 *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMeshesTestIamPermissionsCall) 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 *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()) - 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, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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.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 "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 { @@ -1431,7 +9197,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Location{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1443,25 +9209,28 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.get", + // "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.meshes.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Resource name for the location.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "Location" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1470,103 +9239,217 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "networkservices.projects.locations.list": +// method id "networkservices.projects.locations.operations.cancel": -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// 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 resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } -// 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) +// 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 } -// 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)) +// 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 } -// 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) +// 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, "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 "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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "v1beta1/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": "v1beta1/{+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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { 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 { +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 *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) 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 *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, "v1beta1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -1577,14 +9460,14 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.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) { +// 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 { @@ -1603,7 +9486,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListLocationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1615,41 +9498,25 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1beta1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.list", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.operations.delete", // "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.", + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta1/{+name}/locations", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1658,118 +9525,97 @@ 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 { - 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.endpointPolicies.create": +// method id "networkservices.projects.locations.operations.get": -type ProjectsLocationsEndpointPoliciesCreateCall struct { - s *Service - parent string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new EndpointPolicy in a given project and location. +// 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. // -// - parent: The parent resource of the EndpointPolicy. Must be in the -// format `projects/*/locations/global`. -func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall { - c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.endpointpolicy = endpointpolicy - return c -} - -// EndpointPolicyId sets the optional parameter "endpointPolicyId": -// Required. Short name of the EndpointPolicy resource to be created. -// E.g. "CustomECS". -func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall { - c.urlParams_.Set("endpointPolicyId", endpointPolicyId) +// - 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 *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall { +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 *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall { +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 *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesCreateCall) 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.endpointpolicy) - 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, "v1beta1/{+parent}/endpointPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "networkservices.projects.locations.endpointPolicies.create" call. +// 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 *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +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 { @@ -1800,31 +9646,23 @@ func (c *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a new EndpointPolicy in a given project and location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.endpointPolicies.create", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "endpointPolicyId": { - // "description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/endpointPolicies", - // "request": { - // "$ref": "EndpointPolicy" - // }, + // "path": "v1beta1/{+name}", // "response": { // "$ref": "Operation" // }, @@ -1835,64 +9673,107 @@ func (c *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallO } -// method id "networkservices.projects.locations.endpointPolicies.delete": +// method id "networkservices.projects.locations.operations.list": -type ProjectsLocationsEndpointPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +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`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - 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 } -// Delete: Deletes a single EndpointPolicy. -// -// - name: A name of the EndpointPolicy to delete. Must be in the format -// `projects/*/locations/global/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall { - c := &ProjectsLocationsEndpointPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall { +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 *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall { +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 *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) 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()) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -1903,14 +9784,14 @@ func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// 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 { @@ -1929,7 +9810,7 @@ func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1941,25 +9822,41 @@ func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a single EndpointPolicy.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.endpointPolicies.delete", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta1/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": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+name}/operations", // "response": { - // "$ref": "Operation" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1968,96 +9865,117 @@ func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallO } -// method id "networkservices.projects.locations.endpointPolicies.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 *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 ProjectsLocationsEndpointPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 } -// Get: Gets details of a single EndpointPolicy. +// Create: Creates a new ServiceBinding in a given project and location. // -// - name: A name of the EndpointPolicy to get. Must be in the format -// `projects/*/locations/global/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall { - c := &ProjectsLocationsEndpointPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall { +func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { 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 *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall { - 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 *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall { +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 *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +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()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } 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, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.endpointPolicies.get" call. -// Exactly one of *EndpointPolicy or error will be non-nil. Any non-2xx +// 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 -// *EndpointPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, error) { +// *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 { @@ -2076,7 +9994,7 @@ func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &EndpointPolicy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2088,25 +10006,33 @@ func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets details of a single EndpointPolicy.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.endpointPolicies.get", + // "description": "Creates a new ServiceBinding in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", + // "parent": { + // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "serviceBindingId": { + // "description": "Required. Short name of the ServiceBinding resource to be created.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+parent}/serviceBindings", + // "request": { + // "$ref": "ServiceBinding" + // }, // "response": { - // "$ref": "EndpointPolicy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2115,117 +10041,82 @@ func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOpti } -// method id "networkservices.projects.locations.endpointPolicies.getIamPolicy": - -type ProjectsLocationsEndpointPoliciesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "networkservices.projects.locations.serviceBindings.delete": -// 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 the operation documentation for the appropriate -// value for this field. -func (r *ProjectsLocationsEndpointPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { - c := &ProjectsLocationsEndpointPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c +type ProjectsLocationsServiceBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { - 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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall { +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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +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()) - 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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// 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 { @@ -2244,7 +10135,7 @@ func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2256,31 +10147,25 @@ func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.endpointPolicies.getIamPolicy", + // "description": "Deletes a single ServiceBinding.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.serviceBindings.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 the operation documentation for the appropriate value for this field.", + // "name": { + // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:getIamPolicy", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2289,48 +10174,31 @@ func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi } -// method id "networkservices.projects.locations.endpointPolicies.list": +// method id "networkservices.projects.locations.serviceBindings.get": -type ProjectsLocationsEndpointPoliciesListCall struct { +type ProjectsLocationsServiceBindingsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists EndpointPolicies in a given project and location. +// Get: Gets details of a single ServiceBinding. // -// - parent: The project and location from which the EndpointPolicies -// should be listed, specified in the format -// `projects/*/locations/global`. -func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall { - c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EndpointPolicies to return per call. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListEndpointPoliciesResponse` Indicates that this is a -// continuation of a prior `ListEndpointPolicies` call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall { +func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2340,7 +10208,7 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) 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 *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall { +func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2348,21 +10216,21 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) 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 *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall { +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 *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) { +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_ { @@ -2375,7 +10243,7 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) 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, "v1beta1/{+parent}/endpointPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2383,19 +10251,19 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) 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 "networkservices.projects.locations.endpointPolicies.list" call. -// Exactly one of *ListEndpointPoliciesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListEndpointPoliciesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// 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 *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, error) { +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 { @@ -2414,7 +10282,7 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListEndpointPoliciesResponse{ + ret := &ServiceBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2426,36 +10294,25 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists EndpointPolicies in a given project and location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", + // "description": "Gets details of a single ServiceBinding.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", // "httpMethod": "GET", - // "id": "networkservices.projects.locations.endpointPolicies.list", + // "id": "networkservices.projects.locations.serviceBindings.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of EndpointPolicies to return per call.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` 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 EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.", + // "name": { + // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/endpointPolicies", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListEndpointPoliciesResponse" + // "$ref": "ServiceBinding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2464,122 +10321,117 @@ func (c *ProjectsLocationsEndpointPoliciesListCall) 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 *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) 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.endpointPolicies.patch": +// method id "networkservices.projects.locations.serviceBindings.getIamPolicy": -type ProjectsLocationsEndpointPoliciesPatchCall struct { - s *Service - name string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single EndpointPolicy. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: Name of the EndpointPolicy resource. It matches pattern -// `projects/{project}/locations/global/endpointPolicies/{endpoint_poli -// cy}`. -func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall { - c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.endpointpolicy = endpointpolicy +// - resource: REQUIRED: The resource for which the policy is being +// requested. See the operation documentation 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 } -// UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the EndpointPolicy -// 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 *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall { +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 *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall { +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 *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +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()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy) - 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, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// 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 { @@ -2598,7 +10450,7 @@ func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2610,34 +10462,31 @@ func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates the parameters of a single EndpointPolicy.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - // "httpMethod": "PATCH", - // "id": "networkservices.projects.locations.endpointPolicies.patch", + // "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", + // "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 the operation documentation for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta1/{+name}", - // "request": { - // "$ref": "EndpointPolicy" - // }, + // "path": "v1beta1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2646,92 +10495,113 @@ func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.endpointPolicies.setIamPolicy": +// method id "networkservices.projects.locations.serviceBindings.list": -type ProjectsLocationsEndpointPoliciesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsListCall struct { + s *Service + parent 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. +// List: Lists ServiceBinding in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See the operation documentation for the appropriate -// value for this field. -func (r *ProjectsLocationsEndpointPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { - c := &ProjectsLocationsEndpointPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - 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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { +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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall { +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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +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()) - 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, "v1beta1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// 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 { @@ -2750,7 +10620,7 @@ func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &ListServiceBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2762,28 +10632,36 @@ func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.endpointPolicies.setIamPolicy", + // "description": "Lists ServiceBinding in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.serviceBindings.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "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/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1beta1/{+parent}/serviceBindings", // "response": { - // "$ref": "Policy" + // "$ref": "ListServiceBindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2792,38 +10670,64 @@ func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi } -// method id "networkservices.projects.locations.endpointPolicies.testIamPermissions": +// 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) + } +} -type ProjectsLocationsEndpointPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.serviceBindings.patch": + +type ProjectsLocationsServiceBindingsPatchCall struct { + s *Service + name string + servicebinding *ServiceBinding + 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. +// Patch: Updates the parameters of a single ServiceBinding. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See the operation documentation for the -// appropriate value for this field. -func (r *ProjectsLocationsEndpointPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { - c := &ProjectsLocationsEndpointPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Name of the ServiceBinding resource. It matches pattern +// `projects/*/locations/global/serviceBindings/service_binding_name>`. +func (r *ProjectsLocationsServiceBindingsService) Patch(name string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsPatchCall { + c := &ProjectsLocationsServiceBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.servicebinding = servicebinding + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the ServiceBinding +// 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 *ProjectsLocationsServiceBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceBindingsPatchCall { + 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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2831,21 +10735,21 @@ func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) 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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsPatchCall { 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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceBindingsPatchCall) 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_ { @@ -2853,34 +10757,34 @@ func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + 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, "v1beta1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.endpointPolicies.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 *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "networkservices.projects.locations.serviceBindings.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 *ProjectsLocationsServiceBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2899,7 +10803,7 @@ func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2911,28 +10815,34 @@ func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...goo } 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.endpointPolicies.testIamPermissions", + // "description": "Updates the parameters of a single ServiceBinding.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.serviceBindings.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name\u003e`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:testIamPermissions", + // "path": "v1beta1/{+name}", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "ServiceBinding" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2941,40 +10851,35 @@ func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...goo } -// method id "networkservices.projects.locations.operations.cancel": +// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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`. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - 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 +// - resource: REQUIRED: The resource for which the policy is being +// specified. See the operation documentation 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2982,21 +10887,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 *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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) 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 *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_ { @@ -3004,14 +10909,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.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, "v1beta1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3019,19 +10924,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } 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.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// 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 -// *Empty.ServerResponse.Header or (if a response was returned at all) +// *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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +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 { @@ -3050,7 +10955,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3062,28 +10967,28 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "networkservices.projects.locations.operations.cancel", + // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}:cancel", + // "path": "v1beta1/{+resource}:setIamPolicy", // "request": { - // "$ref": "CancelOperationRequest" + // "$ref": "SetIamPolicyRequest" // }, // "response": { - // "$ref": "Empty" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3092,32 +10997,38 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.delete": +// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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`. +// 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 resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See the operation documentation 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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3125,21 +11036,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 *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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) 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 *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_ { @@ -3147,29 +11058,34 @@ 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.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, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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.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.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 *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3188,7 +11104,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3200,25 +11116,28 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.operations.delete", + // "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3227,97 +11146,97 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkservices.projects.locations.operations.get": +// method id "networkservices.projects.locations.tcpRoutes.create": -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsTcpRoutesCreateCall struct { + s *Service + parent string + tcproute *TcpRoute + 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 TcpRoute 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 TcpRoute. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall { + c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.tcproute = tcproute + return c +} + +// TcpRouteId sets the optional parameter "tcpRouteId": Required. Short +// name of the TcpRoute resource to be created. E.g. TODO(Add an +// example). +func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall { + c.urlParams_.Set("tcpRouteId", tcpRouteId) 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 *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall { 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 { +func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall { 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 *ProjectsLocationsTcpRoutesCreateCall) 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 *ProjectsLocationsTcpRoutesCreateCall) 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.tcproute) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.operations.get" call. +// Do executes the "networkservices.projects.locations.tcpRoutes.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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsTcpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3348,23 +11267,31 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.get", + // "description": "Creates a new TcpRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.tcpRoutes.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "parent": { + // "description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "tcpRouteId": { + // "description": "Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+parent}/tcpRoutes", + // "request": { + // "$ref": "TcpRoute" + // }, // "response": { // "$ref": "Operation" // }, @@ -3375,107 +11302,64 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkservices.projects.locations.operations.list": +// method id "networkservices.projects.locations.tcpRoutes.delete": -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsTcpRoutesDeleteCall struct { + s *Service + name string + 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`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// Delete: Deletes a single TcpRoute. // -// - 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: A name of the TcpRoute to delete. Must be in the format +// `projects/*/locations/global/tcpRoutes/*`. +func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall { + c := &ProjectsLocationsTcpRoutesDeleteCall{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 *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall { 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 *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall { 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 *ProjectsLocationsTcpRoutesDeleteCall) 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 *ProjectsLocationsTcpRoutesDeleteCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -3486,14 +11370,14 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo 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) { +// Do executes the "networkservices.projects.locations.tcpRoutes.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 *ProjectsLocationsTcpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3512,7 +11396,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListOperationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3524,41 +11408,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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.operations.list", + // "description": "Deletes a single TcpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.tcpRoutes.delete", // "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. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", // "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", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3567,117 +11435,96 @@ 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": - -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 -} +// method id "networkservices.projects.locations.tcpRoutes.get": -// 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) +type ProjectsLocationsTcpRoutesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single TcpRoute. +// +// - name: A name of the TcpRoute to get. Must be in the format +// `projects/*/locations/global/tcpRoutes/*`. +func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall { + c := &ProjectsLocationsTcpRoutesGetCall{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 *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall { 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 *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall { + 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 *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { +func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall { 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 *ProjectsLocationsTcpRoutesGetCall) 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 *ProjectsLocationsTcpRoutesGetCall) 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 + 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, "v1beta1/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "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 +// Do executes the "networkservices.projects.locations.tcpRoutes.get" call. +// Exactly one of *TcpRoute or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *TcpRoute.ServerResponse.Header or (if a response was returned 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 *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3696,7 +11543,7 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &TcpRoute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3708,33 +11555,25 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates a new ServiceBinding in a given project and location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.create", + // "description": "Gets details of a single TcpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.tcpRoutes.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", + // "name": { + // "description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", // "required": true, // "type": "string" - // }, - // "serviceBindingId": { - // "description": "Required. Short name of the ServiceBinding resource to be created.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/serviceBindings", - // "request": { - // "$ref": "ServiceBinding" - // }, + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "TcpRoute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3743,82 +11582,112 @@ func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.delete": +// method id "networkservices.projects.locations.tcpRoutes.list": -type ProjectsLocationsServiceBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsTcpRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single ServiceBinding. +// List: Lists TcpRoute in a given project and location. // -// - 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 +// - parent: The project and location from which the TcpRoutes should be +// listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall { + c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// TcpRoutes to return per call. +func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListTcpRoutesResponse` Indicates that this is a +// continuation of a prior `ListRouters` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall { + 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 *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall { 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 *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall { + 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 *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { +func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall { 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 *ProjectsLocationsTcpRoutesListCall) 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 *ProjectsLocationsTcpRoutesListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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.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) { +// Do executes the "networkservices.projects.locations.tcpRoutes.list" call. +// Exactly one of *ListTcpRoutesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListTcpRoutesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3837,7 +11706,7 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListTcpRoutesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3849,25 +11718,36 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a single ServiceBinding.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - // "httpMethod": "DELETE", - // "id": "networkservices.projects.locations.serviceBindings.delete", + // "description": "Lists TcpRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.tcpRoutes.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "pageSize": { + // "description": "Maximum number of TcpRoutes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListTcpRoutesResponse` 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 TcpRoutes should be listed, specified in the format `projects/*/locations/global`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+name}", + // "path": "v1beta1/{+parent}/tcpRoutes", // "response": { - // "$ref": "Operation" + // "$ref": "ListTcpRoutesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3876,78 +11756,103 @@ func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOp } -// method id "networkservices.projects.locations.serviceBindings.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 *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) 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 ProjectsLocationsServiceBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.tcpRoutes.patch": + +type ProjectsLocationsTcpRoutesPatchCall struct { + s *Service + name string + tcproute *TcpRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single ServiceBinding. +// Patch: Updates the parameters of a single TcpRoute. // -// - 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: Name of the TcpRoute resource. It matches pattern +// `projects/*/locations/global/tcpRoutes/tcp_route_name>`. +func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall { + c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.tcproute = tcproute + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the TcpRoute 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 *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall { + 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 *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { +func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall { 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 { +func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall { 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 *ProjectsLocationsTcpRoutesPatchCall) 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 *ProjectsLocationsTcpRoutesPatchCall) 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.tcproute) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -3958,14 +11863,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.tcpRoutes.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 -// *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) { +// *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 *ProjectsLocationsTcpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3984,7 +11889,7 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ServiceBinding{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3996,25 +11901,34 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets details of a single ServiceBinding.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.get", + // "description": "Updates the parameters of a single TcpRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.tcpRoutes.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", + // "description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "TcpRoute" + // }, // "response": { - // "$ref": "ServiceBinding" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4023,117 +11937,97 @@ func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOptio } -// 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. +// method id "networkservices.projects.locations.tlsRoutes.create": + +type ProjectsLocationsTlsRoutesCreateCall struct { + s *Service + parent string + tlsroute *TlsRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new TlsRoute in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See the operation documentation 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 +// - parent: The parent resource of the TlsRoute. Must be in the format +// `projects/*/locations/global`. +func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall { + c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.tlsroute = tlsroute 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)) +// TlsRouteId sets the optional parameter "tlsRouteId": Required. Short +// name of the TlsRoute resource to be created. E.g. TODO(Add an +// example). +func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall { + c.urlParams_.Set("tlsRouteId", tlsRouteId) 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 { +func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall { 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 { +func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall { 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 *ProjectsLocationsTlsRoutesCreateCall) 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 *ProjectsLocationsTlsRoutesCreateCall) 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.tlsroute) + 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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes") 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{ - "resource": c.resource, + "parent": c.parent, }) 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) { +// Do executes the "networkservices.projects.locations.tlsRoutes.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 *ProjectsLocationsTlsRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4152,7 +12046,7 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4164,31 +12058,33 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.getIamPolicy", + // "description": "Creates a new TlsRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.tlsRoutes.create", // "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).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + // "parent": { + // "description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "tlsRouteId": { + // "description": "Required. Short name of the TlsRoute resource to be created. E.g. TODO(Add an example).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:getIamPolicy", + // "path": "v1beta1/{+parent}/tlsRoutes", + // "request": { + // "$ref": "TlsRoute" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4197,113 +12093,82 @@ func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.list": +// method id "networkservices.projects.locations.tlsRoutes.delete": -type ProjectsLocationsServiceBindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsTlsRoutesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists ServiceBinding in a given project and location. +// Delete: Deletes a single TlsRoute. // -// - 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) +// - name: A name of the TlsRoute to delete. Must be in the format +// `projects/*/locations/global/tlsRoutes/*`. +func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall { + c := &ProjectsLocationsTlsRoutesDeleteCall{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 *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { +func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall { 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 { +func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall { 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 *ProjectsLocationsTlsRoutesDeleteCall) 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 *ProjectsLocationsTlsRoutesDeleteCall) 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/{+parent}/serviceBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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{ - "parent": c.parent, + "name": c.name, }) 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) { +// Do executes the "networkservices.projects.locations.tlsRoutes.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 *ProjectsLocationsTlsRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4322,7 +12187,7 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListServiceBindingsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4334,36 +12199,25 @@ func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists ServiceBinding in a given project and location.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - // "httpMethod": "GET", - // "id": "networkservices.projects.locations.serviceBindings.list", + // "description": "Deletes a single TlsRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.tlsRoutes.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "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`.", + // "name": { + // "description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+parent}/serviceBindings", + // "path": "v1beta1/{+name}", // "response": { - // "$ref": "ListServiceBindingsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4372,103 +12226,78 @@ 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 { - 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.patch": - -type ProjectsLocationsServiceBindingsPatchCall struct { - s *Service - name string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ServiceBinding. -// -// - name: Name of the ServiceBinding resource. It matches pattern -// `projects/*/locations/global/serviceBindings/service_binding_name>`. -func (r *ProjectsLocationsServiceBindingsService) Patch(name string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsPatchCall { - c := &ProjectsLocationsServiceBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.servicebinding = servicebinding - return c -} +// method id "networkservices.projects.locations.tlsRoutes.get": -// UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the ServiceBinding -// 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 *ProjectsLocationsServiceBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceBindingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +type ProjectsLocationsTlsRoutesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single TlsRoute. +// +// - name: A name of the TlsRoute to get. Must be in the format +// `projects/*/locations/global/tlsRoutes/*`. +func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall { + c := &ProjectsLocationsTlsRoutesGetCall{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 *ProjectsLocationsServiceBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsPatchCall { +func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall { 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 *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall { + 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 *ProjectsLocationsServiceBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsPatchCall { +func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall { 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 *ProjectsLocationsServiceBindingsPatchCall) Header() http.Header { +func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceBindingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsTlsRoutesGetCall) 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 + 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4479,14 +12308,14 @@ func (c *ProjectsLocationsServiceBindingsPatchCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkservices.projects.locations.serviceBindings.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 +// Do executes the "networkservices.projects.locations.tlsRoutes.get" call. +// Exactly one of *TlsRoute or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *TlsRoute.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4505,7 +12334,7 @@ func (c *ProjectsLocationsServiceBindingsPatchCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &TlsRoute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4517,34 +12346,25 @@ func (c *ProjectsLocationsServiceBindingsPatchCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the parameters of a single ServiceBinding.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - // "httpMethod": "PATCH", - // "id": "networkservices.projects.locations.serviceBindings.patch", + // "description": "Gets details of a single TlsRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.tlsRoutes.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name\u003e`.", + // "description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta1/{+name}", - // "request": { - // "$ref": "ServiceBinding" - // }, // "response": { - // "$ref": "Operation" + // "$ref": "TlsRoute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4553,92 +12373,112 @@ func (c *ProjectsLocationsServiceBindingsPatchCall) Do(opts ...googleapi.CallOpt } -// method id "networkservices.projects.locations.serviceBindings.setIamPolicy": +// method id "networkservices.projects.locations.tlsRoutes.list": -type ProjectsLocationsServiceBindingsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsTlsRoutesListCall struct { + s *Service + parent 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. +// List: Lists TlsRoute in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See the operation documentation 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 +// - parent: The project and location from which the TlsRoutes should be +// listed, specified in the format `projects/*/locations/global`. +func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall { + c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// TlsRoutes to return per call. +func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListTlsRoutesResponse` Indicates that this is a +// continuation of a prior `ListRouters` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall { + 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 *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall { 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 *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall { + 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 *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall { +func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall { 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 *ProjectsLocationsTlsRoutesListCall) 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 *ProjectsLocationsTlsRoutesListCall) 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, "v1beta1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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) { +// Do executes the "networkservices.projects.locations.tlsRoutes.list" call. +// Exactly one of *ListTlsRoutesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListTlsRoutesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4657,7 +12497,7 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &ListTlsRoutesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4669,28 +12509,36 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.setIamPolicy", + // "description": "Lists TlsRoute in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.tlsRoutes.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "pageSize": { + // "description": "Maximum number of TlsRoutes to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListTlsRoutesResponse` 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 TlsRoutes should be listed, specified in the format `projects/*/locations/global`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1beta1/{+parent}/tlsRoutes", // "response": { - // "$ref": "Policy" + // "$ref": "ListTlsRoutesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4699,38 +12547,64 @@ func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi. } -// method id "networkservices.projects.locations.serviceBindings.testIamPermissions": +// 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 *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) 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 ProjectsLocationsServiceBindingsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkservices.projects.locations.tlsRoutes.patch": + +type ProjectsLocationsTlsRoutesPatchCall struct { + s *Service + name string + tlsroute *TlsRoute + 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. +// Patch: Updates the parameters of a single TlsRoute. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See the operation documentation 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 +// - name: Name of the TlsRoute resource. It matches pattern +// `projects/*/locations/global/tlsRoutes/tls_route_name>`. +func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall { + c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.tlsroute = tlsroute + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the TlsRoute 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 *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall { + 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 *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4738,21 +12612,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 *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall { 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 *ProjectsLocationsTlsRoutesPatchCall) 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 *ProjectsLocationsTlsRoutesPatchCall) 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_ { @@ -4760,34 +12634,34 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute) 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/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "networkservices.projects.locations.tlsRoutes.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 *ProjectsLocationsTlsRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4806,7 +12680,7 @@ func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4818,28 +12692,34 @@ 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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkservices.projects.locations.serviceBindings.testIamPermissions", + // "description": "Updates the parameters of a single TlsRoute.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.tlsRoutes.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name\u003e`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta1/{+resource}:testIamPermissions", + // "path": "v1beta1/{+name}", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "TlsRoute" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index 6d04ad17809..b6bf851bc8c 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -1389,6 +1389,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "refreshRuntimeTokenInternal": { + "description": "Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:refreshRuntimeTokenInternal", + "httpMethod": "POST", + "id": "notebooks.projects.locations.runtimes.refreshRuntimeTokenInternal", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:refreshRuntimeTokenInternal", + "request": { + "$ref": "RefreshRuntimeTokenInternalRequest" + }, + "response": { + "$ref": "RefreshRuntimeTokenInternalResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "reportEvent": { "description": "Report and process a runtime event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:reportEvent", @@ -1753,7 +1781,7 @@ } } }, - "revision": "20220303", + "revision": "20220319", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1924,7 +1952,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -2956,6 +2984,34 @@ }, "type": "object" }, + "RefreshRuntimeTokenInternalRequest": { + "description": "Request for getting a new access token.", + "id": "RefreshRuntimeTokenInternalRequest", + "properties": { + "vmId": { + "description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", + "type": "string" + } + }, + "type": "object" + }, + "RefreshRuntimeTokenInternalResponse": { + "description": "Response with a new access token.", + "id": "RefreshRuntimeTokenInternalResponse", + "properties": { + "accessToken": { + "description": "The OAuth 2.0 access token.", + "type": "string" + }, + "expireTime": { + "description": "Output only. Token expiration time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "RegisterInstanceRequest": { "description": "Request for registering a notebook instance.", "id": "RegisterInstanceRequest", diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 60ef273bbef..b2415b1d854 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -518,8 +518,7 @@ func (s *Disk) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -2044,6 +2043,72 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RefreshRuntimeTokenInternalRequest: Request for getting a new access +// token. +type RefreshRuntimeTokenInternalRequest struct { + // VmId: Required. The VM hardware token for authenticating the VM. + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + VmId string `json:"vmId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VmId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VmId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RefreshRuntimeTokenInternalRequest) MarshalJSON() ([]byte, error) { + type NoMethod RefreshRuntimeTokenInternalRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RefreshRuntimeTokenInternalResponse: Response with a new access +// token. +type RefreshRuntimeTokenInternalResponse struct { + // AccessToken: The OAuth 2.0 access token. + AccessToken string `json:"accessToken,omitempty"` + + // ExpireTime: Output only. Token expiration time. + ExpireTime string `json:"expireTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AccessToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RefreshRuntimeTokenInternalResponse) MarshalJSON() ([]byte, error) { + type NoMethod RefreshRuntimeTokenInternalResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RegisterInstanceRequest: Request for registering a notebook instance. type RegisterInstanceRequest struct { // InstanceId: Required. User defined unique ID of this instance. The @@ -10220,6 +10285,152 @@ func (c *ProjectsLocationsRuntimesListCall) Pages(ctx context.Context, f func(*L } } +// method id "notebooks.projects.locations.runtimes.refreshRuntimeTokenInternal": + +type ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall struct { + s *Service + name string + refreshruntimetokeninternalrequest *RefreshRuntimeTokenInternalRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RefreshRuntimeTokenInternal: Gets an access token for the consumer +// service account that the customer attached to the runtime. Only +// accessible from the tenant instance. +// +// - name: Format: +// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`. +func (r *ProjectsLocationsRuntimesService) RefreshRuntimeTokenInternal(name string, refreshruntimetokeninternalrequest *RefreshRuntimeTokenInternalRequest) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall { + c := &ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.refreshruntimetokeninternalrequest = refreshruntimetokeninternalrequest + 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 *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall { + 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 *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Context(ctx context.Context) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall { + 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 *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) 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.refreshruntimetokeninternalrequest) + 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}:refreshRuntimeTokenInternal") + 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 "notebooks.projects.locations.runtimes.refreshRuntimeTokenInternal" call. +// Exactly one of *RefreshRuntimeTokenInternalResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RefreshRuntimeTokenInternalResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Do(opts ...googleapi.CallOption) (*RefreshRuntimeTokenInternalResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RefreshRuntimeTokenInternalResponse{ + 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 access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:refreshRuntimeTokenInternal", + // "httpMethod": "POST", + // "id": "notebooks.projects.locations.runtimes.refreshRuntimeTokenInternal", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:refreshRuntimeTokenInternal", + // "request": { + // "$ref": "RefreshRuntimeTokenInternalRequest" + // }, + // "response": { + // "$ref": "RefreshRuntimeTokenInternalResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "notebooks.projects.locations.runtimes.reportEvent": type ProjectsLocationsRuntimesReportEventCall struct { diff --git a/orgpolicy/v2/orgpolicy-api.json b/orgpolicy/v2/orgpolicy-api.json index 75c030e9040..7ed994f55ad 100644 --- a/orgpolicy/v2/orgpolicy-api.json +++ b/orgpolicy/v2/orgpolicy-api.json @@ -751,7 +751,7 @@ } } }, - "revision": "20220129", + "revision": "20220321", "rootUrl": "https://orgpolicy.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -967,7 +967,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/orgpolicy/v2/orgpolicy-gen.go b/orgpolicy/v2/orgpolicy-gen.go index 9731ff7ee8e..821d3451a94 100644 --- a/orgpolicy/v2/orgpolicy-gen.go +++ b/orgpolicy/v2/orgpolicy-gen.go @@ -693,8 +693,7 @@ func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues) MarshalJSON() ( // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/oslogin/v1/oslogin-api.json b/oslogin/v1/oslogin-api.json index 464e34e51e9..1bd6929d61e 100644 --- a/oslogin/v1/oslogin-api.json +++ b/oslogin/v1/oslogin-api.json @@ -343,11 +343,11 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://oslogin.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/oslogin/v1/oslogin-gen.go b/oslogin/v1/oslogin-gen.go index bcf911a31a7..d61b421b38d 100644 --- a/oslogin/v1/oslogin-gen.go +++ b/oslogin/v1/oslogin-gen.go @@ -193,8 +193,7 @@ type UsersSshPublicKeysService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/oslogin/v1alpha/oslogin-api.json b/oslogin/v1alpha/oslogin-api.json index b71ea8b4b93..955763658f9 100644 --- a/oslogin/v1alpha/oslogin-api.json +++ b/oslogin/v1alpha/oslogin-api.json @@ -403,11 +403,11 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://oslogin.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/oslogin/v1alpha/oslogin-gen.go b/oslogin/v1alpha/oslogin-gen.go index e2720ccccc4..1af36a57060 100644 --- a/oslogin/v1alpha/oslogin-gen.go +++ b/oslogin/v1alpha/oslogin-gen.go @@ -193,8 +193,7 @@ type UsersSshPublicKeysService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/oslogin/v1beta/oslogin-api.json b/oslogin/v1beta/oslogin-api.json index e45ae1af91a..c9f0561aaa6 100644 --- a/oslogin/v1beta/oslogin-api.json +++ b/oslogin/v1beta/oslogin-api.json @@ -373,11 +373,11 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://oslogin.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/oslogin/v1beta/oslogin-gen.go b/oslogin/v1beta/oslogin-gen.go index 408261ebbc2..b9c6fe34889 100644 --- a/oslogin/v1beta/oslogin-gen.go +++ b/oslogin/v1beta/oslogin-gen.go @@ -193,8 +193,7 @@ type UsersSshPublicKeysService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/people/v1/people-api.json b/people/v1/people-api.json index 017bbbf4ff2..90f7c322856 100644 --- a/people/v1/people-api.json +++ b/people/v1/people-api.json @@ -1172,7 +1172,7 @@ } } }, - "revision": "20220301", + "revision": "20220321", "rootUrl": "https://people.googleapis.com/", "schemas": { "Address": { @@ -1774,7 +1774,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/people/v1/people-gen.go b/people/v1/people-gen.go index 29ec9258652..6b0c08d78b0 100644 --- a/people/v1/people-gen.go +++ b/people/v1/people-gen.go @@ -1286,8 +1286,7 @@ func (s *EmailAddress) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json new file mode 100644 index 00000000000..fb22d498c7b --- /dev/null +++ b/playintegrity/v1/playintegrity-api.json @@ -0,0 +1,319 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/playintegrity": { + "description": "Private Service: https://www.googleapis.com/auth/playintegrity" + } + } + } + }, + "basePath": "", + "baseUrl": "https://playintegrity.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Play Integrity", + "description": "Play Integrity", + "discoveryVersion": "v1", + "documentationLink": "https://developer.android.com/google/play/integrity", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "playintegrity:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://playintegrity.mtls.googleapis.com/", + "name": "playintegrity", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "v1": { + "methods": { + "decodeIntegrityToken": { + "description": "Decodes the integrity token and returns the token payload.", + "flatPath": "v1/{v1Id}:decodeIntegrityToken", + "httpMethod": "POST", + "id": "playintegrity.decodeIntegrityToken", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "packageName": { + "description": " Package name of the app the attached integrity token belongs to.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+packageName}:decodeIntegrityToken", + "request": { + "$ref": "DecodeIntegrityTokenRequest" + }, + "response": { + "$ref": "DecodeIntegrityTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/playintegrity" + ] + } + } + } + }, + "revision": "20220315", + "rootUrl": "https://playintegrity.googleapis.com/", + "schemas": { + "AccountDetails": { + "description": "Contains the account information such as the licensing status for the user in the scope.", + "id": "AccountDetails", + "properties": { + "appLicensingVerdict": { + "description": "Required. Details about the licensing status of the user for the app in the scope.", + "enum": [ + "UNKNOWN", + "LICENSED", + "UNLICENSED", + "UNEVALUATED" + ], + "enumDescriptions": [ + "Play does not have sufficient information to evaluate licensing details", + "The app and certificate match the versions distributed by Play.", + "The certificate or package name does not match Google Play records.", + "Licensing details were not evaluated since a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar or the application was not a known Play version." + ], + "type": "string" + } + }, + "type": "object" + }, + "AppIntegrity": { + "description": "Contains the application integrity information.", + "id": "AppIntegrity", + "properties": { + "appRecognitionVerdict": { + "description": "Required. Details about the app recognition verdict", + "enum": [ + "UNKNOWN", + "PLAY_RECOGNIZED", + "UNRECOGNIZED_VERSION", + "UNEVALUATED" + ], + "enumDescriptions": [ + "Play does not have sufficient information to evaluate app integrity", + "The app and certificate match the versions distributed by Play.", + "The certificate or package name does not match Google Play records.", + "Application integrity was not evaluated since a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar." + ], + "type": "string" + }, + "certificateSha256Digest": { + "description": "Hex fingerprint of the application signing certificate. e.g. “ABCE1F....” Set iff app_recognition_verdict != UNEVALUATED.", + "items": { + "type": "string" + }, + "type": "array" + }, + "packageName": { + "description": "Package name of the application under attestation. Set iff app_recognition_verdict != UNEVALUATED.", + "type": "string" + }, + "versionCode": { + "description": "Version code of the application. Set iff app_recognition_verdict != UNEVALUATED.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "DecodeIntegrityTokenRequest": { + "description": "Request to decode the integrity token.", + "id": "DecodeIntegrityTokenRequest", + "properties": { + "integrityToken": { + "description": "Encoded integrity token.", + "type": "string" + } + }, + "type": "object" + }, + "DecodeIntegrityTokenResponse": { + "description": "Response containing the decoded integrity payload.", + "id": "DecodeIntegrityTokenResponse", + "properties": { + "tokenPayloadExternal": { + "$ref": "TokenPayloadExternal", + "description": "Plain token payload generated from the decoded integrity token." + } + }, + "type": "object" + }, + "DeviceIntegrity": { + "description": "Contains the device attestation information.", + "id": "DeviceIntegrity", + "properties": { + "deviceRecognitionVerdict": { + "description": "Details about the integrity of the device the app is running on", + "items": { + "enum": [ + "UNKNOWN", + "MEETS_BASIC_INTEGRITY", + "MEETS_DEVICE_INTEGRITY", + "MEETS_STRONG_INTEGRITY", + "MEETS_VIRTUAL_INTEGRITY" + ], + "enumDescriptions": [ + "Play does not have sufficient information to evaluate device integrity", + "App is running on a device that passes basic system integrity checks, but may not meet Android platform compatibility requirements and may not be approved to run Google Play services.", + "App is running on GMS Android device with Google Play services.", + "App is running on GMS Android device with Google Play services and has a strong guarantee of system integrity such as a hardware-backed keystore.", + "App is running on an Android emulator with Google Play services which meets core Android compatibility requirements." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RequestDetails": { + "description": "Contains the integrity request information.", + "id": "RequestDetails", + "properties": { + "nonce": { + "description": "Required. Nonce that was provided in the request (which is base64 web-safe no-wrap).", + "type": "string" + }, + "requestPackageName": { + "description": "Required. Application package name this attestation was requested for. Note: This field makes no guarantees or promises on the caller integrity. For details on application integrity, check application_integrity.", + "type": "string" + }, + "timestampMillis": { + "description": "Required. Timestamp, in milliseconds, of the integrity application request.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "TestingDetails": { + "description": "Contains additional information generated for testing responses.", + "id": "TestingDetails", + "properties": { + "isTestingResponse": { + "description": "Required. Indicates that the information contained in this payload is a testing response that is statically overridden for a tester.", + "type": "boolean" + } + }, + "type": "object" + }, + "TokenPayloadExternal": { + "description": "Contains basic app information and integrity signals like device attestation and licensing details.", + "id": "TokenPayloadExternal", + "properties": { + "accountDetails": { + "$ref": "AccountDetails", + "description": "Required. Details about the Play Store account." + }, + "appIntegrity": { + "$ref": "AppIntegrity", + "description": "Required. Details about the application integrity." + }, + "deviceIntegrity": { + "$ref": "DeviceIntegrity", + "description": "Required. Details about the device integrity." + }, + "requestDetails": { + "$ref": "RequestDetails", + "description": "Required. Details about the integrity request." + }, + "testingDetails": { + "$ref": "TestingDetails", + "description": "Indicates that this payload is generated for testing purposes and contains any additional data that is linked with testing status." + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Play Integrity API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go new file mode 100644 index 00000000000..6e5f07903ac --- /dev/null +++ b/playintegrity/v1/playintegrity-gen.go @@ -0,0 +1,614 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package playintegrity provides access to the Google Play Integrity API. +// +// For product documentation, see: https://developer.android.com/google/play/integrity +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/playintegrity/v1" +// ... +// ctx := context.Background() +// playintegrityService, err := playintegrity.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// playintegrityService, err := playintegrity.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// playintegrityService, err := playintegrity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package playintegrity // import "google.golang.org/api/playintegrity/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "playintegrity:v1" +const apiName = "playintegrity" +const apiVersion = "v1" +const basePath = "https://playintegrity.googleapis.com/" +const mtlsBasePath = "https://playintegrity.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // Private Service: https://www.googleapis.com/auth/playintegrity + PlayintegrityScope = "https://www.googleapis.com/auth/playintegrity" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/playintegrity", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.V1 = NewV1Service(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + V1 *V1Service +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewV1Service(s *Service) *V1Service { + rs := &V1Service{s: s} + return rs +} + +type V1Service struct { + s *Service +} + +// AccountDetails: Contains the account information such as the +// licensing status for the user in the scope. +type AccountDetails struct { + // AppLicensingVerdict: Required. Details about the licensing status of + // the user for the app in the scope. + // + // Possible values: + // "UNKNOWN" - Play does not have sufficient information to evaluate + // licensing details + // "LICENSED" - The app and certificate match the versions distributed + // by Play. + // "UNLICENSED" - The certificate or package name does not match + // Google Play records. + // "UNEVALUATED" - Licensing details were not evaluated since a + // necessary requirement was missed. For example DeviceIntegrity did not + // meet the minimum bar or the application was not a known Play version. + AppLicensingVerdict string `json:"appLicensingVerdict,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppLicensingVerdict") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppLicensingVerdict") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AccountDetails) MarshalJSON() ([]byte, error) { + type NoMethod AccountDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AppIntegrity: Contains the application integrity information. +type AppIntegrity struct { + // AppRecognitionVerdict: Required. Details about the app recognition + // verdict + // + // Possible values: + // "UNKNOWN" - Play does not have sufficient information to evaluate + // app integrity + // "PLAY_RECOGNIZED" - The app and certificate match the versions + // distributed by Play. + // "UNRECOGNIZED_VERSION" - The certificate or package name does not + // match Google Play records. + // "UNEVALUATED" - Application integrity was not evaluated since a + // necessary requirement was missed. For example DeviceIntegrity did not + // meet the minimum bar. + AppRecognitionVerdict string `json:"appRecognitionVerdict,omitempty"` + + // CertificateSha256Digest: Hex fingerprint of the application signing + // certificate. e.g. “ABCE1F....” Set iff app_recognition_verdict != + // UNEVALUATED. + CertificateSha256Digest []string `json:"certificateSha256Digest,omitempty"` + + // PackageName: Package name of the application under attestation. Set + // iff app_recognition_verdict != UNEVALUATED. + PackageName string `json:"packageName,omitempty"` + + // VersionCode: Version code of the application. Set iff + // app_recognition_verdict != UNEVALUATED. + VersionCode int64 `json:"versionCode,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "AppRecognitionVerdict") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppRecognitionVerdict") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AppIntegrity) MarshalJSON() ([]byte, error) { + type NoMethod AppIntegrity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DecodeIntegrityTokenRequest: Request to decode the integrity token. +type DecodeIntegrityTokenRequest struct { + // IntegrityToken: Encoded integrity token. + IntegrityToken string `json:"integrityToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IntegrityToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IntegrityToken") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DecodeIntegrityTokenRequest) MarshalJSON() ([]byte, error) { + type NoMethod DecodeIntegrityTokenRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DecodeIntegrityTokenResponse: Response containing the decoded +// integrity payload. +type DecodeIntegrityTokenResponse struct { + // TokenPayloadExternal: Plain token payload generated from the decoded + // integrity token. + TokenPayloadExternal *TokenPayloadExternal `json:"tokenPayloadExternal,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "TokenPayloadExternal") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TokenPayloadExternal") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DecodeIntegrityTokenResponse) MarshalJSON() ([]byte, error) { + type NoMethod DecodeIntegrityTokenResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceIntegrity: Contains the device attestation information. +type DeviceIntegrity struct { + // DeviceRecognitionVerdict: Details about the integrity of the device + // the app is running on + // + // Possible values: + // "UNKNOWN" - Play does not have sufficient information to evaluate + // device integrity + // "MEETS_BASIC_INTEGRITY" - App is running on a device that passes + // basic system integrity checks, but may not meet Android platform + // compatibility requirements and may not be approved to run Google Play + // services. + // "MEETS_DEVICE_INTEGRITY" - App is running on GMS Android device + // with Google Play services. + // "MEETS_STRONG_INTEGRITY" - App is running on GMS Android device + // with Google Play services and has a strong guarantee of system + // integrity such as a hardware-backed keystore. + // "MEETS_VIRTUAL_INTEGRITY" - App is running on an Android emulator + // with Google Play services which meets core Android compatibility + // requirements. + DeviceRecognitionVerdict []string `json:"deviceRecognitionVerdict,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DeviceRecognitionVerdict") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceRecognitionVerdict") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceIntegrity) MarshalJSON() ([]byte, error) { + type NoMethod DeviceIntegrity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RequestDetails: Contains the integrity request information. +type RequestDetails struct { + // Nonce: Required. Nonce that was provided in the request (which is + // base64 web-safe no-wrap). + Nonce string `json:"nonce,omitempty"` + + // RequestPackageName: Required. Application package name this + // attestation was requested for. Note: This field makes no guarantees + // or promises on the caller integrity. For details on application + // integrity, check application_integrity. + RequestPackageName string `json:"requestPackageName,omitempty"` + + // TimestampMillis: Required. Timestamp, in milliseconds, of the + // integrity application request. + TimestampMillis int64 `json:"timestampMillis,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Nonce") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Nonce") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RequestDetails) MarshalJSON() ([]byte, error) { + type NoMethod RequestDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestingDetails: Contains additional information generated for testing +// responses. +type TestingDetails struct { + // IsTestingResponse: Required. Indicates that the information contained + // in this payload is a testing response that is statically overridden + // for a tester. + IsTestingResponse bool `json:"isTestingResponse,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsTestingResponse") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IsTestingResponse") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TestingDetails) MarshalJSON() ([]byte, error) { + type NoMethod TestingDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TokenPayloadExternal: Contains basic app information and integrity +// signals like device attestation and licensing details. +type TokenPayloadExternal struct { + // AccountDetails: Required. Details about the Play Store account. + AccountDetails *AccountDetails `json:"accountDetails,omitempty"` + + // AppIntegrity: Required. Details about the application integrity. + AppIntegrity *AppIntegrity `json:"appIntegrity,omitempty"` + + // DeviceIntegrity: Required. Details about the device integrity. + DeviceIntegrity *DeviceIntegrity `json:"deviceIntegrity,omitempty"` + + // RequestDetails: Required. Details about the integrity request. + RequestDetails *RequestDetails `json:"requestDetails,omitempty"` + + // TestingDetails: Indicates that this payload is generated for testing + // purposes and contains any additional data that is linked with testing + // status. + TestingDetails *TestingDetails `json:"testingDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccountDetails") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccountDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TokenPayloadExternal) MarshalJSON() ([]byte, error) { + type NoMethod TokenPayloadExternal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "playintegrity.decodeIntegrityToken": + +type V1DecodeIntegrityTokenCall struct { + s *Service + packageName string + decodeintegritytokenrequest *DecodeIntegrityTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DecodeIntegrityToken: Decodes the integrity token and returns the +// token payload. +// +// - packageName: Package name of the app the attached integrity token +// belongs to. +func (r *V1Service) DecodeIntegrityToken(packageName string, decodeintegritytokenrequest *DecodeIntegrityTokenRequest) *V1DecodeIntegrityTokenCall { + c := &V1DecodeIntegrityTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.packageName = packageName + c.decodeintegritytokenrequest = decodeintegritytokenrequest + 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 *V1DecodeIntegrityTokenCall) Fields(s ...googleapi.Field) *V1DecodeIntegrityTokenCall { + 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 *V1DecodeIntegrityTokenCall) Context(ctx context.Context) *V1DecodeIntegrityTokenCall { + 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 *V1DecodeIntegrityTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *V1DecodeIntegrityTokenCall) 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.decodeintegritytokenrequest) + 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/{+packageName}:decodeIntegrityToken") + 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{ + "packageName": c.packageName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playintegrity.decodeIntegrityToken" call. +// Exactly one of *DecodeIntegrityTokenResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *DecodeIntegrityTokenResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *V1DecodeIntegrityTokenCall) Do(opts ...googleapi.CallOption) (*DecodeIntegrityTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DecodeIntegrityTokenResponse{ + 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": "Decodes the integrity token and returns the token payload.", + // "flatPath": "v1/{v1Id}:decodeIntegrityToken", + // "httpMethod": "POST", + // "id": "playintegrity.decodeIntegrityToken", + // "parameterOrder": [ + // "packageName" + // ], + // "parameters": { + // "packageName": { + // "description": " Package name of the app the attached integrity token belongs to.", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+packageName}:decodeIntegrityToken", + // "request": { + // "$ref": "DecodeIntegrityTokenRequest" + // }, + // "response": { + // "$ref": "DecodeIntegrityTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/playintegrity" + // ] + // } + +} diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index d832693b7a2..d7699df06a3 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -569,7 +569,7 @@ "type": "string" }, "skipGracePeriod": { - "description": "Optional. This field sets the CA to have a pending delete duration of 0.", + "description": "Optional. If this flag is set, the Certificate Authority will be deleted as soon as possible without a 30-day grace period where undeletion would have been allowed. If you proceed, there will be no way to recover this CA.", "location": "query", "type": "boolean" } @@ -1595,7 +1595,7 @@ } } }, - "revision": "20220223", + "revision": "20220309", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index 25f9cc36c17..b82118284b0 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -5613,8 +5613,11 @@ func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) RequestId(req return c } -// SkipGracePeriod sets the optional parameter "skipGracePeriod": This -// field sets the CA to have a pending delete duration of 0. +// SkipGracePeriod sets the optional parameter "skipGracePeriod": If +// this flag is set, the Certificate Authority will be deleted as soon +// as possible without a 30-day grace period where undeletion would have +// been allowed. If you proceed, there will be no way to recover this +// CA. func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) SkipGracePeriod(skipGracePeriod bool) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall { c.urlParams_.Set("skipGracePeriod", fmt.Sprint(skipGracePeriod)) return c @@ -5732,7 +5735,7 @@ func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Do(opts ...go // "type": "string" // }, // "skipGracePeriod": { - // "description": "Optional. This field sets the CA to have a pending delete duration of 0.", + // "description": "Optional. If this flag is set, the Certificate Authority will be deleted as soon as possible without a 30-day grace period where undeletion would have been allowed. If you proceed, there will be no way to recover this CA.", // "location": "query", // "type": "boolean" // } diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json index ff3fbae4c5d..95d1479bf2a 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20220221", + "revision": "20220319", "rootUrl": "https://prod-tt-sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2811,6 +2811,11 @@ "description": "Grant Id.", "type": "string" }, + "lastHeartbeatTransmitExpireTime": { + "description": "The transmit expiration time of the last heartbeat.", + "format": "google-datetime", + "type": "string" + }, "maxEirp": { "description": "Maximum Equivalent Isotropically Radiated Power (EIRP) permitted by the grant. The maximum EIRP is in units of dBm/MHz. The value of `maxEirp` represents the average (RMS) EIRP that would be measured by the procedure defined in FCC part 96.41(e)(3).", "format": "double", @@ -2925,7 +2930,7 @@ "type": "object" }, "SasPortalEmpty": { - "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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": "SasPortalEmpty", "properties": {}, "type": "object" @@ -3186,7 +3191,7 @@ "type": "object" }, "SasPortalNrqzValidation": { - "description": "Information about National Radio Quiet Zone validation. The presence of the field indicates the device has been validated.", + "description": "Information about National Radio Quiet Zone validation.", "id": "SasPortalNrqzValidation", "properties": { "caseId": { @@ -3206,6 +3211,20 @@ "description": "Device longitude associated with the validation.", "format": "double", "type": "number" + }, + "state": { + "description": "State of the NRQZ validation info.", + "enum": [ + "STATE_UNSPECIFIED", + "DRAFT", + "FINAL" + ], + "enumDescriptions": [ + "Unspecified state.", + "Draft state.", + "Final state." + ], + "type": "string" } }, "type": "object" diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go index fbfd2a2d1d0..3c628164280 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go @@ -783,6 +783,10 @@ type SasPortalDeviceGrant struct { // GrantId: Grant Id. GrantId string `json:"grantId,omitempty"` + // LastHeartbeatTransmitExpireTime: The transmit expiration time of the + // last heartbeat. + LastHeartbeatTransmitExpireTime string `json:"lastHeartbeatTransmitExpireTime,omitempty"` + // MaxEirp: Maximum Equivalent Isotropically Radiated Power (EIRP) // permitted by the grant. The maximum EIRP is in units of dBm/MHz. The // value of `maxEirp` represents the average (RMS) EIRP that would be @@ -970,8 +974,7 @@ func (s *SasPortalDpaMoveList) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type SasPortalEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1501,8 +1504,7 @@ func (s *SasPortalNode) MarshalJSON() ([]byte, error) { } // SasPortalNrqzValidation: Information about National Radio Quiet Zone -// validation. The presence of the field indicates the device has been -// validated. +// validation. type SasPortalNrqzValidation struct { // CaseId: Validation case id. CaseId string `json:"caseId,omitempty"` @@ -1516,6 +1518,14 @@ type SasPortalNrqzValidation struct { // Longitude: Device longitude associated with the validation. Longitude float64 `json:"longitude,omitempty"` + // State: State of the NRQZ validation info. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "DRAFT" - Draft state. + // "FINAL" - Final state. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index 42a54317c99..309e6b3ba18 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -1424,7 +1424,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1504,7 +1504,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index 950df4d0b61..e4b56536d8d 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -431,8 +431,7 @@ type DetachSubscriptionResponse struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/pubsub/v1beta2/pubsub-api.json b/pubsub/v1beta2/pubsub-api.json index 36166361e71..f54201c6f02 100644 --- a/pubsub/v1beta2/pubsub-api.json +++ b/pubsub/v1beta2/pubsub-api.json @@ -724,7 +724,7 @@ } } }, - "revision": "20211108", + "revision": "20220322", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -764,7 +764,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/pubsub/v1beta2/pubsub-gen.go b/pubsub/v1beta2/pubsub-gen.go index 6f18fa5d0b1..7083ae366ba 100644 --- a/pubsub/v1beta2/pubsub-gen.go +++ b/pubsub/v1beta2/pubsub-gen.go @@ -299,8 +299,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/pubsublite/v1/pubsublite-api.json b/pubsublite/v1/pubsublite-api.json index 61320bc4ba7..6bb85efb998 100644 --- a/pubsublite/v1/pubsublite-api.json +++ b/pubsublite/v1/pubsublite-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20210909", + "revision": "20220318", "rootUrl": "https://pubsublite.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -1219,7 +1219,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/pubsublite/v1/pubsublite-gen.go b/pubsublite/v1/pubsublite-gen.go index f0b78bde71e..91ca9d22947 100644 --- a/pubsublite/v1/pubsublite-gen.go +++ b/pubsublite/v1/pubsublite-gen.go @@ -723,8 +723,7 @@ func (s *DeliveryConfig) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/realtimebidding/v1/realtimebidding-api.json b/realtimebidding/v1/realtimebidding-api.json index 84b9d257ec9..9fa237c5a67 100644 --- a/realtimebidding/v1/realtimebidding-api.json +++ b/realtimebidding/v1/realtimebidding-api.json @@ -1174,7 +1174,7 @@ } } }, - "revision": "20220301", + "revision": "20220322", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -2056,7 +2056,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/realtimebidding/v1/realtimebidding-gen.go b/realtimebidding/v1/realtimebidding-gen.go index 067fcc1521f..73dc68b9421 100644 --- a/realtimebidding/v1/realtimebidding-gen.go +++ b/realtimebidding/v1/realtimebidding-gen.go @@ -1373,8 +1373,7 @@ func (s *DownloadSizeEvidence) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index fce4d0bfb9e..c7f58b44cf6 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -489,7 +489,7 @@ } } }, - "revision": "20220129", + "revision": "20220319", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1144,7 +1144,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index a45a5bdd51f..41df774aadf 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -1304,8 +1304,7 @@ func (s *GoogleCloudRecaptchaenterpriseV1WebKeySettings) MarshalJSON() ([]byte, // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index f8b4719962d..7bdb8b781f5 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -646,6 +646,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.organizations.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.organizations.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -748,6 +814,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.organizations.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.organizations.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -914,6 +1046,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.projects.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.projects.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -1016,6 +1214,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.projects.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.projects.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -1178,7 +1442,7 @@ } } }, - "revision": "20220124", + "revision": "20220321", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -1366,6 +1630,61 @@ }, "type": "object" }, + "GoogleCloudRecommenderV1InsightTypeConfig": { + "description": "Configuration for an InsightType.", + "id": "GoogleCloudRecommenderV1InsightTypeConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", + "type": "object" + }, + "displayName": { + "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", + "type": "string" + }, + "etag": { + "description": "Fingerprint of the InsightTypeConfig. Provides optimistic locking when updating.", + "type": "string" + }, + "insightTypeGenerationConfig": { + "$ref": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", + "description": "InsightTypeGenerationConfig which configures the generation of insights for this insight type." + }, + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "type": "string" + }, + "revisionId": { + "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Last time when the config was updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRecommenderV1InsightTypeGenerationConfig": { + "description": "A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.", + "id": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", + "properties": { + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Parameters for this InsightTypeGenerationConfig. These configs can be used by or are applied to all subtypes.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudRecommenderV1ListInsightsResponse": { "description": "Response to the `ListInsights` method.", "id": "GoogleCloudRecommenderV1ListInsightsResponse", @@ -1684,6 +2003,61 @@ }, "type": "object" }, + "GoogleCloudRecommenderV1RecommenderConfig": { + "description": "Configuration for a Recommender.", + "id": "GoogleCloudRecommenderV1RecommenderConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", + "type": "object" + }, + "displayName": { + "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", + "type": "string" + }, + "etag": { + "description": "Fingerprint of the RecommenderConfig. Provides optimistic locking when updating.", + "type": "string" + }, + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "type": "string" + }, + "recommenderGenerationConfig": { + "$ref": "GoogleCloudRecommenderV1RecommenderGenerationConfig", + "description": "RecommenderGenerationConfig which configures the Generation of recommendations for this recommender." + }, + "revisionId": { + "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Last time when the config was updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRecommenderV1RecommenderGenerationConfig": { + "description": "A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.", + "id": "GoogleCloudRecommenderV1RecommenderGenerationConfig", + "properties": { + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Parameters for this RecommenderGenerationConfig. These configs can be used by or are applied to all subtypes.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudRecommenderV1SecurityProjection": { "description": "Contains various ways of describing the impact on Security.", "id": "GoogleCloudRecommenderV1SecurityProjection", diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index 0e0dc282a21..e8fc30310d7 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -674,6 +674,101 @@ func (s *GoogleCloudRecommenderV1InsightStateInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRecommenderV1InsightTypeConfig: Configuration for an +// InsightType. +type GoogleCloudRecommenderV1InsightTypeConfig struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + // Annotations must follow the Kubernetes syntax. The total size of all + // keys and values combined is limited to 256k. Key can have 2 segments: + // prefix (optional) and name (required), separated by a slash (/). + // Prefix must be a DNS subdomain. Name must be 63 characters or less, + // begin and end with alphanumerics, with dashes (-), underscores (_), + // dots (.), and alphanumerics between. + Annotations map[string]string `json:"annotations,omitempty"` + + // DisplayName: A user-settable field to provide a human-readable name + // to be used in user interfaces. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Fingerprint of the InsightTypeConfig. Provides optimistic + // locking when updating. + Etag string `json:"etag,omitempty"` + + // InsightTypeGenerationConfig: InsightTypeGenerationConfig which + // configures the generation of insights for this insight type. + InsightTypeGenerationConfig *GoogleCloudRecommenderV1InsightTypeGenerationConfig `json:"insightTypeGenerationConfig,omitempty"` + + // Name: Name of insight type config. Eg, + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_T + // YPE_ID]/config + Name string `json:"name,omitempty"` + + // RevisionId: Output only. Immutable. The revision ID of the config. A + // new revision is committed whenever the config is changed in any way. + // The format is an 8-character hexadecimal string. + RevisionId string `json:"revisionId,omitempty"` + + // UpdateTime: Last time when the config 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. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1InsightTypeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1InsightTypeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRecommenderV1InsightTypeGenerationConfig: A configuration +// to customize the generation of insights. Eg, customizing the lookback +// period considered when generating a insight. +type GoogleCloudRecommenderV1InsightTypeGenerationConfig struct { + // Params: Parameters for this InsightTypeGenerationConfig. These + // configs can be used by or are applied to all subtypes. + Params googleapi.RawMessage `json:"params,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Params") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Params") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1InsightTypeGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1InsightTypeGenerationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecommenderV1ListInsightsResponse: Response to the // `ListInsights` method. type GoogleCloudRecommenderV1ListInsightsResponse struct { @@ -1226,6 +1321,101 @@ func (s *GoogleCloudRecommenderV1RecommendationStateInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRecommenderV1RecommenderConfig: Configuration for a +// Recommender. +type GoogleCloudRecommenderV1RecommenderConfig struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + // Annotations must follow the Kubernetes syntax. The total size of all + // keys and values combined is limited to 256k. Key can have 2 segments: + // prefix (optional) and name (required), separated by a slash (/). + // Prefix must be a DNS subdomain. Name must be 63 characters or less, + // begin and end with alphanumerics, with dashes (-), underscores (_), + // dots (.), and alphanumerics between. + Annotations map[string]string `json:"annotations,omitempty"` + + // DisplayName: A user-settable field to provide a human-readable name + // to be used in user interfaces. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Fingerprint of the RecommenderConfig. Provides optimistic + // locking when updating. + Etag string `json:"etag,omitempty"` + + // Name: Name of recommender config. Eg, + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMEND + // ER_ID]/config + Name string `json:"name,omitempty"` + + // RecommenderGenerationConfig: RecommenderGenerationConfig which + // configures the Generation of recommendations for this recommender. + RecommenderGenerationConfig *GoogleCloudRecommenderV1RecommenderGenerationConfig `json:"recommenderGenerationConfig,omitempty"` + + // RevisionId: Output only. Immutable. The revision ID of the config. A + // new revision is committed whenever the config is changed in any way. + // The format is an 8-character hexadecimal string. + RevisionId string `json:"revisionId,omitempty"` + + // UpdateTime: Last time when the config 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. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1RecommenderConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1RecommenderConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRecommenderV1RecommenderGenerationConfig: A Configuration +// to customize the generation of recommendations. Eg, customizing the +// lookback period considered when generating a recommendation. +type GoogleCloudRecommenderV1RecommenderGenerationConfig struct { + // Params: Parameters for this RecommenderGenerationConfig. These + // configs can be used by or are applied to all subtypes. + Params googleapi.RawMessage `json:"params,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Params") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Params") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1RecommenderGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1RecommenderGenerationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecommenderV1SecurityProjection: Contains various ways of // describing the impact on Security. type GoogleCloudRecommenderV1SecurityProjection struct { @@ -4044,9 +4234,9 @@ func (c *FoldersLocationsRecommendersRecommendationsMarkSucceededCall) Do(opts . } -// method id "recommender.organizations.locations.insightTypes.insights.get": +// method id "recommender.organizations.locations.insightTypes.getConfig": -type OrganizationsLocationsInsightTypesInsightsGetCall struct { +type OrganizationsLocationsInsightTypesGetConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4055,12 +4245,18 @@ type OrganizationsLocationsInsightTypesInsightsGetCall struct { header_ http.Header } -// Get: Gets the requested insight. Requires the recommender.*.get IAM -// permission for the specified insight type. +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. // -// - name: Name of the insight. -func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { - c := &OrganizationsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// PE_ID]/config` * +// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I +// D]/config` * +// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI +// GHT_TYPE_ID]/config`. +func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *OrganizationsLocationsInsightTypesGetConfigCall { + c := &OrganizationsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4068,7 +4264,7 @@ func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *Or // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4078,7 +4274,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleap // 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 *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -4086,21 +4282,21 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTa // 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesGetConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) 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_ { @@ -4126,14 +4322,16 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.organizations.locations.insightTypes.insights.get" call. -// Exactly one of *GoogleCloudRecommenderV1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { +// Do executes the "recommender.organizations.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4152,7 +4350,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1Insight{ + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4164,25 +4362,25 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.get", + // "id": "recommender.organizations.locations.insightTypes.getConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the insight.", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4191,144 +4389,108 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi } -// method id "recommender.organizations.locations.insightTypes.insights.list": +// method id "recommender.organizations.locations.insightTypes.updateConfig": -type OrganizationsLocationsInsightTypesInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists insights for the specified Cloud Resource. Requires the -// recommender.*.list IAM permission for the specified insight type. +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. // -// - parent: The container resource on which to execute the request. -// Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH -// T_TYPE_ID]` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY -// PE_ID]` * -// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy -// pes/[INSIGHT_TYPE_ID]` * -// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE -// _ID]` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ -// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: -// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to -// supported insight types: -// https://cloud.google.com/recommender/docs/insights/insight-types. -func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { - c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * -// `stateInfo.state` * `insightSubtype` * `severity` Examples: * -// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * -// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR -// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL -// OR severity = HIGH)` (These expressions are based on the filter -// language described at https://google.aip.dev/160) -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("filter", filter) +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *OrganizationsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *OrganizationsLocationsInsightTypesUpdateConfigCall { + c := &OrganizationsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return from this request. Non-positive values are -// ignored. If not specified, the server will determine the number of -// results to return. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// PageToken sets the optional parameter "pageToken": If present, -// retrieves the next batch of results from the preceding call to this -// method. `page_token` must be the value of `next_page_token` from the -// previous response. The values of other method parameters must be -// identical to those in the previous call. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsInsightTypesUpdateConfigCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesUpdateConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { - 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 *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesUpdateConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) 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.googlecloudrecommenderv1insighttypeconfig) + 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}/insights") + 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 "recommender.organizations.locations.insightTypes.insights.list" call. -// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// Do executes the "recommender.organizations.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4347,7 +4509,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4359,41 +4521,39 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap } return ret, nil // { - // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", - // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.list", + // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.organizations.locations.insightTypes.updateConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", - // "location": "query", + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", - // "required": true, - // "type": "string" + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+parent}/insights", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4402,9 +4562,367 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap } -// 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. +// method id "recommender.organizations.locations.insightTypes.insights.get": + +type OrganizationsLocationsInsightTypesInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the requested insight. Requires the recommender.*.get IAM +// permission for the specified insight type. +// +// - name: Name of the insight. +func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { + c := &OrganizationsLocationsInsightTypesInsightsGetCall{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 *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) 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 "recommender.organizations.locations.insightTypes.insights.get" call. +// Exactly one of *GoogleCloudRecommenderV1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1Insight{ + 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 requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.insightTypes.insights.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the insight.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.insightTypes.insights.list": + +type OrganizationsLocationsInsightTypesInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. +// +// - parent: The container resource on which to execute the request. +// Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]` * +// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE +// _ID]` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to +// supported insight types: +// https://cloud.google.com/recommender/docs/insights/insight-types. +func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { + c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * +// `stateInfo.state` * `insightSubtype` * `severity` Examples: * +// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * +// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR +// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL +// OR severity = HIGH)` (These expressions are based on the filter +// language described at https://google.aip.dev/160) +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return from this request. Non-positive values are +// ignored. If not specified, the server will determine the number of +// results to return. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, +// retrieves the next batch of results from the preceding call to this +// method. `page_token` must be the value of `next_page_token` from the +// previous response. The values of other method parameters must be +// identical to those in the previous call. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsInsightTypesInsightsListCall) 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}/insights") + 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 "recommender.organizations.locations.insightTypes.insights.list" call. +// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + 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 insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.insightTypes.insights.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/insights", + // "response": { + // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // }, + // "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 *OrganizationsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1ListInsightsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point @@ -4556,12 +5074,341 @@ func (c *OrganizationsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ... // "type": "string" // } // }, - // "path": "v1/{+name}:markAccepted", + // "path": "v1/{+name}:markAccepted", + // "request": { + // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.recommenders.getConfig": + +type OrganizationsLocationsRecommendersGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. +// +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config`. +func (r *OrganizationsLocationsRecommendersService) GetConfig(name string) *OrganizationsLocationsRecommendersGetConfigCall { + c := &OrganizationsLocationsRecommendersGetConfigCall{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 *OrganizationsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsRecommendersGetConfigCall) 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 "recommender.organizations.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.recommenders.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.recommenders.updateConfig": + +type OrganizationsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. +// +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *OrganizationsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *OrganizationsLocationsRecommendersUpdateConfigCall { + c := &OrganizationsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsRecommendersUpdateConfigCall { + 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersUpdateConfigCall { + 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersUpdateConfigCall { + 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) 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.googlecloudrecommenderv1recommenderconfig) + 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 "recommender.organizations.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.organizations.locations.recommenders.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5387,12 +6234,340 @@ func (c *OrganizationsLocationsRecommendersRecommendationsMarkSucceededCall) Do( // "type": "string" // } // }, - // "path": "v1/{+name}:markSucceeded", + // "path": "v1/{+name}:markSucceeded", + // "request": { + // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1Recommendation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.insightTypes.getConfig": + +type ProjectsLocationsInsightTypesGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. +// +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// PE_ID]/config` * +// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I +// D]/config` * +// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI +// GHT_TYPE_ID]/config`. +func (r *ProjectsLocationsInsightTypesService) GetConfig(name string) *ProjectsLocationsInsightTypesGetConfigCall { + c := &ProjectsLocationsInsightTypesGetConfigCall{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 *ProjectsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightTypesGetConfigCall) 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 "recommender.projects.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + 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 requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "GET", + // "id": "recommender.projects.locations.insightTypes.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.insightTypes.updateConfig": + +type ProjectsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. +// +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *ProjectsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *ProjectsLocationsInsightTypesUpdateConfigCall { + c := &ProjectsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightTypesUpdateConfigCall { + 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesUpdateConfigCall { + 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesUpdateConfigCall { + 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) 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.googlecloudrecommenderv1insighttypeconfig) + 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 "recommender.projects.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + 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 InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.projects.locations.insightTypes.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1Recommendation" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5927,6 +7102,335 @@ func (c *ProjectsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googl } +// method id "recommender.projects.locations.recommenders.getConfig": + +type ProjectsLocationsRecommendersGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. +// +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config`. +func (r *ProjectsLocationsRecommendersService) GetConfig(name string) *ProjectsLocationsRecommendersGetConfigCall { + c := &ProjectsLocationsRecommendersGetConfigCall{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 *ProjectsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRecommendersGetConfigCall) 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 "recommender.projects.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "GET", + // "id": "recommender.projects.locations.recommenders.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.recommenders.updateConfig": + +type ProjectsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. +// +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *ProjectsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *ProjectsLocationsRecommendersUpdateConfigCall { + c := &ProjectsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRecommendersUpdateConfigCall { + 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 *ProjectsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersUpdateConfigCall { + 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 *ProjectsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersUpdateConfigCall { + 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 *ProjectsLocationsRecommendersUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRecommendersUpdateConfigCall) 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.googlecloudrecommenderv1recommenderconfig) + 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 "recommender.projects.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.projects.locations.recommenders.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "recommender.projects.locations.recommenders.recommendations.get": type ProjectsLocationsRecommendersRecommendationsGetCall struct { diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 7452ece617d..376d59a35ae 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -155,7 +155,7 @@ "type": "string" }, "visitorId": { - "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "query", "type": "string" } @@ -614,7 +614,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -725,7 +725,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -753,7 +753,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -773,6 +773,66 @@ } } }, + "servingConfigs": { + "methods": { + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2PredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2PredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2SearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2SearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "userEvents": { "methods": { "collect": { @@ -873,7 +933,7 @@ ] }, "rejoin": { - "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.rejoin", @@ -1077,7 +1137,7 @@ } } }, - "revision": "20220303", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1295,7 +1355,7 @@ "id": "GoogleCloudRetailV2BigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -1366,7 +1426,7 @@ "id": "GoogleCloudRetailV2CompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -1394,7 +1454,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2CustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -1533,7 +1593,7 @@ "type": "object" }, "GoogleCloudRetailV2Image": { - "description": "Product thumbnail/detail image.", + "description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", "id": "GoogleCloudRetailV2Image", "properties": { "height": { @@ -1612,7 +1672,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -1659,7 +1719,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -1793,7 +1853,7 @@ "id": "GoogleCloudRetailV2PredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices.", "type": "string" }, "labels": { @@ -2033,7 +2093,7 @@ "type": "string" }, "images": { - "description": "Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", + "description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", "items": { "$ref": "GoogleCloudRetailV2Image" }, @@ -2398,7 +2458,7 @@ "type": "string" }, "canonicalFilter": { - "description": "The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", "type": "string" }, "dynamicFacetSpec": { @@ -2877,7 +2937,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2CustomAttribute" }, - "description": "Extra user event features to include in the recommendation model. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.", + "description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", "type": "object" }, "attributionToken": { @@ -3175,7 +3235,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -3237,6 +3297,52 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaPurgeProductsMetadata": { + "description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" + }, + "GoogleCloudRetailV2alphaPurgeProductsResponse": { + "description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsResponse", + "properties": { + "purgeCount": { + "description": "The total count of products purged as a result of the operation.", + "format": "int64", + "type": "string" + }, + "purgeSample": { + "description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaPurgeUserEventsResponse": { "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", "id": "GoogleCloudRetailV2alphaPurgeUserEventsResponse", @@ -3440,7 +3546,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -3627,7 +3733,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index f253e113926..9cdb7ad9a7a 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -173,6 +173,7 @@ func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsS rs.CompletionData = NewProjectsLocationsCatalogsCompletionDataService(s) rs.Operations = NewProjectsLocationsCatalogsOperationsService(s) rs.Placements = NewProjectsLocationsCatalogsPlacementsService(s) + rs.ServingConfigs = NewProjectsLocationsCatalogsServingConfigsService(s) rs.UserEvents = NewProjectsLocationsCatalogsUserEventsService(s) return rs } @@ -188,6 +189,8 @@ type ProjectsLocationsCatalogsService struct { Placements *ProjectsLocationsCatalogsPlacementsService + ServingConfigs *ProjectsLocationsCatalogsServingConfigsService + UserEvents *ProjectsLocationsCatalogsUserEventsService } @@ -251,6 +254,15 @@ type ProjectsLocationsCatalogsPlacementsService struct { s *Service } +func NewProjectsLocationsCatalogsServingConfigsService(s *Service) *ProjectsLocationsCatalogsServingConfigsService { + rs := &ProjectsLocationsCatalogsServingConfigsService{s: s} + return rs +} + +type ProjectsLocationsCatalogsServingConfigsService struct { + s *Service +} + func NewProjectsLocationsCatalogsUserEventsService(s *Service) *ProjectsLocationsCatalogsUserEventsService { rs := &ProjectsLocationsCatalogsUserEventsService{s: s} return rs @@ -705,7 +717,11 @@ type GoogleCloudRetailV2BigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -848,8 +864,9 @@ func (s *GoogleCloudRetailV2ColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2CompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -900,7 +917,10 @@ func (s *GoogleCloudRetailV2CompleteQueryResponse) MarshalJSON() ([]byte, error) // GoogleCloudRetailV2CompleteQueryResponseCompletionResult: Resource // that represents completion results. type GoogleCloudRetailV2CompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -1224,7 +1244,10 @@ func (s *GoogleCloudRetailV2GetDefaultBranchResponse) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2Image: Product thumbnail/detail image. +// GoogleCloudRetailV2Image: Product image. Recommendations AI and +// Retail Search do not use product images to improve prediction and +// search results. However, product images can be returned in results, +// and are shown in prediction or search previews in the console. type GoogleCloudRetailV2Image struct { // Height: Height of the image in number of pixels. This field must be // nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. @@ -1383,8 +1406,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1455,12 +1477,7 @@ type GoogleCloudRetailV2ImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -1751,9 +1768,11 @@ type GoogleCloudRetailV2PredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // nothing will be returned. If you want generic (unfiltered) popular - // products to be returned instead, set `strictFiltering` to false in - // `PredictRequest.params`. + // the API will return generic (unfiltered) popular products. If you + // only want results strictly matching the filters, set + // `strictFiltering` to True in `PredictRequest.params` to receive empty + // results instead. Note that the API will never return items with + // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -2197,8 +2216,8 @@ type GoogleCloudRetailV2Product struct { // Schema.org property Product.sku (https://schema.org/sku). Id string `json:"id,omitempty"` - // Images: Product images for the product.Highly recommended to put the - // main image to the first. A maximum of 300 images are allowed. + // Images: Product images for the product. We highly recommend putting + // the main image first. A maximum of 300 images are allowed. // Corresponding properties: Google Merchant Center property image_link // (https://support.google.com/merchants/answer/6324350). Schema.org // property Product.image (https://schema.org/image). @@ -2966,9 +2985,11 @@ type GoogleCloudRetailV2SearchRequest struct { // search products under the default branch. Branch string `json:"branch,omitempty"` - // CanonicalFilter: The filter applied to every search request when - // quality improvement such as query expansion is needed. For example, - // if a query does not have enough results, an expanded query with + // CanonicalFilter: The default filter that is applied when a user + // performs a search without checking any filters on the search page. + // The filter applied to every search request when quality improvement + // such as query expansion is needed. For example, if a query does not + // have enough results, an expanded query with // SearchRequest.canonical_filter will be returned as a supplement of // the original query. This field is strongly recommended to achieve // high search quality. See SearchRequest.filter for more details about @@ -3903,16 +3924,23 @@ type GoogleCloudRetailV2SetInventoryResponse struct { // with customers' website. type GoogleCloudRetailV2UserEvent struct { // Attributes: Extra user event features to include in the - // recommendation model. This field needs to pass all below criteria, - // otherwise an INVALID_ARGUMENT error is returned: * The key must be a - // UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendation, an example of extra user - // information is traffic_channel, i.e. how user arrives at the site. - // Users can arrive at the site by coming to the site directly, or - // coming through Google search, and etc. + // recommendation model. If you provide custom attributes for ingested + // user events, also include them in the user events that you associate + // with prediction requests. Custom attribute formatting must be + // consistent between imported events and events provided with + // prediction requests. This lets the Retail API use those custom + // attributes when training models and serving predictions, which helps + // improve recommendation quality. This field needs to pass all below + // criteria, otherwise an INVALID_ARGUMENT error is returned: * The key + // must be a UTF-8 encoded string with a length limit of 5,000 + // characters. * For text attributes, at most 400 values are allowed. + // Empty values are not allowed. Each value must be a UTF-8 encoded + // string with a length limit of 256 characters. * For number + // attributes, at most 400 values are allowed. For product + // recommendations, an example of extra user information is + // traffic_channel, which is how a user arrives at the site. Users can + // arrive at the site by coming to the site directly, coming through + // Google search, or in other ways. Attributes map[string]GoogleCloudRetailV2CustomAttribute `json:"attributes,omitempty"` // AttributionToken: Highly recommended for user events that are the @@ -4504,8 +4532,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -4621,6 +4648,84 @@ func (s *GoogleCloudRetailV2alphaImportUserEventsResponse) MarshalJSON() ([]byte type GoogleCloudRetailV2alphaPurgeMetadata struct { } +// GoogleCloudRetailV2alphaPurgeProductsMetadata: Metadata related to +// the progress of the PurgeProducts operation. This will be returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2alphaPurgeProductsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // 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 *GoogleCloudRetailV2alphaPurgeProductsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaPurgeProductsResponse: Response of the +// PurgeProductsRequest. If the long running operation is successfully +// done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudRetailV2alphaPurgeProductsResponse struct { + // PurgeCount: The total count of products purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // PurgeSample: A sample of the product names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaPurgeProductsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaPurgeUserEventsResponse: Response of the // PurgeUserEventsRequest. If the long running operation is successfully // done, then this message is returned by the @@ -5002,8 +5107,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -5354,8 +5458,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -5534,8 +5637,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Query(query string) *Projec return c } -// VisitorId sets the optional parameter "visitorId": A unique -// identifier for tracking visitors. For example, this could be +// VisitorId sets the optional parameter "visitorId": Required field. A +// unique identifier for tracking visitors. For example, this could be // implemented with an HTTP cookie, which should be able to uniquely // identify a visitor on a single device. This unique identifier should // not change if the visitor logs in or out of the website. The field @@ -5690,7 +5793,7 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "visitorId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // } @@ -8034,10 +8137,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -8139,7 +8245,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -8546,7 +8652,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -8660,7 +8768,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -8700,7 +8808,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -8811,7 +8921,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -8853,6 +8963,332 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Pages(ctx context.Contex } } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2predictrequest *GoogleCloudRetailV2PredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2predictrequest = googlecloudretailv2predictrequest + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) 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.googlecloudretailv2predictrequest) + 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, "v2/{+placement}:predict") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2PredictResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2PredictResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2PredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2PredictResponse{ + 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": "Makes a recommendation prediction.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2PredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2PredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2searchrequest *GoogleCloudRetailV2SearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2searchrequest = googlecloudretailv2searchrequest + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) 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.googlecloudretailv2searchrequest) + 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, "v2/{+placement}:search") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2SearchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRetailV2SearchResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2SearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2SearchResponse{ + 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": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2SearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2SearchResponse" + // }, + // "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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2searchrequest.PageToken = pt }(c.googlecloudretailv2searchrequest.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.googlecloudretailv2searchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { @@ -9348,14 +9784,15 @@ type ProjectsLocationsCatalogsUserEventsRejoinCall struct { header_ http.Header } -// Rejoin: Triggers a user event rejoin operation with latest product +// Rejoin: Starts a user event rejoin operation with latest product // catalog. Events will not be annotated with detailed product // information if product is missing from the catalog at the time the // user event is ingested, and these events are stored as unjoined -// events with a limited usage on training and serving. This API can be -// used to trigger a 'join' operation on specified events with latest +// events with a limited usage on training and serving. This method can +// be used to start a join operation on specified events with latest // version of product catalog. It can also be used to correct events -// joined with wrong product catalog. +// joined with the wrong product catalog. A rejoin operation can take +// hours or days to complete. // // - parent: The parent catalog resource name, such as // `projects/1234/locations/global/catalogs/default_catalog`. @@ -9457,7 +9894,7 @@ func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + // "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.userEvents.rejoin", diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index adc3f69be22..27222d3fd57 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -155,7 +155,7 @@ "type": "string" }, "visitorId": { - "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "query", "type": "string" } @@ -193,6 +193,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCompletionConfig": { + "description": "Gets a CompletionConfig.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDefaultBranch": { "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", @@ -349,6 +374,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCompletionConfig": { + "description": "Updates the CompletionConfigs.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -731,6 +790,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "purge": { + "description": "Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by GetProduct or ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:purge", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.branches.products.purge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the branch under which the products are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/products:purge", + "request": { + "$ref": "GoogleCloudRetailV2alphaPurgeProductsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeFulfillmentPlaces": { "description": "Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", @@ -822,7 +909,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -1095,7 +1182,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1123,7 +1210,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1326,6 +1413,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2alphaPredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeControl": { "description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", @@ -1353,6 +1468,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2alphaSearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2alphaSearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1456,7 +1599,7 @@ ] }, "rejoin": { - "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.rejoin", @@ -1660,7 +1803,7 @@ } } }, - "revision": "20220303", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1869,7 +2012,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2116,7 +2259,7 @@ ], "enumDescriptions": [ "Value used when unset. Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", - "At this level, we honor the attribute configurations set in Product.attribtues.", + "At this level, we honor the attribute configurations set in Product.attributes.", "At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." ], "readOnly": true, @@ -2162,7 +2305,7 @@ "id": "GoogleCloudRetailV2alphaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2310,7 +2453,7 @@ "id": "GoogleCloudRetailV2alphaCompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -2338,7 +2481,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2alphaCustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -2359,6 +2502,65 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCompletionConfig": { + "description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", + "id": "GoogleCloudRetailV2alphaCompletionConfig", + "properties": { + "allowlistInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.", + "readOnly": true + }, + "autoLearning": { + "description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", + "type": "boolean" + }, + "denylistInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.", + "readOnly": true + }, + "lastAllowlistImportOperation": { + "description": "Output only. LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastDenylistImportOperation": { + "description": "Output only. LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastSuggestionsImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "matchingOrder": { + "description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", + "type": "string" + }, + "maxSuggestions": { + "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "minPrefixLength": { + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "type": "string" + }, + "suggestionsInputConfig": { + "$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaCompletionDataInputConfig": { "description": "The input config source for completion data.", "id": "GoogleCloudRetailV2alphaCompletionDataInputConfig", @@ -2471,6 +2673,23 @@ "$ref": "GoogleCloudRetailV2alphaRule", "description": "A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost \"gShoe\" when query full matches \"Running Shoes\"." }, + "searchSolutionUseCase": { + "description": "Required. Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.", + "items": { + "enum": [ + "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", + "SEARCH_SOLUTION_USE_CASE_SEARCH", + "SEARCH_SOLUTION_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "The value when it's unspecified. Defaults to SEARCH.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + }, "solutionTypes": { "description": "Required. Immutable. The solution types that the serving config is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.", "items": { @@ -2642,7 +2861,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaImage": { - "description": "Product thumbnail/detail image.", + "description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", "id": "GoogleCloudRetailV2alphaImage", "properties": { "height": { @@ -2721,7 +2940,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2768,7 +2987,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -2946,7 +3165,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2alphaCustomAttribute" }, - "description": "Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * The max number of values per attribute is 10. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.", + "description": "Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.", "type": "object" }, "placeId": { @@ -3010,7 +3229,7 @@ "id": "GoogleCloudRetailV2alphaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices.", "type": "string" }, "labels": { @@ -3250,7 +3469,7 @@ "type": "string" }, "images": { - "description": "Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", + "description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", "items": { "$ref": "GoogleCloudRetailV2alphaImage" }, @@ -3472,6 +3691,67 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaPurgeProductsMetadata": { + "description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" + }, + "GoogleCloudRetailV2alphaPurgeProductsRequest": { + "description": "Request message for PurgeProducts method.", + "id": "GoogleCloudRetailV2alphaPurgeProductsRequest", + "properties": { + "filter": { + "description": "Required. The filter string to specify the products to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. \"*\" implies delete all items in a branch. The eligible fields for filtering are: * `availability`: Double quoted Product.availability string. * `create_time` : in ISO 8601 \"zulu\" format. Supported syntax: * Comparators (\"\u003e\", \"\u003c\", \"\u003e=\", \"\u003c=\", \"=\"). Examples: * create_time \u003c= \"2015-02-13T17:05:46Z\" * availability = \"IN_STOCK” * Conjunctions (\"AND\") Examples: * create_time \u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\" * Disjunctions (\"OR\") Examples: * create_time \u003c= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\" * Can support nested queries. Examples: * (create_time \u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time \u003e= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\") * Filter Limits: * Filter should not contain more than 6 conditions. * Max nesting depth should not exceed 2 levels. Examples queries: * Delete back order products created before a timestamp. create_time \u003c= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER”", + "type": "string" + }, + "force": { + "description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any products.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaPurgeProductsResponse": { + "description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsResponse", + "properties": { + "purgeCount": { + "description": "The total count of products purged as a result of the operation.", + "format": "int64", + "type": "string" + }, + "purgeSample": { + "description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaPurgeUserEventsRequest": { "description": "Request message for PurgeUserEvents method.", "id": "GoogleCloudRetailV2alphaPurgeUserEventsRequest", @@ -3875,7 +4155,7 @@ "type": "string" }, "canonicalFilter": { - "description": "The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", "type": "string" }, "dynamicFacetSpec": { @@ -4487,7 +4767,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2alphaCustomAttribute" }, - "description": "Extra user event features to include in the recommendation model. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.", + "description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", "type": "object" }, "attributionToken": { @@ -4773,7 +5053,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -4960,7 +5240,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index bf87ec2f2a8..09ecb702569 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -702,8 +702,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1159,7 +1158,7 @@ type GoogleCloudRetailV2alphaAttributesConfig struct { // "ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED" - Value used when unset. // Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG. // "PRODUCT_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the - // attribute configurations set in Product.attribtues. + // attribute configurations set in Product.attributes. // "CATALOG_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the // attribute configurations set in CatalogConfig.attribute_configs. AttributeConfigLevel string `json:"attributeConfigLevel,omitempty"` @@ -1271,7 +1270,11 @@ type GoogleCloudRetailV2alphaBigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -1519,8 +1522,9 @@ func (s *GoogleCloudRetailV2alphaColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2alphaCompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -1571,7 +1575,10 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponse) MarshalJSON() ([]byte, e // GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult: // Resource that represents completion results. type GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2alphaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -1629,6 +1636,98 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCompletionConfig: Catalog level autocomplete +// config for customers to customize autocomplete feature's settings. +type GoogleCloudRetailV2alphaCompletionConfig struct { + // AllowlistInputConfig: Output only. The input config for the import of + // the source data that contains the autocomplete allowlist phrases + // uploaded by the customer. + AllowlistInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"allowlistInputConfig,omitempty"` + + // AutoLearning: If set to true, the auto learning function is enabled. + // Auto learning uses user data to generate suggestions using ML + // techniques. Default value is false. Only after enabling auto learning + // can users use `cloud-retail` data in CompleteQueryRequest. + AutoLearning bool `json:"autoLearning,omitempty"` + + // DenylistInputConfig: Output only. The input config for the import of + // the source data that contains the / autocomplete denylist phrases + // uploaded by the customer. + DenylistInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"denylistInputConfig,omitempty"` + + // LastAllowlistImportOperation: Output only. LRO corresponding to the + // latest allowlist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"` + + // LastDenylistImportOperation: Output only. LRO corresponding to the + // latest denylist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"` + + // LastSuggestionsImportOperation: Output only. Name of the LRO + // corresponding to the latest suggestion terms list import. Can use + // GetOperation API to retrieve the latest state of the Long Running + // Operation. + LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"` + + // MatchingOrder: Specifies the matching order for autocomplete + // suggestions, e.g., a query consisting of 'sh' with 'out-of-order' + // specified would suggest "women's shoes", whereas a query of 'red s' + // with 'exact-prefix' specified would suggest "red shoes". Currently + // supported values: * 'out-of-order' * 'exact-prefix' Default value: + // 'exact-prefix'. + MatchingOrder string `json:"matchingOrder,omitempty"` + + // MaxSuggestions: The maximum number of autocomplete suggestions + // returned per term. The maximum allowed max suggestions is 20. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + MaxSuggestions int64 `json:"maxSuggestions,omitempty"` + + // MinPrefixLength: The minimum number of characters needed to be typed + // in order to get suggestions. Default value is 2. If left unset or set + // to 0, then will fallback to default value. + MinPrefixLength int64 `json:"minPrefixLength,omitempty"` + + // Name: Required. Immutable. Fully qualified name + // projects/*/locations/*/catalogs/*/completionConfig + Name string `json:"name,omitempty"` + + // SuggestionsInputConfig: Output only. The input config for the import + // of the source data that contains the autocomplete phrases uploaded by + // the customer. + SuggestionsInputConfig *GoogleCloudRetailV2alphaCompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowlistInputConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowlistInputConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCompletionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCompletionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaCompletionDataInputConfig: The input config // source for completion data. type GoogleCloudRetailV2alphaCompletionDataInputConfig struct { @@ -1842,6 +1941,21 @@ type GoogleCloudRetailV2alphaControl struct { // query full matches "Running Shoes". Rule *GoogleCloudRetailV2alphaRule `json:"rule,omitempty"` + // SearchSolutionUseCase: Required. Specifies the use case for the + // control. Affects what condition fields can be set. Only settable by + // search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if + // not specified. Currently only allow one search_solution_use_case per + // control. + // + // Possible values: + // "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's + // unspecified. Defaults to SEARCH. + // "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the + // traffic has a non-empty query. + // "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the + // traffic has an empty query. + SearchSolutionUseCase []string `json:"searchSolutionUseCase,omitempty"` + // SolutionTypes: Required. Immutable. The solution types that the // serving config is used for. Currently we support setting only one // type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value @@ -2215,7 +2329,10 @@ func (s *GoogleCloudRetailV2alphaGetDefaultBranchResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2alphaImage: Product thumbnail/detail image. +// GoogleCloudRetailV2alphaImage: Product image. Recommendations AI and +// Retail Search do not use product images to improve prediction and +// search results. However, product images can be returned in results, +// and are shown in prediction or search previews in the console. type GoogleCloudRetailV2alphaImage struct { // Height: Height of the image in number of pixels. This field must be // nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. @@ -2374,8 +2491,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -2446,12 +2562,7 @@ type GoogleCloudRetailV2alphaImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -2816,7 +2927,7 @@ type GoogleCloudRetailV2alphaLocalInventory struct { // with a length limit of 32 characters. * The key must match the // pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. // * The attribute values must be of the same type (text or number). * - // The max number of values per attribute is 10. * For text values, the + // Only 1 value is allowed for each attribute. * For text values, the // length limit is 256 UTF-8 characters. * The attribute does not // support search. The `searchable` field should be unset or set to // false. * The max summed total bytes of custom attribute keys and @@ -2964,9 +3075,11 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // nothing will be returned. If you want generic (unfiltered) popular - // products to be returned instead, set `strictFiltering` to false in - // `PredictRequest.params`. + // the API will return generic (unfiltered) popular products. If you + // only want results strictly matching the filters, set + // `strictFiltering` to True in `PredictRequest.params` to receive empty + // results instead. Note that the API will never return items with + // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -3411,8 +3524,8 @@ type GoogleCloudRetailV2alphaProduct struct { // Schema.org property Product.sku (https://schema.org/sku). Id string `json:"id,omitempty"` - // Images: Product images for the product.Highly recommended to put the - // main image to the first. A maximum of 300 images are allowed. + // Images: Product images for the product. We highly recommend putting + // the main image first. A maximum of 300 images are allowed. // Corresponding properties: Google Merchant Center property image_link // (https://support.google.com/merchants/answer/6324350). Schema.org // property Product.image (https://schema.org/image). @@ -3876,6 +3989,134 @@ func (s *GoogleCloudRetailV2alphaPurchaseTransaction) UnmarshalJSON(data []byte) type GoogleCloudRetailV2alphaPurgeMetadata struct { } +// GoogleCloudRetailV2alphaPurgeProductsMetadata: Metadata related to +// the progress of the PurgeProducts operation. This will be returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2alphaPurgeProductsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // 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 *GoogleCloudRetailV2alphaPurgeProductsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaPurgeProductsRequest: Request message for +// PurgeProducts method. +type GoogleCloudRetailV2alphaPurgeProductsRequest struct { + // Filter: Required. The filter string to specify the products to be + // deleted with a length limit of 5,000 characters. Empty string filter + // is not allowed. "*" implies delete all items in a branch. The + // eligible fields for filtering are: * `availability`: Double quoted + // Product.availability string. * `create_time` : in ISO 8601 "zulu" + // format. Supported syntax: * Comparators (">", "<", ">=", "<=", "="). + // Examples: * create_time <= "2015-02-13T17:05:46Z" * availability = + // "IN_STOCK” * Conjunctions ("AND") Examples: * create_time <= + // "2015-02-13T17:05:46Z" AND availability = "PREORDER" * Disjunctions + // ("OR") Examples: * create_time <= "2015-02-13T17:05:46Z" OR + // availability = "IN_STOCK" * Can support nested queries. Examples: * + // (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER") + // OR (create_time >= "2015-02-14T13:03:32Z" AND availability = + // "IN_STOCK") * Filter Limits: * Filter should not contain more than 6 + // conditions. * Max nesting depth should not exceed 2 levels. Examples + // queries: * Delete back order products created before a timestamp. + // create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER” + Filter string `json:"filter,omitempty"` + + // Force: Actually perform the purge. If `force` is set to false, the + // method will return the expected purge count without deleting any + // products. + Force bool `json:"force,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaPurgeProductsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaPurgeProductsResponse: Response of the +// PurgeProductsRequest. If the long running operation is successfully +// done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudRetailV2alphaPurgeProductsResponse struct { + // PurgeCount: The total count of products purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // PurgeSample: A sample of the product names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaPurgeProductsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaPurgeUserEventsRequest: Request message for // PurgeUserEvents method. type GoogleCloudRetailV2alphaPurgeUserEventsRequest struct { @@ -4705,9 +4946,11 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // search products under the default branch. Branch string `json:"branch,omitempty"` - // CanonicalFilter: The filter applied to every search request when - // quality improvement such as query expansion is needed. For example, - // if a query does not have enough results, an expanded query with + // CanonicalFilter: The default filter that is applied when a user + // performs a search without checking any filters on the search page. + // The filter applied to every search request when quality improvement + // such as query expansion is needed. For example, if a query does not + // have enough results, an expanded query with // SearchRequest.canonical_filter will be returned as a supplement of // the original query. This field is strongly recommended to achieve // high search quality. See SearchRequest.filter for more details about @@ -5824,16 +6067,23 @@ type GoogleCloudRetailV2alphaSetInventoryResponse struct { // with customers' website. type GoogleCloudRetailV2alphaUserEvent struct { // Attributes: Extra user event features to include in the - // recommendation model. This field needs to pass all below criteria, - // otherwise an INVALID_ARGUMENT error is returned: * The key must be a - // UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendation, an example of extra user - // information is traffic_channel, i.e. how user arrives at the site. - // Users can arrive at the site by coming to the site directly, or - // coming through Google search, and etc. + // recommendation model. If you provide custom attributes for ingested + // user events, also include them in the user events that you associate + // with prediction requests. Custom attribute formatting must be + // consistent between imported events and events provided with + // prediction requests. This lets the Retail API use those custom + // attributes when training models and serving predictions, which helps + // improve recommendation quality. This field needs to pass all below + // criteria, otherwise an INVALID_ARGUMENT error is returned: * The key + // must be a UTF-8 encoded string with a length limit of 5,000 + // characters. * For text attributes, at most 400 values are allowed. + // Empty values are not allowed. Each value must be a UTF-8 encoded + // string with a length limit of 256 characters. * For number + // attributes, at most 400 values are allowed. For product + // recommendations, an example of extra user information is + // traffic_channel, which is how a user arrives at the site. Users can + // arrive at the site by coming to the site directly, coming through + // Google search, or in other ways. Attributes map[string]GoogleCloudRetailV2alphaCustomAttribute `json:"attributes,omitempty"` // AttributionToken: Highly recommended for user events that are the @@ -6412,8 +6662,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -6764,8 +7013,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -6944,8 +7192,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Query(query string) *Projec return c } -// VisitorId sets the optional parameter "visitorId": A unique -// identifier for tracking visitors. For example, this could be +// VisitorId sets the optional parameter "visitorId": Required field. A +// unique identifier for tracking visitors. For example, this could be // implemented with an HTTP cookie, which should be able to uniquely // identify a visitor on a single device. This unique identifier should // not change if the visitor logs in or out of the website. The field @@ -7100,7 +7348,7 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "visitorId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // } @@ -7266,6 +7514,156 @@ func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.getCompletionConfig": + +type ProjectsLocationsCatalogsGetCompletionConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCompletionConfig: Gets a CompletionConfig. +// +// - name: Full CompletionConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/completionConfig. +func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c := &ProjectsLocationsCatalogsGetCompletionConfigCall{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 *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall { + 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 *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + 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 *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall { + 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 *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) 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, "v2alpha/{+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 "retail.projects.locations.catalogs.getCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaCompletionConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaCompletionConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaCompletionConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaCompletionConfig{ + 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 CompletionConfig.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.getDefaultBranch": type ProjectsLocationsCatalogsGetDefaultBranchCall struct { @@ -8107,16 +8505,178 @@ func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googlea } -// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": - -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "retail.projects.locations.catalogs.updateCompletionConfig": + +type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct { + s *Service + name string + googlecloudretailv2alphacompletionconfig *GoogleCloudRetailV2alphaCompletionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCompletionConfig: Updates the CompletionConfigs. +// +// - name: Immutable. Fully qualified name +// projects/*/locations/*/catalogs/*/completionConfig. +func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2alphacompletionconfig *GoogleCloudRetailV2alphaCompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2alphacompletionconfig = googlecloudretailv2alphacompletionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided CompletionConfig to update. The following are +// the only supported fields: * CompletionConfig.matching_order * +// CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length +// * CompletionConfig.auto_learning If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + 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 *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + 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 *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + 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 *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) 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.googlecloudretailv2alphacompletionconfig) + 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, "v2alpha/{+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 "retail.projects.locations.catalogs.updateCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2alphaCompletionConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2alphaCompletionConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaCompletionConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaCompletionConfig{ + 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 CompletionConfigs.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateCompletionConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaCompletionConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": + +type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2alphaaddcatalogattributerequest *GoogleCloudRetailV2alphaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} // AddCatalogAttribute: Adds the specified CatalogAttribute to the // AttributesConfig. If the CatalogAttribute to add already exists, an @@ -10050,44 +10610,41 @@ func (c *ProjectsLocationsCatalogsBranchesProductsPatchCall) Do(opts ...googleap } -// method id "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces": +// method id "retail.projects.locations.catalogs.branches.products.purge": -type ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall struct { - s *Service - product string - googlecloudretailv2alpharemovefulfillmentplacesrequest *GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsBranchesProductsPurgeCall struct { + s *Service + parent string + googlecloudretailv2alphapurgeproductsrequest *GoogleCloudRetailV2alphaPurgeProductsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveFulfillmentPlaces: Incrementally removes place IDs from a -// Product.fulfillment_info.place_ids. This process is asynchronous and -// does not require the Product to exist before updating fulfillment -// information. If the request is valid, the update will be enqueued and -// processed downstream. As a consequence, when a response is returned, -// the removed place IDs are not immediately manifested in the Product -// queried by GetProduct or ListProducts. This feature is only available -// for users who have Retail Search enabled. Please submit a form here -// (https://cloud.google.com/contact) to contact cloud sales if you are -// interested in using Retail Search. +// Purge: Permanently deletes all selected Products under a branch. This +// process is asynchronous. If the request is valid, the removal will be +// enqueued and processed offline. Depending on the number of Products, +// this operation could take hours to complete. Before the operation +// completes, some Products may still be returned by GetProduct or +// ListProducts. Depending on the number of Products, this operation +// could take hours to complete. To get a sample of Products that would +// be deleted, set PurgeProductsRequest.force to false. // -// - product: Full resource name of Product, such as -// `projects/*/locations/global/catalogs/default_catalog/branches/defau -// lt_branch/products/some_product_id`. If the caller does not have -// permission to access the Product, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveFulfillmentPlaces(product string, googlecloudretailv2alpharemovefulfillmentplacesrequest *GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { - c := &ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.product = product - c.googlecloudretailv2alpharemovefulfillmentplacesrequest = googlecloudretailv2alpharemovefulfillmentplacesrequest +// - parent: The resource name of the branch under which the products +// are created. The format is +// `projects/${projectId}/locations/global/catalogs/${catalogId}/branch +// es/${branchId}`. +func (r *ProjectsLocationsCatalogsBranchesProductsService) Purge(parent string, googlecloudretailv2alphapurgeproductsrequest *GoogleCloudRetailV2alphaPurgeProductsRequest) *ProjectsLocationsCatalogsBranchesProductsPurgeCall { + c := &ProjectsLocationsCatalogsBranchesProductsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2alphapurgeproductsrequest = googlecloudretailv2alphapurgeproductsrequest 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 *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { +func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10095,21 +10652,21 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) F // 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 *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { +func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsPurgeCall { 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 *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) 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_ { @@ -10117,14 +10674,14 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) d } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alpharemovefulfillmentplacesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alphapurgeproductsrequest) 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, "v2alpha/{+product}:removeFulfillmentPlaces") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/products:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10132,19 +10689,19 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) d } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "product": c.product, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces" call. +// Do executes the "retail.projects.locations.catalogs.branches.products.purge" 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 *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCatalogsBranchesProductsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10175,25 +10732,25 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) D } return ret, nil // { - // "description": "Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", - // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", + // "description": "Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by GetProduct or ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:purge", // "httpMethod": "POST", - // "id": "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces", + // "id": "retail.projects.locations.catalogs.branches.products.purge", // "parameterOrder": [ - // "product" + // "parent" // ], // "parameters": { - // "product": { - // "description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "parent": { + // "description": "Required. The resource name of the branch under which the products are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2alpha/{+product}:removeFulfillmentPlaces", + // "path": "v2alpha/{+parent}/products:purge", // "request": { - // "$ref": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest" + // "$ref": "GoogleCloudRetailV2alphaPurgeProductsRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -10205,45 +10762,44 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) D } -// method id "retail.projects.locations.catalogs.branches.products.removeLocalInventories": +// method id "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces": -type ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall struct { - s *Service - product string - googlecloudretailv2alpharemovelocalinventoriesrequest *GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall struct { + s *Service + product string + googlecloudretailv2alpharemovefulfillmentplacesrequest *GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveLocalInventories: Remove local inventory information for a -// Product at a list of places at a removal timestamp. This process is -// asynchronous. If the request is valid, the removal will be enqueued -// and processed downstream. As a consequence, when a response is -// returned, removals are not immediately manifested in the Product -// queried by GetProduct or ListProducts. Local inventory information -// can only be removed using this method. CreateProduct and -// UpdateProduct has no effect on local inventories. This feature is -// only available for users who have Retail Search enabled. Please -// submit a form here (https://cloud.google.com/contact) to contact -// Cloud sales if you are interested in using Retail Search. +// RemoveFulfillmentPlaces: Incrementally removes place IDs from a +// Product.fulfillment_info.place_ids. This process is asynchronous and +// does not require the Product to exist before updating fulfillment +// information. If the request is valid, the update will be enqueued and +// processed downstream. As a consequence, when a response is returned, +// the removed place IDs are not immediately manifested in the Product +// queried by GetProduct or ListProducts. This feature is only available +// for users who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - product: Full resource name of Product, such as // `projects/*/locations/global/catalogs/default_catalog/branches/defau // lt_branch/products/some_product_id`. If the caller does not have // permission to access the Product, regardless of whether or not it // exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveLocalInventories(product string, googlecloudretailv2alpharemovelocalinventoriesrequest *GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { - c := &ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveFulfillmentPlaces(product string, googlecloudretailv2alpharemovefulfillmentplacesrequest *GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { + c := &ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.product = product - c.googlecloudretailv2alpharemovelocalinventoriesrequest = googlecloudretailv2alpharemovelocalinventoriesrequest + c.googlecloudretailv2alpharemovefulfillmentplacesrequest = googlecloudretailv2alpharemovefulfillmentplacesrequest 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10251,21 +10807,21 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall { 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) 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_ { @@ -10273,14 +10829,14 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) do } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alpharemovelocalinventoriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2alpharemovefulfillmentplacesrequest) 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, "v2alpha/{+product}:removeLocalInventories") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+product}:removeFulfillmentPlaces") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10293,14 +10849,14 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.branches.products.removeLocalInventories" call. +// Do executes the "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces" 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveFulfillmentPlacesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10331,8 +10887,164 @@ func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Do } return ret, nil // { - // "description": "Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be removed using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.", - // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeLocalInventories", + // "description": "Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces", + // "parameterOrder": [ + // "product" + // ], + // "parameters": { + // "product": { + // "description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+product}:removeFulfillmentPlaces", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.branches.products.removeLocalInventories": + +type ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall struct { + s *Service + product string + googlecloudretailv2alpharemovelocalinventoriesrequest *GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveLocalInventories: Remove local inventory information for a +// Product at a list of places at a removal timestamp. This process is +// asynchronous. If the request is valid, the removal will be enqueued +// and processed downstream. As a consequence, when a response is +// returned, removals are not immediately manifested in the Product +// queried by GetProduct or ListProducts. Local inventory information +// can only be removed using this method. CreateProduct and +// UpdateProduct has no effect on local inventories. This feature is +// only available for users who have Retail Search enabled. Please +// submit a form here (https://cloud.google.com/contact) to contact +// Cloud sales if you are interested in using Retail Search. +// +// - product: Full resource name of Product, such as +// `projects/*/locations/global/catalogs/default_catalog/branches/defau +// lt_branch/products/some_product_id`. If the caller does not have +// permission to access the Product, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCatalogsBranchesProductsService) RemoveLocalInventories(product string, googlecloudretailv2alpharemovelocalinventoriesrequest *GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { + c := &ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.product = product + c.googlecloudretailv2alpharemovelocalinventoriesrequest = googlecloudretailv2alpharemovelocalinventoriesrequest + 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { + 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Context(ctx context.Context) *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall { + 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) 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.googlecloudretailv2alpharemovelocalinventoriesrequest) + 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, "v2alpha/{+product}:removeLocalInventories") + 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{ + "product": c.product, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.branches.products.removeLocalInventories" 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 *ProjectsLocationsCatalogsBranchesProductsRemoveLocalInventoriesCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be removed using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeLocalInventories", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.branches.products.removeLocalInventories", // "parameterOrder": [ @@ -10537,10 +11249,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -10642,7 +11357,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -11863,7 +12578,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -11977,7 +12694,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -12017,7 +12734,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -12128,7 +12847,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -13124,6 +13843,158 @@ func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2alphapredictrequest *GoogleCloudRetailV2alphaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2alphapredictrequest = googlecloudretailv2alphapredictrequest + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) 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.googlecloudretailv2alphapredictrequest) + 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, "v2alpha/{+placement}:predict") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2alphaPredictResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2alphaPredictResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaPredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaPredictResponse{ + 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": "Makes a recommendation prediction.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.servingConfigs.removeControl": type ProjectsLocationsCatalogsServingConfigsRemoveControlCall struct { @@ -13271,6 +14142,180 @@ func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Do(opts ...go } +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2alphasearchrequest *GoogleCloudRetailV2alphaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2alphasearchrequest = googlecloudretailv2alphasearchrequest + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) 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.googlecloudretailv2alphasearchrequest) + 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, "v2alpha/{+placement}:search") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2alphaSearchResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2alphaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2alphaSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2alphaSearchResponse{ + 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": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2alphaSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2alphaSearchResponse" + // }, + // "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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2alphasearchrequest.PageToken = pt }(c.googlecloudretailv2alphasearchrequest.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.googlecloudretailv2alphasearchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { @@ -13766,14 +14811,15 @@ type ProjectsLocationsCatalogsUserEventsRejoinCall struct { header_ http.Header } -// Rejoin: Triggers a user event rejoin operation with latest product +// Rejoin: Starts a user event rejoin operation with latest product // catalog. Events will not be annotated with detailed product // information if product is missing from the catalog at the time the // user event is ingested, and these events are stored as unjoined -// events with a limited usage on training and serving. This API can be -// used to trigger a 'join' operation on specified events with latest +// events with a limited usage on training and serving. This method can +// be used to start a join operation on specified events with latest // version of product catalog. It can also be used to correct events -// joined with wrong product catalog. +// joined with the wrong product catalog. A rejoin operation can take +// hours or days to complete. // // - parent: The parent catalog resource name, such as // `projects/1234/locations/global/catalogs/default_catalog`. @@ -13875,7 +14921,7 @@ func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + // "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.userEvents.rejoin", diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 5ffe06e8266..fe0a2370131 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -155,7 +155,7 @@ "type": "string" }, "visitorId": { - "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "query", "type": "string" } @@ -193,6 +193,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCompletionConfig": { + "description": "Gets a CompletionConfig.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "GET", + "id": "retail.projects.locations.catalogs.getCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getDefaultBranch": { "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", @@ -349,6 +374,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCompletionConfig": { + "description": "Updates the CompletionConfigs.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + "httpMethod": "PATCH", + "id": "retail.projects.locations.catalogs.updateCompletionConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "request": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaCompletionConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -761,7 +820,7 @@ "completionData": { "methods": { "import": { - "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.completionData.import", @@ -1034,7 +1093,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1062,7 +1121,7 @@ ], "parameters": { "placement": { - "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -1265,6 +1324,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "predict": { + "description": "Makes a recommendation prediction.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.predict", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+placement}:predict", + "request": { + "$ref": "GoogleCloudRetailV2betaPredictRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "removeControl": { "description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", @@ -1292,6 +1379,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "search": { + "description": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.servingConfigs.search", + "parameterOrder": [ + "placement" + ], + "parameters": { + "placement": { + "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+placement}:search", + "request": { + "$ref": "GoogleCloudRetailV2betaSearchRequest" + }, + "response": { + "$ref": "GoogleCloudRetailV2betaSearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1395,7 +1510,7 @@ ] }, "rejoin": { - "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", "httpMethod": "POST", "id": "retail.projects.locations.catalogs.userEvents.rejoin", @@ -1599,7 +1714,7 @@ } } }, - "revision": "20220303", + "revision": "20220319", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1808,7 +1923,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2073,7 +2188,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2135,6 +2250,52 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaPurgeProductsMetadata": { + "description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" + }, + "GoogleCloudRetailV2alphaPurgeProductsResponse": { + "description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudRetailV2alphaPurgeProductsResponse", + "properties": { + "purgeCount": { + "description": "The total count of products purged as a result of the operation.", + "format": "int64", + "type": "string" + }, + "purgeSample": { + "description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaPurgeUserEventsResponse": { "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", "id": "GoogleCloudRetailV2alphaPurgeUserEventsResponse", @@ -2292,7 +2453,7 @@ ], "enumDescriptions": [ "Value used when unset. Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", - "At this level, we honor the attribute configurations set in Product.attribtues.", + "At this level, we honor the attribute configurations set in Product.attributes.", "At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." ], "readOnly": true, @@ -2338,7 +2499,7 @@ "id": "GoogleCloudRetailV2betaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846.", + "description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: This feature is in private preview. Please contact the support team for importing Google Analytics 4 events. The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for auto-completion imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", "type": "string" }, "datasetId": { @@ -2372,6 +2533,10 @@ "description": "Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "merchantCenterLinkingConfig": { + "$ref": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", + "description": "The Merchant Center linking configuration. Once a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the merchant center account in order to make changes to this field." + }, "name": { "description": "Required. Immutable. The fully qualified resource name of the catalog.", "type": "string" @@ -2482,7 +2647,7 @@ "id": "GoogleCloudRetailV2betaCompleteQueryResponse", "properties": { "attributionToken": { - "description": "A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance.", + "description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", "type": "string" }, "completionResults": { @@ -2510,7 +2675,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2betaCustomAttribute" }, - "description": "Additional custom attributes ingested through BigQuery.", + "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail.", "type": "object" }, "suggestion": { @@ -2531,6 +2696,65 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCompletionConfig": { + "description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", + "id": "GoogleCloudRetailV2betaCompletionConfig", + "properties": { + "allowlistInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete allowlist phrases uploaded by the customer.", + "readOnly": true + }, + "autoLearning": { + "description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", + "type": "boolean" + }, + "denylistInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the / autocomplete denylist phrases uploaded by the customer.", + "readOnly": true + }, + "lastAllowlistImportOperation": { + "description": "Output only. LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastDenylistImportOperation": { + "description": "Output only. LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "lastSuggestionsImportOperation": { + "description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", + "readOnly": true, + "type": "string" + }, + "matchingOrder": { + "description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", + "type": "string" + }, + "maxSuggestions": { + "description": "The maximum number of autocomplete suggestions returned per term. The maximum allowed max suggestions is 20. Default value is 20. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "minPrefixLength": { + "description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", + "type": "string" + }, + "suggestionsInputConfig": { + "$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", + "description": "Output only. The input config for the import of the source data that contains the autocomplete phrases uploaded by the customer.", + "readOnly": true + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaCompletionDataInputConfig": { "description": "The input config source for completion data.", "id": "GoogleCloudRetailV2betaCompletionDataInputConfig", @@ -2643,6 +2867,23 @@ "$ref": "GoogleCloudRetailV2betaRule", "description": "A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost \"gShoe\" when query full matches \"Running Shoes\"." }, + "searchSolutionUseCase": { + "description": "Required. Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.", + "items": { + "enum": [ + "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", + "SEARCH_SOLUTION_USE_CASE_SEARCH", + "SEARCH_SOLUTION_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "The value when it's unspecified. Defaults to SEARCH.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + }, "solutionTypes": { "description": "Required. Immutable. The solution types that the serving config is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.", "items": { @@ -2814,7 +3055,7 @@ "type": "object" }, "GoogleCloudRetailV2betaImage": { - "description": "Product thumbnail/detail image.", + "description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", "id": "GoogleCloudRetailV2betaImage", "properties": { "height": { @@ -2893,7 +3134,7 @@ "type": "string" }, "requestId": { - "description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", + "description": "Deprecated. This field is never set.", "type": "string" }, "successCount": { @@ -2940,7 +3181,7 @@ "type": "string" }, "requestId": { - "description": "Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", + "description": "Deprecated. This field has no effect.", "type": "string" }, "updateMask": { @@ -3105,12 +3346,57 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaMerchantCenterLink": { + "description": "Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.", + "id": "GoogleCloudRetailV2betaMerchantCenterLink", + "properties": { + "branchId": { + "description": "The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id.", + "type": "string" + }, + "destinations": { + "description": "String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/answer/7501026] List of allowed string values: \"Shopping_ads\", \"Buy_on_google_listings\", \"Display_ads\", \"Local_inventory _ads\", \"Free_listings\", \"Free_local_listings\" NOTE: The string values are case sensitive.", + "items": { + "type": "string" + }, + "type": "array" + }, + "languageCode": { + "description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed.", + "type": "string" + }, + "merchantCenterAccountId": { + "description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", + "format": "int64", + "type": "string" + }, + "regionCode": { + "description": "Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found [here](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) under the `region` tag. If left blank no region filtering will be performed. Example value: `US`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaMerchantCenterLinkingConfig": { + "description": "Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch.", + "id": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", + "properties": { + "links": { + "description": "Links between Merchant Center accounts and branches.", + "items": { + "$ref": "GoogleCloudRetailV2betaMerchantCenterLink" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaPredictRequest": { "description": "Request message for Predict method.", "id": "GoogleCloudRetailV2betaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return generic (unfiltered) popular products. If you only want results strictly matching the filters, set `strictFiltering` to True in `PredictRequest.params` to receive empty results instead. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices.", "type": "string" }, "labels": { @@ -3350,7 +3636,7 @@ "type": "string" }, "images": { - "description": "Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", + "description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", "items": { "$ref": "GoogleCloudRetailV2betaImage" }, @@ -3940,7 +4226,7 @@ "type": "string" }, "canonicalFilter": { - "description": "The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. For example, if a query does not have enough results, an expanded query with SearchRequest.canonical_filter will be returned as a supplement of the original query. This field is strongly recommended to achieve high search quality. See SearchRequest.filter for more details about filter syntax.", "type": "string" }, "dynamicFacetSpec": { @@ -4534,7 +4820,7 @@ "additionalProperties": { "$ref": "GoogleCloudRetailV2betaCustomAttribute" }, - "description": "Extra user event features to include in the recommendation model. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.", + "description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", "type": "object" }, "attributionToken": { @@ -4754,7 +5040,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index b209ad47f3a..56336e64d11 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -702,8 +702,7 @@ type GoogleCloudRetailV2ImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1200,8 +1199,7 @@ type GoogleCloudRetailV2alphaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -1317,6 +1315,84 @@ func (s *GoogleCloudRetailV2alphaImportUserEventsResponse) MarshalJSON() ([]byte type GoogleCloudRetailV2alphaPurgeMetadata struct { } +// GoogleCloudRetailV2alphaPurgeProductsMetadata: Metadata related to +// the progress of the PurgeProducts operation. This will be returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudRetailV2alphaPurgeProductsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // 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 *GoogleCloudRetailV2alphaPurgeProductsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaPurgeProductsResponse: Response of the +// PurgeProductsRequest. If the long running operation is successfully +// done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudRetailV2alphaPurgeProductsResponse struct { + // PurgeCount: The total count of products purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // PurgeSample: A sample of the product names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaPurgeProductsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaPurgeProductsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaPurgeUserEventsResponse: Response of the // PurgeUserEventsRequest. If the long running operation is successfully // done, then this message is returned by the @@ -1604,7 +1680,7 @@ type GoogleCloudRetailV2betaAttributesConfig struct { // "ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED" - Value used when unset. // Defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG. // "PRODUCT_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the - // attribute configurations set in Product.attribtues. + // attribute configurations set in Product.attributes. // "CATALOG_LEVEL_ATTRIBUTE_CONFIG" - At this level, we honor the // attribute configurations set in CatalogConfig.attribute_configs. AttributeConfigLevel string `json:"attributeConfigLevel,omitempty"` @@ -1716,7 +1792,11 @@ type GoogleCloudRetailV2betaBigQuerySource struct { // * `user_event_ga4`: This feature is in private preview. Please // contact the support team for importing Google Analytics 4 events. The // schema is available here: - // https://support.google.com/analytics/answer/7029846. + // https://support.google.com/analytics/answer/7029846. Supported values + // for auto-completion imports: * `suggestions` (default): One JSON + // completion suggestion per line. * `denylist`: One JSON deny + // suggestion per line. * `allowlist`: One JSON allow suggestion per + // line. DataSchema string `json:"dataSchema,omitempty"` // DatasetId: Required. The BigQuery data set to copy the data from with @@ -1773,6 +1853,13 @@ type GoogleCloudRetailV2betaCatalog struct { // characters. Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // MerchantCenterLinkingConfig: The Merchant Center linking + // configuration. Once a link is added, the data stream from Merchant + // Center to Cloud Retail will be enabled automatically. The requester + // must have access to the merchant center account in order to make + // changes to this field. + MerchantCenterLinkingConfig *GoogleCloudRetailV2betaMerchantCenterLinkingConfig `json:"merchantCenterLinkingConfig,omitempty"` + // Name: Required. Immutable. The fully qualified resource name of the // catalog. Name string `json:"name,omitempty"` @@ -1956,8 +2043,9 @@ func (s *GoogleCloudRetailV2betaColorInfo) MarshalJSON() ([]byte, error) { // auto-complete query. type GoogleCloudRetailV2betaCompleteQueryResponse struct { // AttributionToken: A unique complete token. This should be included in - // the SearchRequest resulting from this completion, which enables - // accurate attribution of complete model performance. + // the UserEvent.completion_detail for search events resulting from this + // completion, which enables accurate attribution of complete model + // performance. AttributionToken string `json:"attributionToken,omitempty"` // CompletionResults: Results of the matching suggestions. The result @@ -2008,7 +2096,10 @@ func (s *GoogleCloudRetailV2betaCompleteQueryResponse) MarshalJSON() ([]byte, er // GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult: // Resource that represents completion results. type GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult struct { - // Attributes: Additional custom attributes ingested through BigQuery. + // Attributes: Custom attributes for the suggestion term. * For + // "user-data", the attributes are additional custom attributes ingested + // through BigQuery. * For "cloud-retail", the attributes are product + // attributes generated by Cloud Retail. Attributes map[string]GoogleCloudRetailV2betaCustomAttribute `json:"attributes,omitempty"` // Suggestion: The suggestion for the query. @@ -2066,6 +2157,98 @@ func (s *GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult) Marshal return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCompletionConfig: Catalog level autocomplete +// config for customers to customize autocomplete feature's settings. +type GoogleCloudRetailV2betaCompletionConfig struct { + // AllowlistInputConfig: Output only. The input config for the import of + // the source data that contains the autocomplete allowlist phrases + // uploaded by the customer. + AllowlistInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"allowlistInputConfig,omitempty"` + + // AutoLearning: If set to true, the auto learning function is enabled. + // Auto learning uses user data to generate suggestions using ML + // techniques. Default value is false. Only after enabling auto learning + // can users use `cloud-retail` data in CompleteQueryRequest. + AutoLearning bool `json:"autoLearning,omitempty"` + + // DenylistInputConfig: Output only. The input config for the import of + // the source data that contains the / autocomplete denylist phrases + // uploaded by the customer. + DenylistInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"denylistInputConfig,omitempty"` + + // LastAllowlistImportOperation: Output only. LRO corresponding to the + // latest allowlist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastAllowlistImportOperation string `json:"lastAllowlistImportOperation,omitempty"` + + // LastDenylistImportOperation: Output only. LRO corresponding to the + // latest denylist import. Can use GetOperation API to retrieve the + // latest state of the Long Running Operation. + LastDenylistImportOperation string `json:"lastDenylistImportOperation,omitempty"` + + // LastSuggestionsImportOperation: Output only. Name of the LRO + // corresponding to the latest suggestion terms list import. Can use + // GetOperation API to retrieve the latest state of the Long Running + // Operation. + LastSuggestionsImportOperation string `json:"lastSuggestionsImportOperation,omitempty"` + + // MatchingOrder: Specifies the matching order for autocomplete + // suggestions, e.g., a query consisting of 'sh' with 'out-of-order' + // specified would suggest "women's shoes", whereas a query of 'red s' + // with 'exact-prefix' specified would suggest "red shoes". Currently + // supported values: * 'out-of-order' * 'exact-prefix' Default value: + // 'exact-prefix'. + MatchingOrder string `json:"matchingOrder,omitempty"` + + // MaxSuggestions: The maximum number of autocomplete suggestions + // returned per term. The maximum allowed max suggestions is 20. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + MaxSuggestions int64 `json:"maxSuggestions,omitempty"` + + // MinPrefixLength: The minimum number of characters needed to be typed + // in order to get suggestions. Default value is 2. If left unset or set + // to 0, then will fallback to default value. + MinPrefixLength int64 `json:"minPrefixLength,omitempty"` + + // Name: Required. Immutable. Fully qualified name + // projects/*/locations/*/catalogs/*/completionConfig + Name string `json:"name,omitempty"` + + // SuggestionsInputConfig: Output only. The input config for the import + // of the source data that contains the autocomplete phrases uploaded by + // the customer. + SuggestionsInputConfig *GoogleCloudRetailV2betaCompletionDataInputConfig `json:"suggestionsInputConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowlistInputConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowlistInputConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCompletionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCompletionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaCompletionDataInputConfig: The input config // source for completion data. type GoogleCloudRetailV2betaCompletionDataInputConfig struct { @@ -2279,6 +2462,21 @@ type GoogleCloudRetailV2betaControl struct { // query full matches "Running Shoes". Rule *GoogleCloudRetailV2betaRule `json:"rule,omitempty"` + // SearchSolutionUseCase: Required. Specifies the use case for the + // control. Affects what condition fields can be set. Only settable by + // search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if + // not specified. Currently only allow one search_solution_use_case per + // control. + // + // Possible values: + // "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's + // unspecified. Defaults to SEARCH. + // "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the + // traffic has a non-empty query. + // "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the + // traffic has an empty query. + SearchSolutionUseCase []string `json:"searchSolutionUseCase,omitempty"` + // SolutionTypes: Required. Immutable. The solution types that the // serving config is used for. Currently we support setting only one // type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value @@ -2652,7 +2850,10 @@ func (s *GoogleCloudRetailV2betaGetDefaultBranchResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaImage: Product thumbnail/detail image. +// GoogleCloudRetailV2betaImage: Product image. Recommendations AI and +// Retail Search do not use product images to improve prediction and +// search results. However, product images can be returned in results, +// and are shown in prediction or search previews in the console. type GoogleCloudRetailV2betaImage struct { // Height: Height of the image in number of pixels. This field must be // nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. @@ -2811,8 +3012,7 @@ type GoogleCloudRetailV2betaImportMetadata struct { // `projects/{project}/topics/{topic}`. NotificationPubsubTopic string `json:"notificationPubsubTopic,omitempty"` - // RequestId: Id of the request / operation. This is parroting back the - // requestId that was passed in the request. + // RequestId: Deprecated. This field is never set. RequestId string `json:"requestId,omitempty"` // SuccessCount: Count of entries that were processed successfully. @@ -2883,12 +3083,7 @@ type GoogleCloudRetailV2betaImportProductsRequest struct { // if you are interested in using Retail Search. ReconciliationMode string `json:"reconciliationMode,omitempty"` - // RequestId: Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request - // deduplication. Server-generated if unspecified. Up to 128 characters - // long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as - // Operation.name in ImportMetadata. Only supported when - // ImportProductsRequest.reconciliation_mode is set to `FULL`. + // RequestId: Deprecated. This field has no effect. RequestId string `json:"requestId,omitempty"` // UpdateMask: Indicates which fields in the provided imported @@ -3236,6 +3431,100 @@ func (s *GoogleCloudRetailV2betaListServingConfigsResponse) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaMerchantCenterLink: Represents a link between +// a Merchant Center account and a branch. Once a link is established, +// products from the linked merchant center account will be streamed to +// the linked branch. +type GoogleCloudRetailV2betaMerchantCenterLink struct { + // BranchId: The branch id (e.g. 0/1/2) within this catalog that + // products from merchant_center_account_id are streamed to. When + // updating this field, an empty value will use the currently configured + // default branch. However, changing the default branch later on won't + // change the linked branch here. A single branch id can only have one + // linked merchant center account id. + BranchId string `json:"branchId,omitempty"` + + // Destinations: String representing the destination to import for, all + // if left empty. List of possible values can be found here. + // [https://support.google.com/merchants/answer/7501026] List of allowed + // string values: "Shopping_ads", "Buy_on_google_listings", + // "Display_ads", "Local_inventory _ads", "Free_listings", + // "Free_local_listings" NOTE: The string values are case sensitive. + Destinations []string `json:"destinations,omitempty"` + + // LanguageCode: Language of the title/description and other string + // attributes. Use language tags defined by BCP 47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This + // specifies the language of offers in Merchant Center that will be + // accepted. If empty no language filtering will be performed. + LanguageCode string `json:"languageCode,omitempty"` + + // MerchantCenterAccountId: Required. The linked Merchant center account + // id + // (https://developers.google.com/shopping-content/guides/accountstatuses). + // The account must be a standalone account or a sub-account of a MCA. + MerchantCenterAccountId int64 `json:"merchantCenterAccountId,omitempty,string"` + + // RegionCode: Region code of offers to accept. 2-letter Uppercase ISO + // 3166-1 alpha-2 code. List of values can be found here + // (https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) + // under the `region` tag. If left blank no region filtering will be + // performed. Example value: `US`. + RegionCode string `json:"regionCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BranchId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BranchId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaMerchantCenterLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaMerchantCenterLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaMerchantCenterLinkingConfig: Configures +// Merchant Center linking. Links contained in the config will be used +// to sync data from a Merchant Center account to a Cloud Retail branch. +type GoogleCloudRetailV2betaMerchantCenterLinkingConfig struct { + // Links: Links between Merchant Center accounts and branches. + Links []*GoogleCloudRetailV2betaMerchantCenterLink `json:"links,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Links") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Links") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaMerchantCenterLinkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaMerchantCenterLinkingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaPredictRequest: Request message for Predict // method. type GoogleCloudRetailV2betaPredictRequest struct { @@ -3253,9 +3542,11 @@ type GoogleCloudRetailV2betaPredictRequest struct { // OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" // tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems If your filter blocks all prediction results, - // nothing will be returned. If you want generic (unfiltered) popular - // products to be returned instead, set `strictFiltering` to false in - // `PredictRequest.params`. + // the API will return generic (unfiltered) popular products. If you + // only want results strictly matching the filters, set + // `strictFiltering` to True in `PredictRequest.params` to receive empty + // results instead. Note that the API will never return items with + // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. Filter string `json:"filter,omitempty"` // Labels: The labels applied to a resource must meet the following @@ -3699,8 +3990,8 @@ type GoogleCloudRetailV2betaProduct struct { // Schema.org property Product.sku (https://schema.org/sku). Id string `json:"id,omitempty"` - // Images: Product images for the product.Highly recommended to put the - // main image to the first. A maximum of 300 images are allowed. + // Images: Product images for the product. We highly recommend putting + // the main image first. A maximum of 300 images are allowed. // Corresponding properties: Google Merchant Center property image_link // (https://support.google.com/merchants/answer/6324350). Schema.org // property Product.image (https://schema.org/image). @@ -4939,9 +5230,11 @@ type GoogleCloudRetailV2betaSearchRequest struct { // search products under the default branch. Branch string `json:"branch,omitempty"` - // CanonicalFilter: The filter applied to every search request when - // quality improvement such as query expansion is needed. For example, - // if a query does not have enough results, an expanded query with + // CanonicalFilter: The default filter that is applied when a user + // performs a search without checking any filters on the search page. + // The filter applied to every search request when quality improvement + // such as query expansion is needed. For example, if a query does not + // have enough results, an expanded query with // SearchRequest.canonical_filter will be returned as a supplement of // the original query. This field is strongly recommended to achieve // high search quality. See SearchRequest.filter for more details about @@ -6042,16 +6335,23 @@ type GoogleCloudRetailV2betaSetInventoryResponse struct { // with customers' website. type GoogleCloudRetailV2betaUserEvent struct { // Attributes: Extra user event features to include in the - // recommendation model. This field needs to pass all below criteria, - // otherwise an INVALID_ARGUMENT error is returned: * The key must be a - // UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendation, an example of extra user - // information is traffic_channel, i.e. how user arrives at the site. - // Users can arrive at the site by coming to the site directly, or - // coming through Google search, and etc. + // recommendation model. If you provide custom attributes for ingested + // user events, also include them in the user events that you associate + // with prediction requests. Custom attribute formatting must be + // consistent between imported events and events provided with + // prediction requests. This lets the Retail API use those custom + // attributes when training models and serving predictions, which helps + // improve recommendation quality. This field needs to pass all below + // criteria, otherwise an INVALID_ARGUMENT error is returned: * The key + // must be a UTF-8 encoded string with a length limit of 5,000 + // characters. * For text attributes, at most 400 values are allowed. + // Empty values are not allowed. Each value must be a UTF-8 encoded + // string with a length limit of 256 characters. * For number + // attributes, at most 400 values are allowed. For product + // recommendations, an example of extra user information is + // traffic_channel, which is how a user arrives at the site. Users can + // arrive at the site by coming to the site directly, coming through + // Google search, or in other ways. Attributes map[string]GoogleCloudRetailV2betaCustomAttribute `json:"attributes,omitempty"` // AttributionToken: Highly recommended for user events that are the @@ -6497,8 +6797,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -6677,8 +6976,8 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Query(query string) *Projec return c } -// VisitorId sets the optional parameter "visitorId": A unique -// identifier for tracking visitors. For example, this could be +// VisitorId sets the optional parameter "visitorId": Required field. A +// unique identifier for tracking visitors. For example, this could be // implemented with an HTTP cookie, which should be able to uniquely // identify a visitor on a single device. This unique identifier should // not change if the visitor logs in or out of the website. The field @@ -6833,7 +7132,7 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "visitorId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // } @@ -6998,33 +7297,32 @@ func (c *ProjectsLocationsCatalogsGetAttributesConfigCall) Do(opts ...googleapi. } -// method id "retail.projects.locations.catalogs.getDefaultBranch": +// method id "retail.projects.locations.catalogs.getCompletionConfig": -type ProjectsLocationsCatalogsGetDefaultBranchCall struct { +type ProjectsLocationsCatalogsGetCompletionConfigCall struct { s *Service - catalog string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDefaultBranch: Get which branch is currently default branch set by -// CatalogService.SetDefaultBranch method under a specified parent -// catalog. +// GetCompletionConfig: Gets a CompletionConfig. // -// - catalog: The parent catalog resource name, such as -// `projects/*/locations/global/catalogs/default_catalog`. -func (r *ProjectsLocationsCatalogsService) GetDefaultBranch(catalog string) *ProjectsLocationsCatalogsGetDefaultBranchCall { - c := &ProjectsLocationsCatalogsGetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.catalog = catalog +// - name: Full CompletionConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/completionConfig. +func (r *ProjectsLocationsCatalogsService) GetCompletionConfig(name string) *ProjectsLocationsCatalogsGetCompletionConfigCall { + c := &ProjectsLocationsCatalogsGetCompletionConfigCall{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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetCompletionConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7034,7 +7332,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetCompletionConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -7042,21 +7340,21 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetDefaultBranchCall { +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetCompletionConfigCall { 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 *ProjectsLocationsCatalogsGetDefaultBranchCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) 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_ { @@ -7069,7 +7367,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+catalog}:getDefaultBranch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7077,21 +7375,20 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "catalog": c.catalog, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.getDefaultBranch" call. -// Exactly one of *GoogleCloudRetailV2betaGetDefaultBranchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudRetailV2betaGetDefaultBranchResponse.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaGetDefaultBranchResponse, error) { +// Do executes the "retail.projects.locations.catalogs.getCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2betaCompletionConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaCompletionConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsGetCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaCompletionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7110,7 +7407,7 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2betaGetDefaultBranchResponse{ + ret := &GoogleCloudRetailV2betaCompletionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7122,25 +7419,25 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", - // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", + // "description": "Gets a CompletionConfig.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", // "httpMethod": "GET", - // "id": "retail.projects.locations.catalogs.getDefaultBranch", + // "id": "retail.projects.locations.catalogs.getCompletionConfig", // "parameterOrder": [ - // "catalog" + // "name" // ], // "parameters": { - // "catalog": { - // "description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "name": { + // "description": "Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v2beta/{+catalog}:getDefaultBranch", + // "path": "v2beta/{+name}", // "response": { - // "$ref": "GoogleCloudRetailV2betaGetDefaultBranchResponse" + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7149,53 +7446,33 @@ func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.Cal } -// method id "retail.projects.locations.catalogs.list": +// method id "retail.projects.locations.catalogs.getDefaultBranch": -type ProjectsLocationsCatalogsListCall struct { +type ProjectsLocationsCatalogsGetDefaultBranchCall struct { s *Service - parent string + catalog string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the Catalogs associated with the project. +// GetDefaultBranch: Get which branch is currently default branch set by +// CatalogService.SetDefaultBranch method under a specified parent +// catalog. // -// - parent: The account resource name with an associated location. If -// the caller does not have permission to list Catalogs under this -// location, regardless of whether or not this location exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall { - c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// Catalogs to return. If unspecified, defaults to 50. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListCatalogsResponse.next_page_token, received from a previous -// CatalogService.ListCatalogs call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// CatalogService.ListCatalogs must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - catalog: The parent catalog resource name, such as +// `projects/*/locations/global/catalogs/default_catalog`. +func (r *ProjectsLocationsCatalogsService) GetDefaultBranch(catalog string) *ProjectsLocationsCatalogsGetDefaultBranchCall { + c := &ProjectsLocationsCatalogsGetDefaultBranchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog 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 *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall { +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsGetDefaultBranchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7205,7 +7482,7 @@ func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *Projec // 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 *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall { +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsGetDefaultBranchCall { c.ifNoneMatch_ = entityTag return c } @@ -7213,21 +7490,21 @@ func (c *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *Proje // 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 *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall { +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsGetDefaultBranchCall { 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 *ProjectsLocationsCatalogsListCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) 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_ { @@ -7240,7 +7517,7 @@ func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/catalogs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+catalog}:getDefaultBranch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7248,16 +7525,187 @@ func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "catalog": c.catalog, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.list" call. -// Exactly one of *GoogleCloudRetailV2betaListCatalogsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "retail.projects.locations.catalogs.getDefaultBranch" call. +// Exactly one of *GoogleCloudRetailV2betaGetDefaultBranchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRetailV2betaListCatalogsResponse.ServerResponse.Header or +// *GoogleCloudRetailV2betaGetDefaultBranchResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCatalogsGetDefaultBranchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaGetDefaultBranchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaGetDefaultBranchResponse{ + 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": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", + // "httpMethod": "GET", + // "id": "retail.projects.locations.catalogs.getDefaultBranch", + // "parameterOrder": [ + // "catalog" + // ], + // "parameters": { + // "catalog": { + // "description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+catalog}:getDefaultBranch", + // "response": { + // "$ref": "GoogleCloudRetailV2betaGetDefaultBranchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.list": + +type ProjectsLocationsCatalogsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the Catalogs associated with the project. +// +// - parent: The account resource name with an associated location. If +// the caller does not have permission to list Catalogs under this +// location, regardless of whether or not this location exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall { + c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Catalogs to return. If unspecified, defaults to 50. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListCatalogsResponse.next_page_token, received from a previous +// CatalogService.ListCatalogs call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// CatalogService.ListCatalogs must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall { + 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 *ProjectsLocationsCatalogsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsListCall) 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, "v2beta/{+parent}/catalogs") + 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 "retail.projects.locations.catalogs.list" call. +// Exactly one of *GoogleCloudRetailV2betaListCatalogsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRetailV2betaListCatalogsResponse.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was @@ -7838,35 +8286,43 @@ func (c *ProjectsLocationsCatalogsUpdateAttributesConfigCall) Do(opts ...googlea } -// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": +// method id "retail.projects.locations.catalogs.updateCompletionConfig": -type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsUpdateCompletionConfigCall struct { + s *Service + name string + googlecloudretailv2betacompletionconfig *GoogleCloudRetailV2betaCompletionConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddCatalogAttribute: Adds the specified CatalogAttribute to the -// AttributesConfig. If the CatalogAttribute to add already exists, an -// ALREADY_EXISTS error is returned. +// UpdateCompletionConfig: Updates the CompletionConfigs. // -// - attributesConfig: Full AttributesConfig resource name. Format: -// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ -// id}/attributesConfig. -func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { - c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.attributesConfig = attributesConfig - c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest +// - name: Immutable. Fully qualified name +// projects/*/locations/*/catalogs/*/completionConfig. +func (r *ProjectsLocationsCatalogsService) UpdateCompletionConfig(name string, googlecloudretailv2betacompletionconfig *GoogleCloudRetailV2betaCompletionConfig) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + c := &ProjectsLocationsCatalogsUpdateCompletionConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudretailv2betacompletionconfig = googlecloudretailv2betacompletionconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided CompletionConfig to update. The following are +// the only supported fields: * CompletionConfig.matching_order * +// CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length +// * CompletionConfig.auto_learning If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7874,21 +8330,21 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUpdateCompletionConfigCall { 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) 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_ { @@ -7896,35 +8352,35 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betaaddcatalogattributerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2betacompletionconfig) 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, "v2beta/{+attributesConfig}:addCatalogAttribute") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "attributesConfig": c.attributesConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. -// Exactly one of *GoogleCloudRetailV2betaAttributesConfig or error will +// Do executes the "retail.projects.locations.catalogs.updateCompletionConfig" call. +// Exactly one of *GoogleCloudRetailV2betaCompletionConfig or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if +// *GoogleCloudRetailV2betaCompletionConfig.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, error) { +func (c *ProjectsLocationsCatalogsUpdateCompletionConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaCompletionConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7943,7 +8399,7 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRetailV2betaAttributesConfig{ + ret := &GoogleCloudRetailV2betaCompletionConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7955,28 +8411,34 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } return ret, nil // { - // "description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", - // "httpMethod": "POST", - // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", + // "description": "Updates the CompletionConfigs.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", + // "httpMethod": "PATCH", + // "id": "retail.projects.locations.catalogs.updateCompletionConfig", // "parameterOrder": [ - // "attributesConfig" + // "name" // ], // "parameters": { - // "attributesConfig": { - // "description": "Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig", + // "name": { + // "description": "Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/completionConfig", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v2beta/{+attributesConfig}:addCatalogAttribute", + // "path": "v2beta/{+name}", // "request": { - // "$ref": "GoogleCloudRetailV2betaAddCatalogAttributeRequest" + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" // }, // "response": { - // "$ref": "GoogleCloudRetailV2betaAttributesConfig" + // "$ref": "GoogleCloudRetailV2betaCompletionConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7985,18 +8447,165 @@ func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(op } -// method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": +// method id "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute": -type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { - s *Service - attributesConfig string - googlecloudretailv2betaremovecatalogattributerequest *GoogleCloudRetailV2betaRemoveCatalogAttributeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveCatalogAttribute: Removes the specified CatalogAttribute from +// AddCatalogAttribute: Adds the specified CatalogAttribute to the +// AttributesConfig. If the CatalogAttribute to add already exists, an +// ALREADY_EXISTS error is returned. +// +// - attributesConfig: Full AttributesConfig resource name. Format: +// projects/{project_number}/locations/{location_id}/catalogs/{catalog_ +// id}/attributesConfig. +func (r *ProjectsLocationsCatalogsAttributesConfigService) AddCatalogAttribute(attributesConfig string, googlecloudretailv2betaaddcatalogattributerequest *GoogleCloudRetailV2betaAddCatalogAttributeRequest) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + c := &ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.attributesConfig = attributesConfig + c.googlecloudretailv2betaaddcatalogattributerequest = googlecloudretailv2betaaddcatalogattributerequest + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall { + 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 *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) 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.googlecloudretailv2betaaddcatalogattributerequest) + 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, "v2beta/{+attributesConfig}:addCatalogAttribute") + 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{ + "attributesConfig": c.attributesConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute" call. +// Exactly one of *GoogleCloudRetailV2betaAttributesConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaAttributesConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsAttributesConfigAddCatalogAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaAttributesConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaAttributesConfig{ + 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 the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", + // "parameterOrder": [ + // "attributesConfig" + // ], + // "parameters": { + // "attributesConfig": { + // "description": "Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+attributesConfig}:addCatalogAttribute", + // "request": { + // "$ref": "GoogleCloudRetailV2betaAddCatalogAttributeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaAttributesConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute": + +type ProjectsLocationsCatalogsAttributesConfigRemoveCatalogAttributeCall struct { + s *Service + attributesConfig string + googlecloudretailv2betaremovecatalogattributerequest *GoogleCloudRetailV2betaRemoveCatalogAttributeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveCatalogAttribute: Removes the specified CatalogAttribute from // the AttributesConfig. If the CatalogAttribute to remove does not // exist, a NOT_FOUND error is returned. // @@ -9937,10 +10546,13 @@ type ProjectsLocationsCatalogsCompletionDataImportCall struct { } // Import: Bulk import of processed completion dataset. Request -// processing may be synchronous. Partial updating is not supported. -// This feature is only available for users who have Retail Search -// enabled. Please submit a form here (https://cloud.google.com/contact) -// to contact cloud sales if you are interested in using Retail Search. +// processing is asynchronous. Partial updating is not supported. The +// operation is successfully finished only after the imported +// suggestions are indexed successfully and ready for serving. The +// process takes hours. This feature is only available for users who +// have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. // // - parent: The catalog which the suggestions dataset belongs to. // Format: `projects/1234/locations/global/catalogs/default_catalog`. @@ -10042,7 +10654,7 @@ func (c *ProjectsLocationsCatalogsCompletionDataImportCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.completionData.import", @@ -11263,7 +11875,9 @@ type ProjectsLocationsCatalogsPlacementsPredictCall struct { // // - placement: Full resource name of the format: // {name=projects/*/locations/global/catalogs/default_catalog/placement -// s/*} The ID of the Recommendations AI placement. Before you can +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can // request predictions from your model, you must create at least one // placement for it. For more information, see Managing placements // (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -11377,7 +11991,7 @@ func (c *ProjectsLocationsCatalogsPlacementsPredictCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "placement": { - // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -11417,7 +12031,9 @@ type ProjectsLocationsCatalogsPlacementsSearchCall struct { // - placement: The resource name of the search engine placement, such // as // `projects/*/locations/global/catalogs/default_catalog/placements/def -// ault_search`. This field is used to identify the serving +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving // configuration name and the set of models that will be used to make // the search. func (r *ProjectsLocationsCatalogsPlacementsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsPlacementsSearchCall { @@ -11528,7 +12144,7 @@ func (c *ProjectsLocationsCatalogsPlacementsSearchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "placement": { - // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", // "required": true, @@ -12524,6 +13140,158 @@ func (c *ProjectsLocationsCatalogsServingConfigsPatchCall) Do(opts ...googleapi. } +// method id "retail.projects.locations.catalogs.servingConfigs.predict": + +type ProjectsLocationsCatalogsServingConfigsPredictCall struct { + s *Service + placement string + googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Makes a recommendation prediction. +// +// - placement: Full resource name of the format: +// {name=projects/*/locations/global/catalogs/default_catalog/placement +// s/*} or +// {name=projects/*/locations/global/catalogs/default_catalog/servingCo +// nfigs/*} The ID of the Recommendations AI placement. Before you can +// request predictions from your model, you must create at least one +// placement for it. For more information, see Managing placements +// (https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). +// The full list of available placements can be seen at +// https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements. +func (r *ProjectsLocationsCatalogsServingConfigsService) Predict(placement string, googlecloudretailv2betapredictrequest *GoogleCloudRetailV2betaPredictRequest) *ProjectsLocationsCatalogsServingConfigsPredictCall { + c := &ProjectsLocationsCatalogsServingConfigsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2betapredictrequest = googlecloudretailv2betapredictrequest + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsPredictCall { + 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 *ProjectsLocationsCatalogsServingConfigsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) 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.googlecloudretailv2betapredictrequest) + 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, "v2beta/{+placement}:predict") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.predict" call. +// Exactly one of *GoogleCloudRetailV2betaPredictResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaPredictResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaPredictResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaPredictResponse{ + 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": "Makes a recommendation prediction.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.predict", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} or {name=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+placement}:predict", + // "request": { + // "$ref": "GoogleCloudRetailV2betaPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.servingConfigs.removeControl": type ProjectsLocationsCatalogsServingConfigsRemoveControlCall struct { @@ -12671,6 +13439,180 @@ func (c *ProjectsLocationsCatalogsServingConfigsRemoveControlCall) Do(opts ...go } +// method id "retail.projects.locations.catalogs.servingConfigs.search": + +type ProjectsLocationsCatalogsServingConfigsSearchCall struct { + s *Service + placement string + googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. This feature is only available for users +// who have Retail Search enabled. Please submit a form here +// (https://cloud.google.com/contact) to contact cloud sales if you are +// interested in using Retail Search. +// +// - placement: The resource name of the search engine placement, such +// as +// `projects/*/locations/global/catalogs/default_catalog/placements/def +// ault_search` or +// `projects/*/locations/global/catalogs/default_catalog/servingConfigs +// /default_serving_config` This field is used to identify the serving +// configuration name and the set of models that will be used to make +// the search. +func (r *ProjectsLocationsCatalogsServingConfigsService) Search(placement string, googlecloudretailv2betasearchrequest *GoogleCloudRetailV2betaSearchRequest) *ProjectsLocationsCatalogsServingConfigsSearchCall { + c := &ProjectsLocationsCatalogsServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.placement = placement + c.googlecloudretailv2betasearchrequest = googlecloudretailv2betasearchrequest + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsServingConfigsSearchCall { + 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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) 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.googlecloudretailv2betasearchrequest) + 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, "v2beta/{+placement}:search") + 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{ + "placement": c.placement, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.servingConfigs.search" call. +// Exactly one of *GoogleCloudRetailV2betaSearchResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudRetailV2betaSearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCatalogsServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRetailV2betaSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRetailV2betaSearchResponse{ + 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": "Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.servingConfigs.search", + // "parameterOrder": [ + // "placement" + // ], + // "parameters": { + // "placement": { + // "description": "Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving configuration name and the set of models that will be used to make the search.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+placement}:search", + // "request": { + // "$ref": "GoogleCloudRetailV2betaSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRetailV2betaSearchResponse" + // }, + // "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 *ProjectsLocationsCatalogsServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRetailV2betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudretailv2betasearchrequest.PageToken = pt }(c.googlecloudretailv2betasearchrequest.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.googlecloudretailv2betasearchrequest.PageToken = x.NextPageToken + } +} + // method id "retail.projects.locations.catalogs.userEvents.collect": type ProjectsLocationsCatalogsUserEventsCollectCall struct { @@ -13166,14 +14108,15 @@ type ProjectsLocationsCatalogsUserEventsRejoinCall struct { header_ http.Header } -// Rejoin: Triggers a user event rejoin operation with latest product +// Rejoin: Starts a user event rejoin operation with latest product // catalog. Events will not be annotated with detailed product // information if product is missing from the catalog at the time the // user event is ingested, and these events are stored as unjoined -// events with a limited usage on training and serving. This API can be -// used to trigger a 'join' operation on specified events with latest +// events with a limited usage on training and serving. This method can +// be used to start a join operation on specified events with latest // version of product catalog. It can also be used to correct events -// joined with wrong product catalog. +// joined with the wrong product catalog. A rejoin operation can take +// hours or days to complete. // // - parent: The parent catalog resource name, such as // `projects/1234/locations/global/catalogs/default_catalog`. @@ -13275,7 +14218,7 @@ func (c *ProjectsLocationsCatalogsUserEventsRejoinCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.", + // "description": "Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", // "httpMethod": "POST", // "id": "retail.projects.locations.catalogs.userEvents.rejoin", diff --git a/run/v1/run-api.json b/run/v1/run-api.json index fc90f685e08..d3c6bd49558 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2261,7 +2261,7 @@ } } }, - "revision": "20220304", + "revision": "20220318", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -2826,7 +2826,7 @@ "id": "ExecutionSpec", "properties": { "parallelism": { - "description": "Optional. Specifies the maximum desired number of tasks the execution should run at any given time. Must be \u003c= task_count. The actual number of tasks running in steady state will be less than this number when ((.spec.task_count - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +optional", + "description": "Optional. Specifies the maximum desired number of tasks the execution should run at any given time. Must be \u003c= task_count. If not specified, defaults to -1. When the job is run, this field is passed to the execution, and if -1 it will be set to the maximum possible value. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism. +optional", "format": "int32", "type": "integer" }, diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index 49f8284ff06..2e3da2b24ad 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -1482,13 +1482,13 @@ func (s *ExecutionReference) MarshalJSON() ([]byte, error) { // ExecutionSpec: ExecutionSpec describes how the execution will look. type ExecutionSpec struct { // Parallelism: Optional. Specifies the maximum desired number of tasks - // the execution should run at any given time. Must be <= task_count. - // The actual number of tasks running in steady state will be less than - // this number when ((.spec.task_count - .status.successful) < - // .spec.parallelism), i.e. when the work left to do is less than max - // parallelism. More info: - // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - // +optional + // the execution should run at any given time. Must be <= task_count. If + // not specified, defaults to -1. When the job is run, this field is + // passed to the execution, and if -1 it will be set to the maximum + // possible value. The actual number of tasks running in steady state + // will be less than this number when there are fewer tasks waiting to + // be completed remaining, i.e. when the work left to do is less than + // max parallelism. +optional Parallelism int64 `json:"parallelism,omitempty"` // TaskCount: Optional. Specifies the desired number of tasks the diff --git a/run/v1alpha1/run-api.json b/run/v1alpha1/run-api.json index 939573a861c..d0a7bc28087 100644 --- a/run/v1alpha1/run-api.json +++ b/run/v1alpha1/run-api.json @@ -268,7 +268,7 @@ } } }, - "revision": "20220218", + "revision": "20220318", "rootUrl": "https://run.googleapis.com/", "schemas": { "ConfigMapEnvSource": { @@ -453,7 +453,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/run/v1alpha1/run-gen.go b/run/v1alpha1/run-gen.go index 7597235aa0b..06c739d4951 100644 --- a/run/v1alpha1/run-gen.go +++ b/run/v1alpha1/run-gen.go @@ -477,8 +477,7 @@ func (s *ContainerPort) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 2af259fff8b..dd2e78077bf 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -590,7 +590,7 @@ } } }, - "revision": "20220304", + "revision": "20220318", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1816,7 +1816,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 9badf158dfa..97295caa4f9 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -2102,8 +2102,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/runtimeconfig/v1/runtimeconfig-api.json b/runtimeconfig/v1/runtimeconfig-api.json index ed48c86a699..dc179154638 100644 --- a/runtimeconfig/v1/runtimeconfig-api.json +++ b/runtimeconfig/v1/runtimeconfig-api.json @@ -210,7 +210,7 @@ } } }, - "revision": "20210809", + "revision": "20220321", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -220,7 +220,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/runtimeconfig/v1/runtimeconfig-gen.go b/runtimeconfig/v1/runtimeconfig-gen.go index e676476f672..046f32815e0 100644 --- a/runtimeconfig/v1/runtimeconfig-gen.go +++ b/runtimeconfig/v1/runtimeconfig-gen.go @@ -163,8 +163,7 @@ type CancelOperationRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/runtimeconfig/v1beta1/runtimeconfig-api.json b/runtimeconfig/v1beta1/runtimeconfig-api.json index 17fb81d90da..1ece8c32a25 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -805,7 +805,7 @@ } } }, - "revision": "20211108", + "revision": "20220321", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "Binding": { @@ -847,7 +847,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/runtimeconfig/v1beta1/runtimeconfig-gen.go b/runtimeconfig/v1beta1/runtimeconfig-gen.go index 8a99fc80fb9..67f8259d85a 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -322,8 +322,7 @@ func (s *Cardinality) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/safebrowsing/v4/safebrowsing-api.json b/safebrowsing/v4/safebrowsing-api.json index c8869a9ccf8..67e578be9a5 100644 --- a/safebrowsing/v4/safebrowsing-api.json +++ b/safebrowsing/v4/safebrowsing-api.json @@ -261,11 +261,11 @@ } } }, - "revision": "20210604", + "revision": "20220323", "rootUrl": "https://safebrowsing.googleapis.com/", "schemas": { "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" @@ -396,7 +396,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -416,7 +417,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" } @@ -596,7 +598,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -616,7 +619,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" } @@ -926,7 +930,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -946,7 +951,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" }, @@ -1096,7 +1102,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -1116,7 +1123,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" }, @@ -1197,7 +1205,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -1217,7 +1226,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" } @@ -1309,7 +1319,8 @@ "SUSPICIOUS", "TRICK_TO_BILL", "HIGH_CONFIDENCE_ALLOWLIST", - "ACCURACY_TIPS" + "ACCURACY_TIPS", + "SOCIAL_ENGINEERING_LOWER_PRECISION" ], "enumDescriptions": [ "Unknown.", @@ -1329,7 +1340,8 @@ "Entities that are suspected to present a threat.", "Trick-to-bill threat list.", "Safe list to ship hashes of known safe URL expressions.", - "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips." + "List from the Jigsaw team to show accuracy tips in Chrome. See go/sb-accuracytips.", + "Lower precision phishing list for WebRisk. See go/lower-precision-blocklists-enterprise." ], "type": "string" } diff --git a/safebrowsing/v4/safebrowsing-gen.go b/safebrowsing/v4/safebrowsing-gen.go index 304857299aa..d9afe7dfa4f 100644 --- a/safebrowsing/v4/safebrowsing-gen.go +++ b/safebrowsing/v4/safebrowsing-gen.go @@ -210,8 +210,7 @@ type ThreatMatchesService struct { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -385,6 +384,8 @@ type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "Constraints") to @@ -601,6 +602,8 @@ type GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateRespons // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "Additions") to @@ -1130,6 +1133,8 @@ type GoogleSecuritySafebrowsingV4ThreatHit struct { // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatType string `json:"threatType,omitempty"` // UserInfo: Details about the user that encountered the threat. @@ -1305,6 +1310,8 @@ type GoogleSecuritySafebrowsingV4ThreatInfo struct { // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatTypes []string `json:"threatTypes,omitempty"` // ForceSendFields is a list of field names (e.g. "PlatformTypes") to @@ -1392,6 +1399,8 @@ type GoogleSecuritySafebrowsingV4ThreatListDescriptor struct { // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "PlatformType") to @@ -1488,6 +1497,8 @@ type GoogleSecuritySafebrowsingV4ThreatMatch struct { // safe URL expressions. // "ACCURACY_TIPS" - List from the Jigsaw team to show accuracy tips // in Chrome. See go/sb-accuracytips. + // "SOCIAL_ENGINEERING_LOWER_PRECISION" - Lower precision phishing + // list for WebRisk. See go/lower-precision-blocklists-enterprise. ThreatType string `json:"threatType,omitempty"` // ForceSendFields is a list of field names (e.g. "CacheDuration") to diff --git a/sasportal/v1alpha1/sasportal-api.json b/sasportal/v1alpha1/sasportal-api.json index fc8f029eab9..a29ad5665a6 100644 --- a/sasportal/v1alpha1/sasportal-api.json +++ b/sasportal/v1alpha1/sasportal-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20220224", + "revision": "20220319", "rootUrl": "https://sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2810,6 +2810,11 @@ "description": "Grant Id.", "type": "string" }, + "lastHeartbeatTransmitExpireTime": { + "description": "The transmit expiration time of the last heartbeat.", + "format": "google-datetime", + "type": "string" + }, "maxEirp": { "description": "Maximum Equivalent Isotropically Radiated Power (EIRP) permitted by the grant. The maximum EIRP is in units of dBm/MHz. The value of `maxEirp` represents the average (RMS) EIRP that would be measured by the procedure defined in FCC part 96.41(e)(3).", "format": "double", @@ -2924,7 +2929,7 @@ "type": "object" }, "SasPortalEmpty": { - "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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": "SasPortalEmpty", "properties": {}, "type": "object" @@ -3185,7 +3190,7 @@ "type": "object" }, "SasPortalNrqzValidation": { - "description": "Information about National Radio Quiet Zone validation. The presence of the field indicates the device has been validated.", + "description": "Information about National Radio Quiet Zone validation.", "id": "SasPortalNrqzValidation", "properties": { "caseId": { @@ -3205,6 +3210,20 @@ "description": "Device longitude associated with the validation.", "format": "double", "type": "number" + }, + "state": { + "description": "State of the NRQZ validation info.", + "enum": [ + "STATE_UNSPECIFIED", + "DRAFT", + "FINAL" + ], + "enumDescriptions": [ + "Unspecified state.", + "Draft state.", + "Final state." + ], + "type": "string" } }, "type": "object" diff --git a/sasportal/v1alpha1/sasportal-gen.go b/sasportal/v1alpha1/sasportal-gen.go index b03d2d3c055..a5e64ce8013 100644 --- a/sasportal/v1alpha1/sasportal-gen.go +++ b/sasportal/v1alpha1/sasportal-gen.go @@ -783,6 +783,10 @@ type SasPortalDeviceGrant struct { // GrantId: Grant Id. GrantId string `json:"grantId,omitempty"` + // LastHeartbeatTransmitExpireTime: The transmit expiration time of the + // last heartbeat. + LastHeartbeatTransmitExpireTime string `json:"lastHeartbeatTransmitExpireTime,omitempty"` + // MaxEirp: Maximum Equivalent Isotropically Radiated Power (EIRP) // permitted by the grant. The maximum EIRP is in units of dBm/MHz. The // value of `maxEirp` represents the average (RMS) EIRP that would be @@ -970,8 +974,7 @@ func (s *SasPortalDpaMoveList) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type SasPortalEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1501,8 +1504,7 @@ func (s *SasPortalNode) MarshalJSON() ([]byte, error) { } // SasPortalNrqzValidation: Information about National Radio Quiet Zone -// validation. The presence of the field indicates the device has been -// validated. +// validation. type SasPortalNrqzValidation struct { // CaseId: Validation case id. CaseId string `json:"caseId,omitempty"` @@ -1516,6 +1518,14 @@ type SasPortalNrqzValidation struct { // Longitude: Device longitude associated with the validation. Longitude float64 `json:"longitude,omitempty"` + // State: State of the NRQZ validation info. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "DRAFT" - Draft state. + // "FINAL" - Final state. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/script/v1/script-api.json b/script/v1/script-api.json index 812669517fe..87a5d34ea92 100644 --- a/script/v1/script-api.json +++ b/script/v1/script-api.json @@ -887,7 +887,7 @@ } } }, - "revision": "20211230", + "revision": "20220323", "rootUrl": "https://script.googleapis.com/", "schemas": { "Content": { @@ -975,7 +975,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/script/v1/script-gen.go b/script/v1/script-gen.go index c45637f7a37..2423825b4aa 100644 --- a/script/v1/script-gen.go +++ b/script/v1/script-gen.go @@ -422,8 +422,7 @@ func (s *DeploymentConfig) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index 71154ec0981..a725b718cc1 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -643,7 +643,7 @@ } } }, - "revision": "20220115", + "revision": "20220318", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -810,7 +810,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index a0dd002eb95..69b1b07d7ec 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -621,8 +621,7 @@ func (s *DisableSecretVersionRequest) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/secretmanager/v1beta1/secretmanager-api.json b/secretmanager/v1beta1/secretmanager-api.json index 518ad14d904..d0eb05ecff0 100644 --- a/secretmanager/v1beta1/secretmanager-api.json +++ b/secretmanager/v1beta1/secretmanager-api.json @@ -628,7 +628,7 @@ } } }, - "revision": "20211105", + "revision": "20220318", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -746,7 +746,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/secretmanager/v1beta1/secretmanager-gen.go b/secretmanager/v1beta1/secretmanager-gen.go index 28096af616b..ec5cca9c6f1 100644 --- a/secretmanager/v1beta1/secretmanager-gen.go +++ b/secretmanager/v1beta1/secretmanager-gen.go @@ -437,8 +437,7 @@ type DisableSecretVersionRequest struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 05eb7eb02b8..aae779f745c 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -218,7 +218,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -830,7 +830,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -1101,7 +1101,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -2194,7 +2194,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -2376,7 +2376,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -2988,7 +2988,7 @@ "type": "string" }, "startTime": { - "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", "format": "google-datetime", "location": "query", "type": "string" @@ -3058,7 +3058,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3419,7 +3419,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -3514,7 +3514,7 @@ "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" }, "mute": { - "description": "Indicates the mute state of a finding (either unspecified, muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", + "description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", "enum": [ "MUTE_UNSPECIFIED", "MUTED", @@ -3570,7 +3570,7 @@ "Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data, public SSH access with weak or no passwords, etc. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", "Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", "Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", - "Vulnerability: A low risk vulnerability hampers a security organization’s ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." + "Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." ], "type": "string" }, @@ -3670,7 +3670,7 @@ "type": "string" }, "filter": { - "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. Please see the proto documentation in the finding (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) and in the ListFindingsRequest for valid filter syntax. (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto).", + "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", "type": "string" }, "mostRecentEditor": { @@ -3825,7 +3825,7 @@ "type": "string" }, "projectDisplayName": { - "description": "The project id that the resource belongs to.", + "description": "The project ID that the resource belongs to.", "type": "string" }, "type": { @@ -4554,7 +4554,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -4585,7 +4586,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, @@ -4661,7 +4663,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -4692,7 +4695,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, @@ -4861,7 +4865,7 @@ "type": "string" }, "projectDisplayName": { - "description": "The project id that the resource belongs to.", + "description": "The project ID that the resource belongs to.", "type": "string" }, "projectName": { diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index af439bc2e09..6cf7868a6f8 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1025,8 +1025,7 @@ func (s *Cvssv3) UnmarshalJSON(data []byte) error { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1169,9 +1168,9 @@ type Finding struct { // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` - // Mute: Indicates the mute state of a finding (either unspecified, - // muted, unmuted or undefined). Unlike other attributes of a finding, a - // finding provider shouldn't set the value of mute. + // Mute: Indicates the mute state of a finding (either muted, unmuted or + // undefined). Unlike other attributes of a finding, a finding provider + // shouldn't set the value of mute. // // Possible values: // "MUTE_UNSPECIFIED" - Unspecified. @@ -1252,8 +1251,8 @@ type Finding struct { // to cause operational impact but may not access data or execute // unauthorized code. // "LOW" - Vulnerability: A low risk vulnerability hampers a security - // organization’s ability to detect vulnerabilities or active threats - // in their deployment, or prevents the root cause investigation of + // organization's ability to detect vulnerabilities or active threats in + // their deployment, or prevents the root cause investigation of // security issues. An example is monitoring and logs being disabled for // resource configurations and access. Threat: Indicates a threat that // has obtained minimal access to an environment but is not able to @@ -1469,11 +1468,7 @@ type GoogleCloudSecuritycenterV1BigQueryExport struct { // value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, // meaning substring matching, for strings. The supported value types // are: * string literals in quotes. * integer literals without quotes. - // * boolean literals `true` and `false` without quotes. Please see the - // proto documentation in the finding - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) - // and in the ListFindingsRequest for valid filter syntax. - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto). + // * boolean literals `true` and `false` without quotes. Filter string `json:"filter,omitempty"` // MostRecentEditor: Output only. Email address of the user who last @@ -1719,7 +1714,7 @@ type GoogleCloudSecuritycenterV1Resource struct { // to. Project string `json:"project,omitempty"` - // ProjectDisplayName: The project id that the resource belongs to. + // ProjectDisplayName: The project ID that the resource belongs to. ProjectDisplayName string `json:"projectDisplayName,omitempty"` // Type: The full resource type of the resource. @@ -2989,6 +2984,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3050,6 +3046,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -3407,7 +3404,7 @@ type Resource struct { // ParentName: The full resource name of resource's parent. ParentName string `json:"parentName,omitempty"` - // ProjectDisplayName: The project id that the resource belongs to. + // ProjectDisplayName: The project ID that the resource belongs to. ProjectDisplayName string `json:"projectDisplayName,omitempty"` // ProjectName: The full resource name of project that the resource @@ -4449,7 +4446,7 @@ func (r *FoldersAssetsService) UpdateSecurityMarks(name string, securitymarks *S // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *FoldersAssetsUpdateSecurityMarksCall) StartTime(startTime string) *FoldersAssetsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -4572,7 +4569,7 @@ func (c *FoldersAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" @@ -7548,7 +7545,7 @@ func (r *FoldersSourcesFindingsService) UpdateSecurityMarks(name string, securit // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *FoldersSourcesFindingsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -7671,7 +7668,7 @@ func (c *FoldersSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" @@ -8836,7 +8833,7 @@ func (r *OrganizationsAssetsService) UpdateSecurityMarks(name string, securityma // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *OrganizationsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsAssetsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -8959,7 +8956,7 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" @@ -14405,7 +14402,7 @@ func (r *OrganizationsSourcesFindingsService) UpdateSecurityMarks(name string, s // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *OrganizationsSourcesFindingsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -14528,7 +14525,7 @@ func (c *OrganizationsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googlea // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" @@ -15241,7 +15238,7 @@ func (r *ProjectsAssetsService) UpdateSecurityMarks(name string, securitymarks * // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *ProjectsAssetsUpdateSecurityMarksCall) StartTime(startTime string) *ProjectsAssetsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -15364,7 +15361,7 @@ func (c *ProjectsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" @@ -18340,7 +18337,7 @@ func (r *ProjectsSourcesFindingsService) UpdateSecurityMarks(name string, securi // StartTime sets the optional parameter "startTime": The time at which // the updated SecurityMarks take effect. If not set uses current server // time. Updates will be applied to the SecurityMarks that are active -// immediately preceding this time. Must be smaller or equal to the +// immediately preceding this time. Must be earlier or equal to the // server time. func (c *ProjectsSourcesFindingsUpdateSecurityMarksCall) StartTime(startTime string) *ProjectsSourcesFindingsUpdateSecurityMarksCall { c.urlParams_.Set("startTime", startTime) @@ -18463,7 +18460,7 @@ func (c *ProjectsSourcesFindingsUpdateSecurityMarksCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "startTime": { - // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be smaller or equal to the server time.", + // "description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", // "format": "google-datetime", // "location": "query", // "type": "string" diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 22db0e64b8a..cebbe082484 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1233,7 +1233,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -1328,7 +1328,7 @@ "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" }, "mute": { - "description": "Indicates the mute state of a finding (either unspecified, muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", + "description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", "enum": [ "MUTE_UNSPECIFIED", "MUTED", @@ -1384,7 +1384,7 @@ "Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data, public SSH access with weak or no passwords, etc. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", "Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", "Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", - "Vulnerability: A low risk vulnerability hampers a security organization’s ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." + "Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." ], "type": "string" }, @@ -1484,7 +1484,7 @@ "type": "string" }, "filter": { - "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. Please see the proto documentation in the finding (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) and in the ListFindingsRequest for valid filter syntax. (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto).", + "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", "type": "string" }, "mostRecentEditor": { @@ -1639,7 +1639,7 @@ "type": "string" }, "projectDisplayName": { - "description": "The project id that the resource belongs to.", + "description": "The project ID that the resource belongs to.", "type": "string" }, "type": { @@ -2337,7 +2337,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -2368,7 +2369,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, @@ -2444,7 +2446,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -2475,7 +2478,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 1b460e34c75..5a02538858d 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -716,8 +716,7 @@ func (s *Cvssv3) UnmarshalJSON(data []byte) error { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -860,9 +859,9 @@ type Finding struct { // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` - // Mute: Indicates the mute state of a finding (either unspecified, - // muted, unmuted or undefined). Unlike other attributes of a finding, a - // finding provider shouldn't set the value of mute. + // Mute: Indicates the mute state of a finding (either muted, unmuted or + // undefined). Unlike other attributes of a finding, a finding provider + // shouldn't set the value of mute. // // Possible values: // "MUTE_UNSPECIFIED" - Unspecified. @@ -943,8 +942,8 @@ type Finding struct { // to cause operational impact but may not access data or execute // unauthorized code. // "LOW" - Vulnerability: A low risk vulnerability hampers a security - // organization’s ability to detect vulnerabilities or active threats - // in their deployment, or prevents the root cause investigation of + // organization's ability to detect vulnerabilities or active threats in + // their deployment, or prevents the root cause investigation of // security issues. An example is monitoring and logs being disabled for // resource configurations and access. Threat: Indicates a threat that // has obtained minimal access to an environment but is not able to @@ -1156,11 +1155,7 @@ type GoogleCloudSecuritycenterV1BigQueryExport struct { // value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, // meaning substring matching, for strings. The supported value types // are: * string literals in quotes. * integer literals without quotes. - // * boolean literals `true` and `false` without quotes. Please see the - // proto documentation in the finding - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) - // and in the ListFindingsRequest for valid filter syntax. - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto). + // * boolean literals `true` and `false` without quotes. Filter string `json:"filter,omitempty"` // MostRecentEditor: Output only. Email address of the user who last @@ -1394,7 +1389,7 @@ type GoogleCloudSecuritycenterV1Resource struct { // to. Project string `json:"project,omitempty"` - // ProjectDisplayName: The project id that the resource belongs to. + // ProjectDisplayName: The project ID that the resource belongs to. ProjectDisplayName string `json:"projectDisplayName,omitempty"` // Type: The full resource type of the resource. @@ -2543,6 +2538,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -2604,6 +2600,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 3a61f3a3d2c..dabfd114ec2 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1592,7 +1592,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2006,7 +2006,7 @@ "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" }, "mute": { - "description": "Indicates the mute state of a finding (either unspecified, muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", + "description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", "enum": [ "MUTE_UNSPECIFIED", "MUTED", @@ -2062,7 +2062,7 @@ "Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data, public SSH access with weak or no passwords, etc. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", "Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", "Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", - "Vulnerability: A low risk vulnerability hampers a security organization’s ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." + "Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." ], "type": "string" }, @@ -2139,7 +2139,7 @@ "type": "string" }, "filter": { - "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. Please see the proto documentation in the finding (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) and in the ListFindingsRequest for valid filter syntax. (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto).", + "description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `\u003e`, `\u003c`, `\u003e=`, `\u003c=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", "type": "string" }, "mostRecentEditor": { @@ -2294,7 +2294,7 @@ "type": "string" }, "projectDisplayName": { - "description": "The project id that the resource belongs to.", + "description": "The project ID that the resource belongs to.", "type": "string" }, "type": { @@ -2662,7 +2662,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -2693,7 +2694,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, @@ -2769,7 +2771,8 @@ "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", "EXPLOIT_PUBLIC_FACING_APPLICATION", - "MODIFY_AUTHENTICATION_PROCESS" + "MODIFY_AUTHENTICATION_PROCESS", + "DATA_DESTRUCTION" ], "enumDescriptions": [ "Unspecified value.", @@ -2800,7 +2803,8 @@ "T1539", "T1578", "T1190", - "T1556" + "T1556", + "T1485" ], "type": "string" }, diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index e63ef47abca..da44407c30f 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -911,9 +911,9 @@ type Finding struct { // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` - // Mute: Indicates the mute state of a finding (either unspecified, - // muted, unmuted or undefined). Unlike other attributes of a finding, a - // finding provider shouldn't set the value of mute. + // Mute: Indicates the mute state of a finding (either muted, unmuted or + // undefined). Unlike other attributes of a finding, a finding provider + // shouldn't set the value of mute. // // Possible values: // "MUTE_UNSPECIFIED" - Unspecified. @@ -994,8 +994,8 @@ type Finding struct { // to cause operational impact but may not access data or execute // unauthorized code. // "LOW" - Vulnerability: A low risk vulnerability hampers a security - // organization’s ability to detect vulnerabilities or active threats - // in their deployment, or prevents the root cause investigation of + // organization's ability to detect vulnerabilities or active threats in + // their deployment, or prevents the root cause investigation of // security issues. An example is monitoring and logs being disabled for // resource configurations and access. Threat: Indicates a threat that // has obtained minimal access to an environment but is not able to @@ -1137,11 +1137,7 @@ type GoogleCloudSecuritycenterV1BigQueryExport struct { // value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, // meaning substring matching, for strings. The supported value types // are: * string literals in quotes. * integer literals without quotes. - // * boolean literals `true` and `false` without quotes. Please see the - // proto documentation in the finding - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/finding.proto) - // and in the ListFindingsRequest for valid filter syntax. - // (https://source.corp.google.com/piper///depot/google3/google/cloud/securitycenter/v1/securitycenter_service.proto). + // * boolean literals `true` and `false` without quotes. Filter string `json:"filter,omitempty"` // MostRecentEditor: Output only. Email address of the user who last @@ -1375,7 +1371,7 @@ type GoogleCloudSecuritycenterV1Resource struct { // to. Project string `json:"project,omitempty"` - // ProjectDisplayName: The project id that the resource belongs to. + // ProjectDisplayName: The project ID that the resource belongs to. ProjectDisplayName string `json:"projectDisplayName,omitempty"` // Type: The full resource type of the resource. @@ -1912,6 +1908,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -1973,6 +1970,7 @@ type MitreAttack struct { // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 + // "DATA_DESTRUCTION" - T1485 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index e053ab62a06..eaa96c97744 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20220128", + "revision": "20220321", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1049,7 +1049,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index a89bfbff3bf..fa840c23706 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -1272,8 +1272,7 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 27593b2ca60..76c49765047 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -500,7 +500,7 @@ } } }, - "revision": "20220128", + "revision": "20220321", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -919,7 +919,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 822de9fc6c8..dde66d95b16 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -1086,8 +1086,7 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { } diff --git a/servicecontrol/v1/servicecontrol-api.json b/servicecontrol/v1/servicecontrol-api.json index 8a675957893..35f801fc5a9 100644 --- a/servicecontrol/v1/servicecontrol-api.json +++ b/servicecontrol/v1/servicecontrol-api.json @@ -197,7 +197,7 @@ } } }, - "revision": "20220218", + "revision": "20220315", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "AllocateInfo": { @@ -332,6 +332,10 @@ "format": "int64", "type": "string" }, + "policyViolationInfo": { + "$ref": "PolicyViolationInfo", + "description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here." + }, "request": { "additionalProperties": { "description": "Properties of the object.", @@ -1252,6 +1256,39 @@ }, "type": "object" }, + "OrgPolicyViolationInfo": { + "description": "Represents OrgPolicy Violation information.", + "id": "OrgPolicyViolationInfo", + "properties": { + "payload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", + "type": "object" + }, + "resourceTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", + "type": "object" + }, + "resourceType": { + "description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket", + "type": "string" + }, + "violationInfo": { + "description": "Optional. Policy violations", + "items": { + "$ref": "ViolationInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "Peer": { "description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.", "id": "Peer", @@ -1283,6 +1320,17 @@ }, "type": "object" }, + "PolicyViolationInfo": { + "description": "Information related to policy violations for this request.", + "id": "PolicyViolationInfo", + "properties": { + "orgPolicyViolationInfo": { + "$ref": "OrgPolicyViolationInfo", + "description": "Indicates the orgpolicy violations for this resource." + } + }, + "type": "object" + }, "QuotaError": { "description": "Represents error information for QuotaOperation.", "id": "QuotaError", @@ -2057,6 +2105,41 @@ } }, "type": "object" + }, + "ViolationInfo": { + "description": "Provides information about the Policy violation info for this request.", + "id": "ViolationInfo", + "properties": { + "checkedValue": { + "description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types", + "type": "string" + }, + "constraint": { + "description": "Optional. Constraint name", + "type": "string" + }, + "errorMessage": { + "description": "Optional. Error message that policy is indicating.", + "type": "string" + }, + "policyType": { + "description": "Optional. Indicates the type of the policy.", + "enum": [ + "POLICY_TYPE_UNSPECIFIED", + "BOOLEAN_CONSTRAINT", + "LIST_CONSTRAINT", + "CUSTOM_CONSTRAINT" + ], + "enumDescriptions": [ + "Default value. This value should not be used.", + "Indicates boolean policy constraint", + "Indicates list policy constraint", + "Indicates custom policy constraint" + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index 229997db334..cbc26328bf8 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -372,6 +372,11 @@ type AuditLog struct { // API method, if applicable. NumResponseItems int64 `json:"numResponseItems,omitempty,string"` + // PolicyViolationInfo: Indicates the policy violations for this + // request. If the request is denied by the policy, violation + // information will be logged here. + PolicyViolationInfo *PolicyViolationInfo `json:"policyViolationInfo,omitempty"` + // Request: The operation request. This may not include all request // parameters, such as those that are too large, privacy-sensitive, or // duplicated elsewhere in the log record. It should never include @@ -1809,6 +1814,54 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OrgPolicyViolationInfo: Represents OrgPolicy Violation information. +type OrgPolicyViolationInfo struct { + // Payload: Optional. Resource payload that is currently in scope and is + // subjected to orgpolicy conditions. This payload may be the subset of + // the actual Resource that may come in the request. This payload should + // not contain any core content. + Payload googleapi.RawMessage `json:"payload,omitempty"` + + // ResourceTags: Optional. Tags referenced on the resource at the time + // of evaluation. These also include the federated tags, if they are + // supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. + // Optional field as of now. These tags are the Cloud tags that are + // available on the resource during the policy evaluation and will be + // available as part of the OrgPolicy check response for logging + // purposes. + ResourceTags map[string]string `json:"resourceTags,omitempty"` + + // ResourceType: Optional. Resource type that the orgpolicy is checked + // against. Example: compute.googleapis.com/Instance, + // store.googleapis.com/bucket + ResourceType string `json:"resourceType,omitempty"` + + // ViolationInfo: Optional. Policy violations + ViolationInfo []*ViolationInfo `json:"violationInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Payload") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Payload") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrgPolicyViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod OrgPolicyViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Peer: This message defines attributes for a node that handles a // network request. The node can be either a service or an application // that sends, forwards, or receives the request. Service peers should @@ -1857,6 +1910,38 @@ func (s *Peer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyViolationInfo: Information related to policy violations for +// this request. +type PolicyViolationInfo struct { + // OrgPolicyViolationInfo: Indicates the orgpolicy violations for this + // resource. + OrgPolicyViolationInfo *OrgPolicyViolationInfo `json:"orgPolicyViolationInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "OrgPolicyViolationInfo") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OrgPolicyViolationInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PolicyViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod PolicyViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QuotaError: Represents error information for QuotaOperation. type QuotaError struct { // Code: Error code. @@ -3140,6 +3225,53 @@ func (s *V1LogEntrySourceLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ViolationInfo: Provides information about the Policy violation info +// for this request. +type ViolationInfo struct { + // CheckedValue: Optional. Value that is being checked for the policy. + // This could be in encrypted form (if pii sensitive). This field will + // only be emitted in LIST_POLICY types + CheckedValue string `json:"checkedValue,omitempty"` + + // Constraint: Optional. Constraint name + Constraint string `json:"constraint,omitempty"` + + // ErrorMessage: Optional. Error message that policy is indicating. + ErrorMessage string `json:"errorMessage,omitempty"` + + // PolicyType: Optional. Indicates the type of the policy. + // + // Possible values: + // "POLICY_TYPE_UNSPECIFIED" - Default value. This value should not be + // used. + // "BOOLEAN_CONSTRAINT" - Indicates boolean policy constraint + // "LIST_CONSTRAINT" - Indicates list policy constraint + // "CUSTOM_CONSTRAINT" - Indicates custom policy constraint + PolicyType string `json:"policyType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CheckedValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CheckedValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "servicecontrol.services.allocateQuota": type ServicesAllocateQuotaCall struct { diff --git a/servicecontrol/v2/servicecontrol-api.json b/servicecontrol/v2/servicecontrol-api.json index 176b55f94d5..8000c8b2c96 100644 --- a/servicecontrol/v2/servicecontrol-api.json +++ b/servicecontrol/v2/servicecontrol-api.json @@ -111,7 +111,7 @@ "services": { "methods": { "check": { - "description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", + "description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", "flatPath": "v2/services/{serviceName}:check", "httpMethod": "POST", "id": "servicecontrol.services.check", @@ -139,7 +139,7 @@ ] }, "report": { - "description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", + "description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", "flatPath": "v2/services/{serviceName}:report", "httpMethod": "POST", "id": "servicecontrol.services.report", @@ -169,7 +169,7 @@ } } }, - "revision": "20220218", + "revision": "20220325", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "Api": { @@ -273,6 +273,10 @@ "format": "int64", "type": "string" }, + "policyViolationInfo": { + "$ref": "PolicyViolationInfo", + "description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here." + }, "request": { "additionalProperties": { "description": "Properties of the object.", @@ -465,7 +469,7 @@ }, "status": { "$ref": "Status", - "description": "Operation is allowed when this field is not set. Any non-'OK' status indicates a denial; [google.rpc.Status.details]() would contain additional details about the denial." + "description": "Operation is allowed when this field is not set. Any non-'OK' status indicates a denial; google.rpc.Status.details would contain additional details about the denial." } }, "type": "object" @@ -489,6 +493,39 @@ }, "type": "object" }, + "OrgPolicyViolationInfo": { + "description": "Represents OrgPolicy Violation information.", + "id": "OrgPolicyViolationInfo", + "properties": { + "payload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", + "type": "object" + }, + "resourceTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", + "type": "object" + }, + "resourceType": { + "description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket", + "type": "string" + }, + "violationInfo": { + "description": "Optional. Policy violations", + "items": { + "$ref": "ViolationInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "Peer": { "description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.", "id": "Peer", @@ -520,6 +557,17 @@ }, "type": "object" }, + "PolicyViolationInfo": { + "description": "Information related to policy violations for this request.", + "id": "PolicyViolationInfo", + "properties": { + "orgPolicyViolationInfo": { + "$ref": "OrgPolicyViolationInfo", + "description": "Indicates the orgpolicy violations for this resource." + } + }, + "type": "object" + }, "ReportRequest": { "description": "Request message for the Report method.", "id": "ReportRequest", @@ -1059,6 +1107,41 @@ } }, "type": "object" + }, + "ViolationInfo": { + "description": "Provides information about the Policy violation info for this request.", + "id": "ViolationInfo", + "properties": { + "checkedValue": { + "description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types", + "type": "string" + }, + "constraint": { + "description": "Optional. Constraint name", + "type": "string" + }, + "errorMessage": { + "description": "Optional. Error message that policy is indicating.", + "type": "string" + }, + "policyType": { + "description": "Optional. Indicates the type of the policy.", + "enum": [ + "POLICY_TYPE_UNSPECIFIED", + "BOOLEAN_CONSTRAINT", + "LIST_CONSTRAINT", + "CUSTOM_CONSTRAINT" + ], + "enumDescriptions": [ + "Default value. This value should not be used.", + "Indicates boolean policy constraint", + "Indicates list policy constraint", + "Indicates custom policy constraint" + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/servicecontrol/v2/servicecontrol-gen.go b/servicecontrol/v2/servicecontrol-gen.go index bb0094343b8..a6ef6efd564 100644 --- a/servicecontrol/v2/servicecontrol-gen.go +++ b/servicecontrol/v2/servicecontrol-gen.go @@ -297,6 +297,11 @@ type AuditLog struct { // API method, if applicable. NumResponseItems int64 `json:"numResponseItems,omitempty,string"` + // PolicyViolationInfo: Indicates the policy violations for this + // request. If the request is denied by the policy, violation + // information will be logged here. + PolicyViolationInfo *PolicyViolationInfo `json:"policyViolationInfo,omitempty"` + // Request: The operation request. This may not include all request // parameters, such as those that are too large, privacy-sensitive, or // duplicated elsewhere in the log record. It should never include @@ -605,7 +610,7 @@ type CheckResponse struct { Headers map[string]string `json:"headers,omitempty"` // Status: Operation is allowed when this field is not set. Any non-'OK' - // status indicates a denial; google.rpc.Status.details () would contain + // status indicates a denial; google.rpc.Status.details would contain // additional details about the denial. Status *Status `json:"status,omitempty"` @@ -669,6 +674,54 @@ func (s *FirstPartyPrincipal) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OrgPolicyViolationInfo: Represents OrgPolicy Violation information. +type OrgPolicyViolationInfo struct { + // Payload: Optional. Resource payload that is currently in scope and is + // subjected to orgpolicy conditions. This payload may be the subset of + // the actual Resource that may come in the request. This payload should + // not contain any core content. + Payload googleapi.RawMessage `json:"payload,omitempty"` + + // ResourceTags: Optional. Tags referenced on the resource at the time + // of evaluation. These also include the federated tags, if they are + // supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. + // Optional field as of now. These tags are the Cloud tags that are + // available on the resource during the policy evaluation and will be + // available as part of the OrgPolicy check response for logging + // purposes. + ResourceTags map[string]string `json:"resourceTags,omitempty"` + + // ResourceType: Optional. Resource type that the orgpolicy is checked + // against. Example: compute.googleapis.com/Instance, + // store.googleapis.com/bucket + ResourceType string `json:"resourceType,omitempty"` + + // ViolationInfo: Optional. Policy violations + ViolationInfo []*ViolationInfo `json:"violationInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Payload") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Payload") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrgPolicyViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod OrgPolicyViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Peer: This message defines attributes for a node that handles a // network request. The node can be either a service or an application // that sends, forwards, or receives the request. Service peers should @@ -717,6 +770,38 @@ func (s *Peer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyViolationInfo: Information related to policy violations for +// this request. +type PolicyViolationInfo struct { + // OrgPolicyViolationInfo: Indicates the orgpolicy violations for this + // resource. + OrgPolicyViolationInfo *OrgPolicyViolationInfo `json:"orgPolicyViolationInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "OrgPolicyViolationInfo") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OrgPolicyViolationInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PolicyViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod PolicyViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ReportRequest: Request message for the Report method. type ReportRequest struct { // Operations: Describes the list of operations to be reported. Each @@ -1570,6 +1655,53 @@ func (s *V2LogEntrySourceLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ViolationInfo: Provides information about the Policy violation info +// for this request. +type ViolationInfo struct { + // CheckedValue: Optional. Value that is being checked for the policy. + // This could be in encrypted form (if pii sensitive). This field will + // only be emitted in LIST_POLICY types + CheckedValue string `json:"checkedValue,omitempty"` + + // Constraint: Optional. Constraint name + Constraint string `json:"constraint,omitempty"` + + // ErrorMessage: Optional. Error message that policy is indicating. + ErrorMessage string `json:"errorMessage,omitempty"` + + // PolicyType: Optional. Indicates the type of the policy. + // + // Possible values: + // "POLICY_TYPE_UNSPECIFIED" - Default value. This value should not be + // used. + // "BOOLEAN_CONSTRAINT" - Indicates boolean policy constraint + // "LIST_CONSTRAINT" - Indicates list policy constraint + // "CUSTOM_CONSTRAINT" - Indicates custom policy constraint + PolicyType string `json:"policyType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CheckedValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CheckedValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ViolationInfo) MarshalJSON() ([]byte, error) { + type NoMethod ViolationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "servicecontrol.services.check": type ServicesCheckCall struct { @@ -1583,18 +1715,20 @@ type ServicesCheckCall struct { // Check: Private Preview. This feature is only available for approved // services. This method provides admission control for services that -// are integrated with Service Infrastructure (/service-infrastructure). -// It checks whether an operation should be allowed based on the service -// configuration and relevant policies. It must be called before the -// operation is executed. For more information, see Admission Control -// (/service-infrastructure/docs/admission-control). NOTE: The admission -// control has an expected policy propagation delay of 60s. The caller -// **must** not depend on the most recent policy changes. NOTE: The -// admission control has a hard limit of 1 referenced resources per -// call. If an operation refers to more than 1 resources, the caller -// must call the Check method multiple times. This method requires the -// `servicemanagement.services.check` permission on the specified -// service. For more information, see Service Control API Access Control +// are integrated with Service Infrastructure +// (https://cloud.google.com/service-infrastructure). It checks whether +// an operation should be allowed based on the service configuration and +// relevant policies. It must be called before the operation is +// executed. For more information, see Admission Control +// (https://cloud.google.com/service-infrastructure/docs/admission-control). +// NOTE: The admission control has an expected policy propagation delay +// of 60s. The caller **must** not depend on the most recent policy +// changes. NOTE: The admission control has a hard limit of 1 referenced +// resources per call. If an operation refers to more than 1 resources, +// the caller must call the Check method multiple times. This method +// requires the `servicemanagement.services.check` permission on the +// specified service. For more information, see Service Control API +// Access Control // (https://cloud.google.com/service-infrastructure/docs/service-control/access-control). // // - serviceName: The service name as specified in its service @@ -1700,7 +1834,7 @@ func (c *ServicesCheckCall) Do(opts ...googleapi.CallOption) (*CheckResponse, er } return ret, nil // { - // "description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", + // "description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", // "flatPath": "v2/services/{serviceName}:check", // "httpMethod": "POST", // "id": "servicecontrol.services.check", @@ -1743,14 +1877,15 @@ type ServicesReportCall struct { // Report: Private Preview. This feature is only available for approved // services. This method provides telemetry reporting for services that -// are integrated with Service Infrastructure (/service-infrastructure). -// It reports a list of operations that have occurred on a service. It -// must be called after the operations have been executed. For more -// information, see Telemetry Reporting -// (/service-infrastructure/docs/telemetry-reporting). NOTE: The -// telemetry reporting has a hard limit of 1000 operations and 1MB per -// Report call. It is recommended to have no more than 100 operations -// per call. This method requires the +// are integrated with Service Infrastructure +// (https://cloud.google.com/service-infrastructure). It reports a list +// of operations that have occurred on a service. It must be called +// after the operations have been executed. For more information, see +// Telemetry Reporting +// (https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). +// NOTE: The telemetry reporting has a hard limit of 1000 operations and +// 1MB per Report call. It is recommended to have no more than 100 +// operations per call. This method requires the // `servicemanagement.services.report` permission on the specified // service. For more information, see Service Control API Access Control // (https://cloud.google.com/service-infrastructure/docs/service-control/access-control). @@ -1858,7 +1993,7 @@ func (c *ServicesReportCall) Do(opts ...googleapi.CallOption) (*ReportResponse, } return ret, nil // { - // "description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", + // "description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", // "flatPath": "v2/services/{serviceName}:report", // "httpMethod": "POST", // "id": "servicecontrol.services.report", diff --git a/servicedirectory/v1/servicedirectory-api.json b/servicedirectory/v1/servicedirectory-api.json index e00cf2ccaea..e056c77f559 100644 --- a/servicedirectory/v1/servicedirectory-api.json +++ b/servicedirectory/v1/servicedirectory-api.json @@ -883,7 +883,7 @@ } } }, - "revision": "20220111", + "revision": "20220325", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -909,7 +909,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/servicedirectory/v1/servicedirectory-gen.go b/servicedirectory/v1/servicedirectory-gen.go index a5a059fff58..d2432c02b5d 100644 --- a/servicedirectory/v1/servicedirectory-gen.go +++ b/servicedirectory/v1/servicedirectory-gen.go @@ -271,8 +271,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/servicedirectory/v1beta1/servicedirectory-api.json b/servicedirectory/v1beta1/servicedirectory-api.json index d9381a8b009..14a086c3f48 100644 --- a/servicedirectory/v1beta1/servicedirectory-api.json +++ b/servicedirectory/v1beta1/servicedirectory-api.json @@ -883,7 +883,7 @@ } } }, - "revision": "20211103", + "revision": "20220325", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -909,7 +909,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/servicedirectory/v1beta1/servicedirectory-gen.go b/servicedirectory/v1beta1/servicedirectory-gen.go index 5eddd1abdfc..c7c86bddfb9 100644 --- a/servicedirectory/v1beta1/servicedirectory-gen.go +++ b/servicedirectory/v1beta1/servicedirectory-gen.go @@ -271,8 +271,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index f3ab15448f0..dd689c962cf 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -860,7 +860,7 @@ } } }, - "revision": "20220129", + "revision": "20220321", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1640,7 +1640,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index f18a566626b..3611353461d 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -1796,8 +1796,7 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index d81bbd817ef..c61587f0e13 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20220129", + "revision": "20220321", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { @@ -1011,7 +1011,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index e20263d8cc7..0b13f588be3 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -1382,8 +1382,7 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 9ad96f3e679..02c6f7c3a62 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -959,7 +959,7 @@ } } }, - "revision": "20220129", + "revision": "20220321", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { @@ -1583,7 +1583,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index 2a389f5d790..935eb49e815 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -1477,8 +1477,7 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { } diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index d3fdd10c9b6..b8ce8a881de 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20220308", + "revision": "20220322", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -3147,6 +3147,7 @@ "DATA_EXECUTION_ERROR_CODE_UNSPECIFIED", "TIMED_OUT", "TOO_MANY_ROWS", + "TOO_MANY_COLUMNS", "TOO_MANY_CELLS", "ENGINE", "PARAMETER_INVALID", @@ -3167,6 +3168,7 @@ "Default value, do not use.", "The data execution timed out.", "The data execution returns more rows than the limit.", + "The data execution returns more columns than the limit.", "The data execution returns more cells than the limit.", "Error is received from the backend data execution engine (e.g. BigQuery). Check error_message for details.", "One or some of the provided data source parameters are invalid.", diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index 678b16b8ad6..abbdc3ed2cc 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -4052,6 +4052,8 @@ type DataExecutionStatus struct { // "TIMED_OUT" - The data execution timed out. // "TOO_MANY_ROWS" - The data execution returns more rows than the // limit. + // "TOO_MANY_COLUMNS" - The data execution returns more columns than + // the limit. // "TOO_MANY_CELLS" - The data execution returns more cells than the // limit. // "ENGINE" - Error is received from the backend data execution engine diff --git a/slides/v1/slides-api.json b/slides/v1/slides-api.json index 320f2f336f9..733a666b45a 100644 --- a/slides/v1/slides-api.json +++ b/slides/v1/slides-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20210820", + "revision": "20220322", "rootUrl": "https://slides.googleapis.com/", "schemas": { "AffineTransform": { @@ -2054,7 +2054,7 @@ "type": "string" }, "revisionId": { - "description": "The revision ID of the presentation containing this page. Can be used in update requests to assert that the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated; however, a changed ID can also be due to internal factors such as ID format changes.", + "description": "Output only. The revision ID of the presentation. Can be used in update requests to assert the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The revision ID is not a sequential number but an opaque string. The format of the revision ID might change over time. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated. However, a changed ID can also be due to internal factors such as ID format changes.", "type": "string" }, "slideProperties": { @@ -2372,7 +2372,7 @@ "type": "string" }, "revisionId": { - "description": "The revision ID of the presentation. Can be used in update requests to assert that the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated; however, a changed ID can also be due to internal factors such as ID format changes.", + "description": "Output only. The revision ID of the presentation. Can be used in update requests to assert the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The revision ID is not a sequential number but a nebulous string. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated. However, a changed ID can also be due to internal factors such as ID format changes.", "type": "string" }, "slides": { @@ -4582,7 +4582,7 @@ "id": "WriteControl", "properties": { "requiredRevisionId": { - "description": "The revision ID of the presentation required for the write request. If specified and the `required_revision_id` doesn't exactly match the presentation's current `revision_id`, the request will not be processed and will return a 400 bad request error.", + "description": "The revision ID of the presentation required for the write request. If specified and the required revision ID doesn't match the presentation's current revision ID, the request is not processed and returns a 400 bad request error. When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.", "type": "string" } }, diff --git a/slides/v1/slides-gen.go b/slides/v1/slides-gen.go index 38e506e1f12..2edeef57f98 100644 --- a/slides/v1/slides-gen.go +++ b/slides/v1/slides-gen.go @@ -3108,18 +3108,18 @@ type Page struct { // "NOTES_MASTER" - A notes master page. PageType string `json:"pageType,omitempty"` - // RevisionId: The revision ID of the presentation containing this page. - // Can be used in update requests to assert that the presentation - // revision hasn't changed since the last read operation. Only populated - // if the user has edit access to the presentation. The format of the - // revision ID may change over time, so it should be treated opaquely. A - // returned revision ID is only guaranteed to be valid for 24 hours - // after it has been returned and cannot be shared across users. If the - // revision ID is unchanged between calls, then the presentation has not - // changed. Conversely, a changed ID (for the same presentation and - // user) usually means the presentation has been updated; however, a - // changed ID can also be due to internal factors such as ID format - // changes. + // RevisionId: Output only. The revision ID of the presentation. Can be + // used in update requests to assert the presentation revision hasn't + // changed since the last read operation. Only populated if the user has + // edit access to the presentation. The revision ID is not a sequential + // number but an opaque string. The format of the revision ID might + // change over time. A returned revision ID is only guaranteed to be + // valid for 24 hours after it has been returned and cannot be shared + // across users. If the revision ID is unchanged between calls, then the + // presentation has not changed. Conversely, a changed ID (for the same + // presentation and user) usually means the presentation has been + // updated. However, a changed ID can also be due to internal factors + // such as ID format changes. RevisionId string `json:"revisionId,omitempty"` // SlideProperties: Slide specific properties. Only set if page_type = @@ -3603,16 +3603,17 @@ type Presentation struct { // PresentationId: The ID of the presentation. PresentationId string `json:"presentationId,omitempty"` - // RevisionId: The revision ID of the presentation. Can be used in - // update requests to assert that the presentation revision hasn't + // RevisionId: Output only. The revision ID of the presentation. Can be + // used in update requests to assert the presentation revision hasn't // changed since the last read operation. Only populated if the user has - // edit access to the presentation. The format of the revision ID may + // edit access to the presentation. The revision ID is not a sequential + // number but a nebulous string. The format of the revision ID may // change over time, so it should be treated opaquely. A returned // revision ID is only guaranteed to be valid for 24 hours after it has // been returned and cannot be shared across users. If the revision ID // is unchanged between calls, then the presentation has not changed. // Conversely, a changed ID (for the same presentation and user) usually - // means the presentation has been updated; however, a changed ID can + // means the presentation has been updated. However, a changed ID can // also be due to internal factors such as ID format changes. RevisionId string `json:"revisionId,omitempty"` @@ -7132,10 +7133,11 @@ func (s *WordArt) MarshalJSON() ([]byte, error) { // WriteControl: Provides control over how write requests are executed. type WriteControl struct { // RequiredRevisionId: The revision ID of the presentation required for - // the write request. If specified and the `required_revision_id` - // doesn't exactly match the presentation's current `revision_id`, the - // request will not be processed and will return a 400 bad request - // error. + // the write request. If specified and the required revision ID doesn't + // match the presentation's current revision ID, the request is not + // processed and returns a 400 bad request error. When a required + // revision ID is returned in a response, it indicates the revision ID + // of the document after the request was applied. RequiredRevisionId string `json:"requiredRevisionId,omitempty"` // ForceSendFields is a list of field names (e.g. "RequiredRevisionId") diff --git a/sourcerepo/v1/sourcerepo-api.json b/sourcerepo/v1/sourcerepo-api.json index a67dc042807..8cd8823e106 100644 --- a/sourcerepo/v1/sourcerepo-api.json +++ b/sourcerepo/v1/sourcerepo-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20211206", + "revision": "20220319", "rootUrl": "https://sourcerepo.googleapis.com/", "schemas": { "AuditConfig": { @@ -524,7 +524,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/sourcerepo/v1/sourcerepo-gen.go b/sourcerepo/v1/sourcerepo-gen.go index cf57c0755bb..e091e4fe279 100644 --- a/sourcerepo/v1/sourcerepo-gen.go +++ b/sourcerepo/v1/sourcerepo-gen.go @@ -348,8 +348,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 106d842d738..ea9c5257b03 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -447,7 +447,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test) AND` \\ `(metadata.progress.start_time \u003c \\\"2022-01-18T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup of the copied backup name contains the string \"test\". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.database:test_db)) OR` \\ `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test_bkp)) AND` \\ `(error:*)` - Returns operations where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the database the backup was taken from has name containing string \"test_db\" * The operation's metadata type is CopyBackupMetadata AND the backup the backup was copied from has name containing string \"test_bkp\" * The operation resulted in an error.", "location": "query", "type": "string" }, @@ -483,6 +483,35 @@ }, "backups": { "methods": { + "copy": { + "description": "Starts copying a Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track copying of the backup. The operation is associated with the destination backup. The metadata field type is CopyBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups:copy", + "httpMethod": "POST", + "id": "spanner.projects.instances.backups.copy", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the destination instance that will contain the backup copy. Values are of the form: `projects//instances/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups:copy", + "request": { + "$ref": "CopyBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, "create": { "description": "Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups", @@ -2037,7 +2066,7 @@ } } }, - "revision": "20220212", + "revision": "20220326", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -2079,10 +2108,24 @@ "format": "google-datetime", "type": "string" }, + "maxExpireTime": { + "description": "Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.", "type": "string" }, + "referencingBackups": { + "description": "Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form `projects//instances//backups/`. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "referencingDatabases": { "description": "Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.", "items": { @@ -2329,6 +2372,81 @@ }, "type": "object" }, + "CopyBackupEncryptionConfig": { + "description": "Encryption configuration for the copied backup.", + "id": "CopyBackupEncryptionConfig", + "properties": { + "encryptionType": { + "description": "Required. The encryption type of the backup.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION", + "GOOGLE_DEFAULT_ENCRYPTION", + "CUSTOMER_MANAGED_ENCRYPTION" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "This is the default option for CopyBackup when encryption_config is not specified. For example, if the source backup is using `Customer_Managed_Encryption`, the backup will be using the same Cloud KMS key as the source backup.", + "Use Google default encryption.", + "Use customer managed encryption. If specified, `kms_key_name` must contain a valid Cloud KMS key." + ], + "type": "string" + }, + "kmsKeyName": { + "description": "Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", + "type": "string" + } + }, + "type": "object" + }, + "CopyBackupMetadata": { + "description": "Metadata type for the google.longrunning.Operation returned by CopyBackup.", + "id": "CopyBackupMetadata", + "properties": { + "cancelTime": { + "description": "The time at which cancellation of CopyBackup operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. 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`.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "The name of the backup being created through the copy operation. Values are of the form `projects//instances//backups/`.", + "type": "string" + }, + "progress": { + "$ref": "OperationProgress", + "description": "The progress of the CopyBackup operation." + }, + "sourceBackup": { + "description": "The name of the source backup that is being copied. Values are of the form `projects//instances//backups/`.", + "type": "string" + } + }, + "type": "object" + }, + "CopyBackupRequest": { + "description": "The request for CopyBackup.", + "id": "CopyBackupRequest", + "properties": { + "backupId": { + "description": "Required. The id of the backup copy. The `backup_id` appended to `parent` forms the full backup_uri of the form `projects//instances//backups/`.", + "type": "string" + }, + "encryptionConfig": { + "$ref": "CopyBackupEncryptionConfig", + "description": "Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the source backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`." + }, + "expireTime": { + "description": "Required. The expiration time of the backup in microsecond granularity. The expiration time must be at least 6 hours and at most 366 days from the `create_time` of the source backup. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.", + "format": "google-datetime", + "type": "string" + }, + "sourceBackup": { + "description": "Required. The source backup to be copied. The source backup needs to be in READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//backups/`.", + "type": "string" + } + }, + "type": "object" + }, "CreateBackupMetadata": { "description": "Metadata type for the operation returned by CreateBackup.", "id": "CreateBackupMetadata", @@ -2607,7 +2725,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -2879,6 +2997,12 @@ "description": "Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.", "type": "string" }, + "createTime": { + "description": "Output only. The time at which the instance was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "displayName": { "description": "Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.", "type": "string" @@ -2925,6 +3049,12 @@ ], "readOnly": true, "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which the instance was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -4344,7 +4474,7 @@ "type": "object" }, "TransactionOptions": { - "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. This transaction type provides guaranteed consistency across several reads, but does not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past. Snapshot read-only transactions do not need to be committed. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read/write data in a single database. They may, however, read/write data in different tables within that database. Locking Read-Write Transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying Aborted Transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle Transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot Read-Only Transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transaction, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.strong. Exact Staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded Staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. Partitioned DML Transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", + "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. This transaction type provides guaranteed consistency across several reads, but does not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past. Snapshot read-only transactions do not need to be committed. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", "id": "TransactionOptions", "properties": { "partitionedDml": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 0cc186e9e2c..855ac4b2d7b 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -327,6 +327,13 @@ type Backup struct { // resources used by the backup. ExpireTime string `json:"expireTime,omitempty"` + // MaxExpireTime: Output only. The max allowed expiration time of the + // backup, with microseconds granularity. A backup's expiration time can + // be configured in multiple APIs: CreateBackup, UpdateBackup, + // CopyBackup. When updating or copying an existing backup, the + // expiration time specified must be less than `Backup.max_expire_time`. + MaxExpireTime string `json:"maxExpireTime,omitempty"` + // Name: Output only for the CreateBackup operation. Required for the // UpdateBackup operation. A globally unique identifier for the backup // which cannot be changed. Values are of the form @@ -337,6 +344,15 @@ type Backup struct { // backup name of the form `projects//instances/`. Name string `json:"name,omitempty"` + // ReferencingBackups: Output only. The names of the destination backups + // being created by copying this source backup. The backup names are of + // the form `projects//instances//backups/`. Referencing backups may + // exist in different instances. The existence of any referencing backup + // prevents the backup from being deleted. When the copy operation is + // done (either successfully completed or cancelled or the destination + // backup is deleted), the reference to the backup is removed. + ReferencingBackups []string `json:"referencingBackups,omitempty"` + // ReferencingDatabases: Output only. The names of the restored // databases that reference the backup. The database names are of the // form `projects//instances//databases/`. Referencing databases may @@ -832,6 +848,153 @@ func (s *ContextValue) UnmarshalJSON(data []byte) error { return nil } +// CopyBackupEncryptionConfig: Encryption configuration for the copied +// backup. +type CopyBackupEncryptionConfig struct { + // EncryptionType: Required. The encryption type of the backup. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - Unspecified. Do not use. + // "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION" - This is the default + // option for CopyBackup when encryption_config is not specified. For + // example, if the source backup is using `Customer_Managed_Encryption`, + // the backup will be using the same Cloud KMS key as the source backup. + // "GOOGLE_DEFAULT_ENCRYPTION" - Use Google default encryption. + // "CUSTOMER_MANAGED_ENCRYPTION" - Use customer managed encryption. If + // specified, `kms_key_name` must contain a valid Cloud KMS key. + EncryptionType string `json:"encryptionType,omitempty"` + + // KmsKeyName: Optional. The Cloud KMS key that will be used to protect + // the backup. This field should be set only when encryption_type is + // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EncryptionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncryptionType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CopyBackupEncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod CopyBackupEncryptionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CopyBackupMetadata: Metadata type for the +// google.longrunning.Operation returned by CopyBackup. +type CopyBackupMetadata struct { + // CancelTime: The time at which cancellation of CopyBackup operation + // was received. Operations.CancelOperation starts asynchronous + // cancellation on a long-running operation. The server makes a best + // effort to cancel the operation, but success is not guaranteed. + // 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`. + CancelTime string `json:"cancelTime,omitempty"` + + // Name: The name of the backup being created through the copy + // operation. Values are of the form `projects//instances//backups/`. + Name string `json:"name,omitempty"` + + // Progress: The progress of the CopyBackup operation. + Progress *OperationProgress `json:"progress,omitempty"` + + // SourceBackup: The name of the source backup that is being copied. + // Values are of the form `projects//instances//backups/`. + SourceBackup string `json:"sourceBackup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CancelTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CancelTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CopyBackupMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CopyBackupMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CopyBackupRequest: The request for CopyBackup. +type CopyBackupRequest struct { + // BackupId: Required. The id of the backup copy. The `backup_id` + // appended to `parent` forms the full backup_uri of the form + // `projects//instances//backups/`. + BackupId string `json:"backupId,omitempty"` + + // EncryptionConfig: Optional. The encryption configuration used to + // encrypt the backup. If this field is not specified, the backup will + // use the same encryption configuration as the source backup by + // default, namely encryption_type = + // `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + EncryptionConfig *CopyBackupEncryptionConfig `json:"encryptionConfig,omitempty"` + + // ExpireTime: Required. The expiration time of the backup in + // microsecond granularity. The expiration time must be at least 6 hours + // and at most 366 days from the `create_time` of the source backup. + // Once the `expire_time` has passed, the backup is eligible to be + // automatically deleted by Cloud Spanner to free the resources used by + // the backup. + ExpireTime string `json:"expireTime,omitempty"` + + // SourceBackup: Required. The source backup to be copied. The source + // backup needs to be in READY state for it to be copied. Once + // CopyBackup is in progress, the source backup cannot be deleted or + // cleaned up on expiration until CopyBackup is finished. Values are of + // the form: `projects//instances//backups/`. + SourceBackup string `json:"sourceBackup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackupId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CopyBackupRequest) MarshalJSON() ([]byte, error) { + type NoMethod CopyBackupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateBackupMetadata: Metadata type for the operation returned by // CreateBackup. type CreateBackupMetadata struct { @@ -1295,8 +1458,7 @@ func (s *DiagnosticMessage) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1865,6 +2027,9 @@ type Instance struct { // and ListInstanceConfigs. Config string `json:"config,omitempty"` + // CreateTime: Output only. The time at which the instance was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The descriptive name for this instance as it // appears in UIs. Must be unique per project and between 4 and 30 // characters in length. @@ -1928,6 +2093,10 @@ type Instance struct { // as creating databases. State string `json:"state,omitempty"` + // UpdateTime: Output only. The time at which the instance was most + // recently updated. + UpdateTime string `json:"updateTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4647,7 +4816,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // use a transaction internally and do count towards the one transaction // limit). After the active transaction is completed, the session can // immediately be re-used for the next transaction. It is not necessary -// to create a new session for each transaction. Transaction Modes: +// to create a new session for each transaction. Transaction modes: // Cloud Spanner supports three transaction modes: 1. Locking // read-write. This type of transaction is the only way to write data // into Cloud Spanner. These transactions rely on pessimistic locking @@ -4666,9 +4835,9 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // almost always faster. In particular, read-only transactions do not // take locks, so they do not conflict with read-write transactions. As // a consequence of not taking locks, they also do not abort, so retry -// loops are not needed. Transactions may only read/write data in a -// single database. They may, however, read/write data in different -// tables within that database. Locking Read-Write Transactions: Locking +// loops are not needed. Transactions may only read-write data in a +// single database. They may, however, read-write data in different +// tables within that database. Locking read-write transactions: Locking // transactions may be used to atomically read-modify-write data // anywhere in a database. This type of transaction is externally // consistent. Clients should attempt to minimize the amount of time a @@ -4690,7 +4859,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // guarantees about how long the transaction's locks were held for. It // is an error to use Cloud Spanner locks for any sort of mutual // exclusion other than between Cloud Spanner transactions themselves. -// Retrying Aborted Transactions: When a transaction aborts, the +// Retrying aborted transactions: When a transaction aborts, the // application can choose to retry the whole transaction again. To // maximize the chances of successfully committing the retry, the client // should execute the retry in the same session as the original attempt. @@ -4701,7 +4870,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // transaction can abort many times in a short period before // successfully committing. Thus, it is not a good idea to cap the // number of retries a transaction can attempt; instead, it is better to -// limit the total amount of time spent retrying. Idle Transactions: A +// limit the total amount of time spent retrying. Idle transactions: A // transaction is considered idle if it has no outstanding reads or SQL // queries and has not started a read or SQL query within the last 10 // seconds. Idle transactions can be aborted by Cloud Spanner so that @@ -4709,7 +4878,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // aborted, the commit will fail with error `ABORTED`. If this behavior // is undesirable, periodically executing a simple SQL query in the // transaction (for example, `SELECT 1`) prevents the transaction from -// becoming idle. Snapshot Read-Only Transactions: Snapshot read-only +// becoming idle. Snapshot read-only transactions: Snapshot read-only // transactions provides a simpler method than locking read-write // transactions for doing several consistent reads. However, this type // of transaction does not support writes. Snapshot transactions do not @@ -4727,7 +4896,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // timestamp bound are: - Strong (the default). - Bounded staleness. - // Exact staleness. If the Cloud Spanner database to be read is // geographically distributed, stale read-only transactions can execute -// more quickly than strong or read-write transaction, because they are +// more quickly than strong or read-write transactions, because they are // able to execute far from the leader replica. Each type of timestamp // bound is discussed in detail below. Strong: Strong reads are // guaranteed to see the effects of all transactions that have committed @@ -4738,7 +4907,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // transactions might return inconsistent results if there are // concurrent writes. If consistency across reads is required, the reads // should be executed within a transaction or at an exact read -// timestamp. See TransactionOptions.ReadOnly.strong. Exact Staleness: +// timestamp. See TransactionOptions.ReadOnly.strong. Exact staleness: // These timestamp bounds execute reads at a user-specified timestamp. // Reads at a timestamp are guaranteed to see a consistent prefix of the // global transaction history: they observe modifications done by all @@ -4753,7 +4922,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // equivalent boundedly stale concurrency modes. On the other hand, // boundedly stale reads usually return fresher results. See // TransactionOptions.ReadOnly.read_timestamp and -// TransactionOptions.ReadOnly.exact_staleness. Bounded Staleness: +// TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: // Bounded staleness modes allow Cloud Spanner to pick the read // timestamp, subject to a user-provided staleness bound. Cloud Spanner // chooses the newest timestamp within the staleness bound that allows @@ -4773,8 +4942,8 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // requires up-front knowledge of which rows will be read, it can only // be used with single-use read-only transactions. See // TransactionOptions.ReadOnly.max_staleness and -// TransactionOptions.ReadOnly.min_read_timestamp. Old Read Timestamps -// and Garbage Collection: Cloud Spanner continuously garbage collects +// TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps +// and garbage collection: Cloud Spanner continuously garbage collects // deleted and overwritten data in the background to reclaim storage // space. This process is known as "version GC". By default, version GC // reclaims versions after they are one hour old. Because of this, Cloud @@ -4782,7 +4951,10 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // the past. This restriction also applies to in-progress reads and/or // SQL queries whose timestamp become too old while executing. Reads and // SQL queries with too-old read timestamps fail with the error -// `FAILED_PRECONDITION`. Partitioned DML Transactions: Partitioned DML +// `FAILED_PRECONDITION`. You can configure and extend the +// `VERSION_RETENTION_PERIOD` of a database up to a period as long as +// one week, which allows Cloud Spanner to perform reads up to one week +// in the past. Partitioned DML transactions: Partitioned DML // transactions are used to execute DML statements with a different // execution strategy that provides different, and often better, // scalability properties for large, table-wide operations than DML in a @@ -7006,7 +7178,24 @@ func (r *ProjectsInstancesBackupOperationsService) List(parent string) *Projects // `(error:*)` - Returns operations where: * The operation's metadata // type is CreateBackupMetadata. * The backup name contains the string // "howl". * The operation started before 2018-03-28T14:50:00Z. * The -// operation resulted in an error. +// operation resulted in an error. * +// `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1. +// CopyBackupMetadata) AND` \ `(metadata.source_backup:test) AND` \ +// `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ +// `(error:*)` - Returns operations where: * The operation's metadata +// type is CopyBackupMetadata. * The source backup of the copied backup +// name contains the string "test". * The operation started before +// 2022-01-18T14:50:00Z. * The operation resulted in an error. * +// `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1 +// .CreateBackupMetadata) AND` \ `(metadata.database:test_db)) OR` \ +// `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1 +// .CopyBackupMetadata) AND` \ `(metadata.source_backup:test_bkp)) AND` +// \ `(error:*)` - Returns operations where: * The operation's metadata +// matches either of criteria: * The operation's metadata type is +// CreateBackupMetadata AND the database the backup was taken from has +// name containing string "test_db" * The operation's metadata type is +// CopyBackupMetadata AND the backup the backup was copied from has name +// containing string "test_bkp" * The operation resulted in an error. func (c *ProjectsInstancesBackupOperationsListCall) Filter(filter string) *ProjectsInstancesBackupOperationsListCall { c.urlParams_.Set("filter", filter) return c @@ -7137,7 +7326,7 @@ func (c *ProjectsInstancesBackupOperationsListCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "filter": { - // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test) AND` \\ `(metadata.progress.start_time \u003c \\\"2022-01-18T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup of the copied backup name contains the string \"test\". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.database:test_db)) OR` \\ `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test_bkp)) AND` \\ `(error:*)` - Returns operations where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the database the backup was taken from has name containing string \"test_db\" * The operation's metadata type is CopyBackupMetadata AND the backup the backup was copied from has name containing string \"test_bkp\" * The operation resulted in an error.", // "location": "query", // "type": "string" // }, @@ -7193,6 +7382,157 @@ func (c *ProjectsInstancesBackupOperationsListCall) Pages(ctx context.Context, f } } +// method id "spanner.projects.instances.backups.copy": + +type ProjectsInstancesBackupsCopyCall struct { + s *Service + parent string + copybackuprequest *CopyBackupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Copy: Starts copying a Cloud Spanner Backup. The returned backup +// long-running operation will have a name of the format +// `projects//instances//backups//operations/` and can be used to track +// copying of the backup. The operation is associated with the +// destination backup. The metadata field type is CopyBackupMetadata. +// The response field type is Backup, if successful. Cancelling the +// returned operation will stop the copying and delete the backup. +// Concurrent CopyBackup requests can run on the same source backup. +// +// - parent: The name of the destination instance that will contain the +// backup copy. Values are of the form: `projects//instances/`. +func (r *ProjectsInstancesBackupsService) Copy(parent string, copybackuprequest *CopyBackupRequest) *ProjectsInstancesBackupsCopyCall { + c := &ProjectsInstancesBackupsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.copybackuprequest = copybackuprequest + 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 *ProjectsInstancesBackupsCopyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsCopyCall { + 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 *ProjectsInstancesBackupsCopyCall) Context(ctx context.Context) *ProjectsInstancesBackupsCopyCall { + 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 *ProjectsInstancesBackupsCopyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesBackupsCopyCall) 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.copybackuprequest) + 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}/backups:copy") + 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 "spanner.projects.instances.backups.copy" 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 *ProjectsInstancesBackupsCopyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Starts copying a Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track copying of the backup. The operation is associated with the destination backup. The metadata field type is CopyBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups:copy", + // "httpMethod": "POST", + // "id": "spanner.projects.instances.backups.copy", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the destination instance that will contain the backup copy. Values are of the form: `projects//instances/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups:copy", + // "request": { + // "$ref": "CopyBackupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.admin" + // ] + // } + +} + // method id "spanner.projects.instances.backups.create": type ProjectsInstancesBackupsCreateCall struct { diff --git a/speech/v1/speech-api.json b/speech/v1/speech-api.json index 4a851ae5757..c837dd166e2 100644 --- a/speech/v1/speech-api.json +++ b/speech/v1/speech-api.json @@ -524,7 +524,7 @@ } } }, - "revision": "20220221", + "revision": "20220310", "rootUrl": "https://speech.googleapis.com/", "schemas": { "ClassItem": { @@ -547,7 +547,7 @@ "description": "Required. The custom class to create." }, "customClassId": { - "description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", "type": "string" } }, @@ -562,7 +562,7 @@ "description": "Required. The phrase set to create." }, "phraseSetId": { - "description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", "type": "string" } }, diff --git a/speech/v1/speech-gen.go b/speech/v1/speech-gen.go index a2416e70701..67b7f85c6da 100644 --- a/speech/v1/speech-gen.go +++ b/speech/v1/speech-gen.go @@ -244,8 +244,9 @@ type CreateCustomClassRequest struct { // CustomClassId: Required. The ID to use for the custom class, which // will become the final component of the custom class' resource name. - // This value should be 4-63 characters, and valid characters are - // /a-z-/. + // This value should restrict to letters, numbers, and hyphens, with the + // first character a letter, the last a letter or a number, and be 4-63 + // characters. CustomClassId string `json:"customClassId,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomClass") to @@ -279,7 +280,9 @@ type CreatePhraseSetRequest struct { // PhraseSetId: Required. The ID to use for the phrase set, which will // become the final component of the phrase set's resource name. This - // value should be 4-63 characters, and valid characters are /a-z-/. + // value should restrict to letters, numbers, and hyphens, with the + // first character a letter, the last a letter or a number, and be 4-63 + // characters. PhraseSetId string `json:"phraseSetId,omitempty"` // ForceSendFields is a list of field names (e.g. "PhraseSet") to diff --git a/speech/v1p1beta1/speech-api.json b/speech/v1p1beta1/speech-api.json index bf4059cb300..6db55f929eb 100644 --- a/speech/v1p1beta1/speech-api.json +++ b/speech/v1p1beta1/speech-api.json @@ -524,7 +524,7 @@ } } }, - "revision": "20220221", + "revision": "20220310", "rootUrl": "https://speech.googleapis.com/", "schemas": { "ClassItem": { @@ -547,7 +547,7 @@ "description": "Required. The custom class to create." }, "customClassId": { - "description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", "type": "string" } }, @@ -562,7 +562,7 @@ "description": "Required. The phrase set to create." }, "phraseSetId": { - "description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", "type": "string" } }, diff --git a/speech/v1p1beta1/speech-gen.go b/speech/v1p1beta1/speech-gen.go index 8575c8de8b6..552df6012f5 100644 --- a/speech/v1p1beta1/speech-gen.go +++ b/speech/v1p1beta1/speech-gen.go @@ -244,8 +244,9 @@ type CreateCustomClassRequest struct { // CustomClassId: Required. The ID to use for the custom class, which // will become the final component of the custom class' resource name. - // This value should be 4-63 characters, and valid characters are - // /a-z-/. + // This value should restrict to letters, numbers, and hyphens, with the + // first character a letter, the last a letter or a number, and be 4-63 + // characters. CustomClassId string `json:"customClassId,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomClass") to @@ -279,7 +280,9 @@ type CreatePhraseSetRequest struct { // PhraseSetId: Required. The ID to use for the phrase set, which will // become the final component of the phrase set's resource name. This - // value should be 4-63 characters, and valid characters are /a-z-/. + // value should restrict to letters, numbers, and hyphens, with the + // first character a letter, the last a letter or a number, and be 4-63 + // characters. PhraseSetId string `json:"phraseSetId,omitempty"` // ForceSendFields is a list of field names (e.g. "PhraseSet") to diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 49aaa4c710b..f03e1029126 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220210", + "revision": "20220323", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2249,6 +2249,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2273,6 +2275,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -2427,6 +2431,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2451,6 +2457,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -2936,6 +2944,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2960,6 +2970,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -3845,6 +3857,10 @@ "description": "Disallow username as a part of the password.", "type": "boolean" }, + "enablePasswordPolicy": { + "description": "Whether the password policy is enabled or not.", + "type": "boolean" + }, "minLength": { "description": "Minimum number of characters allowed.", "format": "int32", @@ -4183,7 +4199,8 @@ "SQLSERVER_SERVERNAME_MISMATCH", "PRIMARY_ALREADY_SETUP", "UNSUPPORTED_BINLOG_FORMAT", - "BINLOG_RETENTION_SETTING" + "BINLOG_RETENTION_SETTING", + "UNSUPPORTED_STORAGE_ENGINE" ], "enumDescriptions": [ "", @@ -4211,7 +4228,8 @@ "SQL Server @@SERVERNAME does not match actual host name", "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", - "The primary instance's binary log retention setting." + "The primary instance's binary log retention setting.", + "The primary instance has tables with unsupported storage engine." ], "type": "string" } @@ -4377,6 +4395,16 @@ "kind": { "description": "This is always sql#sqlServerAuditConfig", "type": "string" + }, + "retentionInterval": { + "description": "How long to keep generated audit files.", + "format": "google-duration", + "type": "string" + }, + "uploadInterval": { + "description": "How often to upload generated audit files.", + "format": "google-duration", + "type": "string" } }, "type": "object" diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 2c0ffe47f13..ac0e4e54ec8 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -784,6 +784,10 @@ type ConnectSettings struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -1000,6 +1004,10 @@ type DatabaseInstance struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -1768,6 +1776,10 @@ type Flag struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -3189,6 +3201,9 @@ type PasswordValidationPolicy struct { // password. DisallowUsernameSubstring bool `json:"disallowUsernameSubstring,omitempty"` + // EnablePasswordPolicy: Whether the password policy is enabled or not. + EnablePasswordPolicy bool `json:"enablePasswordPolicy,omitempty"` + // MinLength: Minimum number of characters allowed. MinLength int64 `json:"minLength,omitempty"` @@ -3655,6 +3670,8 @@ type SqlExternalSyncSettingError struct { // binary log format. // "BINLOG_RETENTION_SETTING" - The primary instance's binary log // retention setting. + // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with + // unsupported storage engine. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -3933,6 +3950,12 @@ type SqlServerAuditConfig struct { // Kind: This is always sql#sqlServerAuditConfig Kind string `json:"kind,omitempty"` + // RetentionInterval: How long to keep generated audit files. + RetentionInterval string `json:"retentionInterval,omitempty"` + + // UploadInterval: How often to upload generated audit files. + UploadInterval string `json:"uploadInterval,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index f7fac14ce1e..53b6c8781d9 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -1877,7 +1877,7 @@ } } }, - "revision": "20220210", + "revision": "20220323", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2249,6 +2249,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2273,6 +2275,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -2427,6 +2431,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2451,6 +2457,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -2936,6 +2944,8 @@ "MYSQL_8_0", "MYSQL_8_0_18", "MYSQL_8_0_26", + "MYSQL_8_0_27", + "MYSQL_8_0_28", "POSTGRES_13", "POSTGRES_14", "SQLSERVER_2019_STANDARD", @@ -2960,6 +2970,8 @@ "The database version is MySQL 8.", "The database major version is MySQL 8.0 and the minor version is 18.", "The database major version is MySQL 8.0 and the minor version is 26.", + "The database major version is MySQL 8.0 and the minor version is 27.", + "The database major version is MySQL 8.0 and the minor version is 28.", "The database version is PostgreSQL 13.", "The database version is PostgreSQL 14.", "The database version is SQL Server 2019 Standard.", @@ -3845,6 +3857,10 @@ "description": "Disallow username as a part of the password.", "type": "boolean" }, + "enablePasswordPolicy": { + "description": "Whether the password policy is enabled or not.", + "type": "boolean" + }, "minLength": { "description": "Minimum number of characters allowed.", "format": "int32", @@ -4183,7 +4199,8 @@ "SQLSERVER_SERVERNAME_MISMATCH", "PRIMARY_ALREADY_SETUP", "UNSUPPORTED_BINLOG_FORMAT", - "BINLOG_RETENTION_SETTING" + "BINLOG_RETENTION_SETTING", + "UNSUPPORTED_STORAGE_ENGINE" ], "enumDescriptions": [ "", @@ -4211,7 +4228,8 @@ "SQL Server @@SERVERNAME does not match actual host name", "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", - "The primary instance's binary log retention setting." + "The primary instance's binary log retention setting.", + "The primary instance has tables with unsupported storage engine." ], "type": "string" } @@ -4375,6 +4393,16 @@ "kind": { "description": "This is always sql#sqlServerAuditConfig", "type": "string" + }, + "retentionInterval": { + "description": "How long to keep generated audit files.", + "format": "google-duration", + "type": "string" + }, + "uploadInterval": { + "description": "How often to upload generated audit files.", + "format": "google-duration", + "type": "string" } }, "type": "object" diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index adb871aa3b1..d10684298c2 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -784,6 +784,10 @@ type ConnectSettings struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -999,6 +1003,10 @@ type DatabaseInstance struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -1767,6 +1775,10 @@ type Flag struct { // minor version is 18. // "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the // minor version is 26. + // "MYSQL_8_0_27" - The database major version is MySQL 8.0 and the + // minor version is 27. + // "MYSQL_8_0_28" - The database major version is MySQL 8.0 and the + // minor version is 28. // "POSTGRES_13" - The database version is PostgreSQL 13. // "POSTGRES_14" - The database version is PostgreSQL 14. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 @@ -3189,6 +3201,9 @@ type PasswordValidationPolicy struct { // password. DisallowUsernameSubstring bool `json:"disallowUsernameSubstring,omitempty"` + // EnablePasswordPolicy: Whether the password policy is enabled or not. + EnablePasswordPolicy bool `json:"enablePasswordPolicy,omitempty"` + // MinLength: Minimum number of characters allowed. MinLength int64 `json:"minLength,omitempty"` @@ -3655,6 +3670,8 @@ type SqlExternalSyncSettingError struct { // binary log format. // "BINLOG_RETENTION_SETTING" - The primary instance's binary log // retention setting. + // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with + // unsupported storage engine. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -3929,6 +3946,12 @@ type SqlServerAuditConfig struct { // Kind: This is always sql#sqlServerAuditConfig Kind string `json:"kind,omitempty"` + // RetentionInterval: How long to keep generated audit files. + RetentionInterval string `json:"retentionInterval,omitempty"` + + // UploadInterval: How often to upload generated audit files. + UploadInterval string `json:"uploadInterval,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 998035f4341..6d7eccc43f2 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -11,7 +11,7 @@ "basePath": "", "baseUrl": "https://storagetransfer.googleapis.com/", "batchPath": "batch", - "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", + "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/storage-transfer/docs", "fullyEncodeReservedExpansion": true, @@ -600,7 +600,7 @@ } } }, - "revision": "20220303", + "revision": "20220324", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -752,7 +752,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" @@ -979,7 +979,7 @@ "type": "object" }, "MetadataOptions": { - "description": "Specifies the metadata options for running a transfer. These options only apply to transfers involving a POSIX filesystem and are ignored for other transfers.", + "description": "Specifies the metadata options for running a transfer.", "id": "MetadataOptions", "properties": { "acl": { @@ -997,7 +997,7 @@ "type": "string" }, "gid": { - "description": "Specifies how each file's POSIX group ID (GID) attribute should be handled by the transfer. By default, GID is not preserved.", + "description": "Specifies how each file's POSIX group ID (GID) attribute should be handled by the transfer. By default, GID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", "enum": [ "GID_UNSPECIFIED", "GID_SKIP", @@ -1025,7 +1025,7 @@ "type": "string" }, "mode": { - "description": "Specifies how each file's mode attribute should be handled by the transfer. By default, mode is not preserved.", + "description": "Specifies how each file's mode attribute should be handled by the transfer. By default, mode is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", "enum": [ "MODE_UNSPECIFIED", "MODE_SKIP", @@ -1061,7 +1061,7 @@ "type": "string" }, "symlink": { - "description": "Specifies how symlinks should be handled by the transfer. By default, symlinks are not preserved.", + "description": "Specifies how symlinks should be handled by the transfer. By default, symlinks are not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", "enum": [ "SYMLINK_UNSPECIFIED", "SYMLINK_SKIP", @@ -1103,7 +1103,7 @@ "type": "string" }, "uid": { - "description": "Specifies how each file's POSIX user ID (UID) attribute should be handled by the transfer. By default, UID is not preserved.", + "description": "Specifies how each file's POSIX user ID (UID) attribute should be handled by the transfer. By default, UID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", "enum": [ "UID_UNSPECIFIED", "UID_SKIP", @@ -1640,6 +1640,22 @@ "overwriteObjectsAlreadyExistingInSink": { "description": "When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.", "type": "boolean" + }, + "overwriteWhen": { + "description": "When to overwrite objects that already exist in the sink. If not set overwrite behavior is determined by overwrite_objects_already_existing_in_sink.", + "enum": [ + "OVERWRITE_WHEN_UNSPECIFIED", + "DIFFERENT", + "NEVER", + "ALWAYS" + ], + "enumDescriptions": [ + "Indicate the option is not set.", + "Overwrite destination object with source if the two objects are different.", + "Never overwrite destination object.", + "Always overwrite destination object." + ], + "type": "string" } }, "type": "object" diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 53a42e4e875..b4c9282fc53 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -507,8 +507,7 @@ func (s *Date) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -974,8 +973,7 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { } // MetadataOptions: Specifies the metadata options for running a -// transfer. These options only apply to transfers involving a POSIX -// filesystem and are ignored for other transfers. +// transfer. type MetadataOptions struct { // Acl: Specifies how each object's ACLs should be preserved for // transfers between Google Cloud Storage buckets. If unspecified, the @@ -993,7 +991,9 @@ type MetadataOptions struct { Acl string `json:"acl,omitempty"` // Gid: Specifies how each file's POSIX group ID (GID) attribute should - // be handled by the transfer. By default, GID is not preserved. + // be handled by the transfer. By default, GID is not preserved. Only + // applicable to transfers involving POSIX file systems, and ignored for + // other transfers. // // Possible values: // "GID_UNSPECIFIED" - GID behavior is unspecified. @@ -1017,7 +1017,9 @@ type MetadataOptions struct { KmsKey string `json:"kmsKey,omitempty"` // Mode: Specifies how each file's mode attribute should be handled by - // the transfer. By default, mode is not preserved. + // the transfer. By default, mode is not preserved. Only applicable to + // transfers involving POSIX file systems, and ignored for other + // transfers. // // Possible values: // "MODE_UNSPECIFIED" - Mode behavior is unspecified. @@ -1045,7 +1047,8 @@ type MetadataOptions struct { StorageClass string `json:"storageClass,omitempty"` // Symlink: Specifies how symlinks should be handled by the transfer. By - // default, symlinks are not preserved. + // default, symlinks are not preserved. Only applicable to transfers + // involving POSIX file systems, and ignored for other transfers. // // Possible values: // "SYMLINK_UNSPECIFIED" - Symlink behavior is unspecified. @@ -1082,7 +1085,9 @@ type MetadataOptions struct { TimeCreated string `json:"timeCreated,omitempty"` // Uid: Specifies how each file's POSIX user ID (UID) attribute should - // be handled by the transfer. By default, UID is not preserved. + // be handled by the transfer. By default, UID is not preserved. Only + // applicable to transfers involving POSIX file systems, and ignored for + // other transfers. // // Possible values: // "UID_UNSPECIFIED" - UID behavior is unspecified. @@ -1921,6 +1926,18 @@ type TransferOptions struct { // the source object. OverwriteObjectsAlreadyExistingInSink bool `json:"overwriteObjectsAlreadyExistingInSink,omitempty"` + // OverwriteWhen: When to overwrite objects that already exist in the + // sink. If not set overwrite behavior is determined by + // overwrite_objects_already_existing_in_sink. + // + // Possible values: + // "OVERWRITE_WHEN_UNSPECIFIED" - Indicate the option is not set. + // "DIFFERENT" - Overwrite destination object with source if the two + // objects are different. + // "NEVER" - Never overwrite destination object. + // "ALWAYS" - Always overwrite destination object. + OverwriteWhen string `json:"overwriteWhen,omitempty"` + // ForceSendFields is a list of field names (e.g. // "DeleteObjectsFromSourceAfterTransfer") to unconditionally include in // API requests. By default, fields with empty or default values are diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index e338ae73bcb..46e44c888c9 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -375,7 +375,7 @@ } } }, - "revision": "20220118", + "revision": "20220321", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -460,7 +460,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index a6860595e4d..62defd221d7 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -352,8 +352,7 @@ func (s *Connection) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index 65176bc5ff5..3e8b27af7a7 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -282,7 +282,7 @@ } } }, - "revision": "20220308", + "revision": "20220310", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -572,6 +572,16 @@ "description": "The java package for the application under test. The default value is determined by examining the application's manifest.", "type": "string" }, + "maxDepth": { + "description": "The max depth of the traversal stack Robo can explore. Needs to be at least 2 to make Robo explore the app beyond the first activity. Default is 50.", + "format": "int32", + "type": "integer" + }, + "maxSteps": { + "description": "The max number of steps Robo can execute. Default is no limit.", + "format": "int32", + "type": "integer" + }, "roboDirectives": { "description": "A set of directives Robo should apply during the crawl. This allows users to customize the crawl. For example, the username and password for a test account can be provided.", "items": { diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index 33d306139e1..f6d2d4889b0 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -581,6 +581,15 @@ type AndroidRoboTest struct { // default value is determined by examining the application's manifest. AppPackageId string `json:"appPackageId,omitempty"` + // MaxDepth: The max depth of the traversal stack Robo can explore. + // Needs to be at least 2 to make Robo explore the app beyond the first + // activity. Default is 50. + MaxDepth int64 `json:"maxDepth,omitempty"` + + // MaxSteps: The max number of steps Robo can execute. Default is no + // limit. + MaxSteps int64 `json:"maxSteps,omitempty"` + // RoboDirectives: A set of directives Robo should apply during the // crawl. This allows users to customize the crawl. For example, the // username and password for a test account can be provided. diff --git a/texttospeech/v1/texttospeech-api.json b/texttospeech/v1/texttospeech-api.json index af4d407b274..ff0f52ba8ee 100644 --- a/texttospeech/v1/texttospeech-api.json +++ b/texttospeech/v1/texttospeech-api.json @@ -153,7 +153,7 @@ } } }, - "revision": "20220103", + "revision": "20220311", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AudioConfig": { @@ -210,6 +210,31 @@ }, "type": "object" }, + "CustomVoiceParams": { + "description": "Description of the custom voice to be synthesized.", + "id": "CustomVoiceParams", + "properties": { + "model": { + "description": "Required. The name of the AutoML model that synthesizes the custom voice.", + "type": "string" + }, + "reportedUsage": { + "description": "Optional. The usage of the synthesized audio to be reported.", + "enum": [ + "REPORTED_USAGE_UNSPECIFIED", + "REALTIME", + "OFFLINE" + ], + "enumDescriptions": [ + "Request with reported usage unspecified will be rejected.", + "For scenarios where the synthesized audio is not downloadable and can only be used once. For example, real-time request in IVR system.", + "For scenarios where the synthesized audio is downloadable and can be reused. For example, the synthesized audio is downloaded, stored in customer service system and played repeatedly." + ], + "type": "string" + } + }, + "type": "object" + }, "ListVoicesResponse": { "description": "The message returned to the client by the `ListVoices` method.", "id": "ListVoicesResponse", @@ -313,6 +338,10 @@ "description": "Description of which voice to use for a synthesis request.", "id": "VoiceSelectionParams", "properties": { + "customVoice": { + "$ref": "CustomVoiceParams", + "description": "The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration." + }, "languageCode": { "description": "Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. \"en-US\". This should not include a script tag (e.g. use \"cmn-cn\" rather than \"cmn-Hant-cn\"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using \"nb\" (Norwegian Bokmal) instead of \"no\" (Norwegian)\".", "type": "string" diff --git a/texttospeech/v1/texttospeech-gen.go b/texttospeech/v1/texttospeech-gen.go index e77000b79b2..65b7a0f6442 100644 --- a/texttospeech/v1/texttospeech-gen.go +++ b/texttospeech/v1/texttospeech-gen.go @@ -266,6 +266,49 @@ func (s *AudioConfig) UnmarshalJSON(data []byte) error { return nil } +// CustomVoiceParams: Description of the custom voice to be synthesized. +type CustomVoiceParams struct { + // Model: Required. The name of the AutoML model that synthesizes the + // custom voice. + Model string `json:"model,omitempty"` + + // ReportedUsage: Optional. The usage of the synthesized audio to be + // reported. + // + // Possible values: + // "REPORTED_USAGE_UNSPECIFIED" - Request with reported usage + // unspecified will be rejected. + // "REALTIME" - For scenarios where the synthesized audio is not + // downloadable and can only be used once. For example, real-time + // request in IVR system. + // "OFFLINE" - For scenarios where the synthesized audio is + // downloadable and can be reused. For example, the synthesized audio is + // downloaded, stored in customer service system and played repeatedly. + ReportedUsage string `json:"reportedUsage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Model") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomVoiceParams) MarshalJSON() ([]byte, error) { + type NoMethod CustomVoiceParams + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListVoicesResponse: The message returned to the client by the // `ListVoices` method. type ListVoicesResponse struct { @@ -464,6 +507,11 @@ func (s *Voice) MarshalJSON() ([]byte, error) { // VoiceSelectionParams: Description of which voice to use for a // synthesis request. type VoiceSelectionParams struct { + // CustomVoice: The configuration for a custom voice. If + // [CustomVoiceParams.model] is set, the service will choose the custom + // voice matching the specified configuration. + CustomVoice *CustomVoiceParams `json:"customVoice,omitempty"` + // LanguageCode: Required. The language (and potentially also the // region) of the voice expressed as a BCP-47 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. @@ -502,7 +550,7 @@ type VoiceSelectionParams struct { // supported. SsmlGender string `json:"ssmlGender,omitempty"` - // ForceSendFields is a list of field names (e.g. "LanguageCode") to + // ForceSendFields is a list of field names (e.g. "CustomVoice") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -510,7 +558,7 @@ type VoiceSelectionParams struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LanguageCode") to include + // NullFields is a list of field names (e.g. "CustomVoice") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as diff --git a/vault/v1/vault-api.json b/vault/v1/vault-api.json index 6b09e49c4db..910d06cb0c5 100644 --- a/vault/v1/vault-api.json +++ b/vault/v1/vault-api.json @@ -1193,7 +1193,7 @@ } } }, - "revision": "20220222", + "revision": "20220316", "rootUrl": "https://vault.googleapis.com/", "schemas": { "AccountCount": { @@ -1547,7 +1547,7 @@ "type": "string" }, "name": { - "description": "The export name.", + "description": "The export name. Don't use special characters (~!$'(),;@:/?) in the name, they can prevent you from downloading exports.", "type": "string" }, "query": { @@ -1697,8 +1697,8 @@ ], "enumDescriptions": [ "No export format specified.", - "Export as MBOX.", - "Export as PST." + "Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", + "Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar." ], "type": "string" } @@ -1718,8 +1718,8 @@ ], "enumDescriptions": [ "No export format specified.", - "Export as MBOX.", - "Export as PST." + "Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", + "Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar." ], "type": "string" } @@ -1915,7 +1915,7 @@ "Drive, including Meet and Sites.", "For search, Gmail and classic Hangouts. For holds, Gmail only.", "Groups.", - "For search, Google Chat only. For holds, Google Chat and classic Hangouts.", + "For export, Google Chat only. For holds, Google Chat and classic Hangouts.", "Google Voice." ], "type": "string" @@ -2099,8 +2099,8 @@ ], "enumDescriptions": [ "No export format specified.", - "Export as MBOX.", - "Export as PST." + "Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", + "Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar." ], "type": "string" }, @@ -2262,7 +2262,7 @@ "Drive, including Meet and Sites.", "For search, Gmail and classic Hangouts. For holds, Gmail only.", "Groups.", - "For search, Google Chat only. For holds, Google Chat and classic Hangouts.", + "For export, Google Chat only. For holds, Google Chat and classic Hangouts.", "Google Voice." ], "type": "string" @@ -2553,8 +2553,8 @@ ], "enumDescriptions": [ "No export format specified.", - "Export as MBOX.", - "Export as PST." + "Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", + "Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar." ], "type": "string" } diff --git a/vault/v1/vault-gen.go b/vault/v1/vault-gen.go index d721c87182d..481481c7cfc 100644 --- a/vault/v1/vault-gen.go +++ b/vault/v1/vault-gen.go @@ -831,7 +831,8 @@ type Export struct { // MatterId: Output only. The matter ID. MatterId string `json:"matterId,omitempty"` - // Name: The export name. + // Name: The export name. Don't use special characters (~!$'(),;@:/?) in + // the name, they can prevent you from downloading exports. Name string `json:"name,omitempty"` // Query: The query parameters used to create the export. @@ -1019,8 +1020,10 @@ type GroupsExportOptions struct { // // Possible values: // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified. - // "MBOX" - Export as MBOX. - // "PST" - Export as PST. + // "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts + // and Voice. + // "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, + // Voice and Calendar. ExportFormat string `json:"exportFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "ExportFormat") to @@ -1052,8 +1055,10 @@ type HangoutsChatExportOptions struct { // // Possible values: // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified. - // "MBOX" - Export as MBOX. - // "PST" - Export as PST. + // "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts + // and Voice. + // "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, + // Voice and Calendar. ExportFormat string `json:"exportFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "ExportFormat") to @@ -1420,7 +1425,7 @@ type Hold struct { // "MAIL" - For search, Gmail and classic Hangouts. For holds, Gmail // only. // "GROUPS" - Groups. - // "HANGOUTS_CHAT" - For search, Google Chat only. For holds, Google + // "HANGOUTS_CHAT" - For export, Google Chat only. For holds, Google // Chat and classic Hangouts. // "VOICE" - Google Voice. Corpus string `json:"corpus,omitempty"` @@ -1739,8 +1744,10 @@ type MailExportOptions struct { // // Possible values: // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified. - // "MBOX" - Export as MBOX. - // "PST" - Export as PST. + // "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts + // and Voice. + // "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, + // Voice and Calendar. ExportFormat string `json:"exportFormat,omitempty"` // ShowConfidentialModeContent: To export confidential mode content, set @@ -2008,7 +2015,7 @@ type Query struct { // "MAIL" - For search, Gmail and classic Hangouts. For holds, Gmail // only. // "GROUPS" - Groups. - // "HANGOUTS_CHAT" - For search, Google Chat only. For holds, Google + // "HANGOUTS_CHAT" - For export, Google Chat only. For holds, Google // Chat and classic Hangouts. // "VOICE" - Google Voice. Corpus string `json:"corpus,omitempty"` @@ -2465,8 +2472,10 @@ type VoiceExportOptions struct { // // Possible values: // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified. - // "MBOX" - Export as MBOX. - // "PST" - Export as PST. + // "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts + // and Voice. + // "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, + // Voice and Calendar. ExportFormat string `json:"exportFormat,omitempty"` // ForceSendFields is a list of field names (e.g. "ExportFormat") to diff --git a/vision/v1/vision-api.json b/vision/v1/vision-api.json index 1847d620b64..19cb1dc10e3 100644 --- a/vision/v1/vision-api.json +++ b/vision/v1/vision-api.json @@ -1282,7 +1282,7 @@ } } }, - "revision": "20210809", + "revision": "20220319", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AddProductToProductSetRequest": { @@ -1891,7 +1891,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go index 036ad92a0a1..17a85685c35 100644 --- a/vision/v1/vision-gen.go +++ b/vision/v1/vision-gen.go @@ -1505,8 +1505,7 @@ func (s *DominantColorsAnnotation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/webrisk/v1/webrisk-api.json b/webrisk/v1/webrisk-api.json index 821e4f35d0a..73aa9755e92 100644 --- a/webrisk/v1/webrisk-api.json +++ b/webrisk/v1/webrisk-api.json @@ -446,7 +446,7 @@ } } }, - "revision": "20210806", + "revision": "20220319", "rootUrl": "https://webrisk.googleapis.com/", "schemas": { "GoogleCloudWebriskV1ComputeThreatListDiffResponse": { @@ -826,7 +826,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/webrisk/v1/webrisk-gen.go b/webrisk/v1/webrisk-gen.go index a7fd8ebc1e4..3e4950b1c4c 100644 --- a/webrisk/v1/webrisk-gen.go +++ b/webrisk/v1/webrisk-gen.go @@ -884,8 +884,7 @@ func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for -// `Empty` is empty JSON object `{}`. +// returns (google.protobuf.Empty); } type GoogleProtobufEmpty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/websecurityscanner/v1/websecurityscanner-api.json b/websecurityscanner/v1/websecurityscanner-api.json index 80f5248a3f3..2d3c40c410e 100644 --- a/websecurityscanner/v1/websecurityscanner-api.json +++ b/websecurityscanner/v1/websecurityscanner-api.json @@ -526,7 +526,7 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://websecurityscanner.googleapis.com/", "schemas": { "Authentication": { @@ -587,7 +587,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/websecurityscanner/v1/websecurityscanner-gen.go b/websecurityscanner/v1/websecurityscanner-gen.go index 32d3af9ece9..f3049ddbf9d 100644 --- a/websecurityscanner/v1/websecurityscanner-gen.go +++ b/websecurityscanner/v1/websecurityscanner-gen.go @@ -320,8 +320,7 @@ func (s *CustomAccount) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/websecurityscanner/v1alpha/websecurityscanner-api.json b/websecurityscanner/v1alpha/websecurityscanner-api.json index 4e1982aec8a..e720da80394 100644 --- a/websecurityscanner/v1alpha/websecurityscanner-api.json +++ b/websecurityscanner/v1alpha/websecurityscanner-api.json @@ -526,7 +526,7 @@ } } }, - "revision": "20210806", + "revision": "20220319", "rootUrl": "https://websecurityscanner.googleapis.com/", "schemas": { "Authentication": { @@ -583,7 +583,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/websecurityscanner/v1alpha/websecurityscanner-gen.go b/websecurityscanner/v1alpha/websecurityscanner-gen.go index 173c3efaacc..83c31eb9002 100644 --- a/websecurityscanner/v1alpha/websecurityscanner-gen.go +++ b/websecurityscanner/v1alpha/websecurityscanner-gen.go @@ -317,8 +317,7 @@ func (s *CustomAccount) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/websecurityscanner/v1beta/websecurityscanner-api.json b/websecurityscanner/v1beta/websecurityscanner-api.json index 64103db8597..a7a9436cea6 100644 --- a/websecurityscanner/v1beta/websecurityscanner-api.json +++ b/websecurityscanner/v1beta/websecurityscanner-api.json @@ -526,7 +526,7 @@ } } }, - "revision": "20211203", + "revision": "20220319", "rootUrl": "https://websecurityscanner.googleapis.com/", "schemas": { "Authentication": { @@ -587,7 +587,7 @@ "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/websecurityscanner/v1beta/websecurityscanner-gen.go b/websecurityscanner/v1beta/websecurityscanner-gen.go index e00229e98db..f8844c88930 100644 --- a/websecurityscanner/v1beta/websecurityscanner-gen.go +++ b/websecurityscanner/v1beta/websecurityscanner-gen.go @@ -319,8 +319,7 @@ func (s *CustomAccount) MarshalJSON() ([]byte, error) { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index a4dcac91f05..f34e725c05c 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -110,6 +110,36 @@ "locations": { "resources": { "workflows": { + "methods": { + "triggerPubsubExecution": { + "description": "Triggers a new execution using the latest revision of the given workflow by a Pub/Sub push notification.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:triggerPubsubExecution", + "httpMethod": "POST", + "id": "workflowexecutions.projects.locations.workflows.triggerPubsubExecution", + "parameterOrder": [ + "workflow" + ], + "parameters": { + "workflow": { + "description": "Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+workflow}:triggerPubsubExecution", + "request": { + "$ref": "TriggerPubsubExecutionRequest" + }, + "response": { + "$ref": "Execution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "executions": { "methods": { @@ -269,7 +299,7 @@ } } }, - "revision": "20211019", + "revision": "20220315", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "CancelExecutionRequest": { @@ -413,6 +443,38 @@ }, "type": "object" }, + "PubsubMessage": { + "description": "A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding [client library documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.", + "id": "PubsubMessage", + "properties": { + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.", + "type": "object" + }, + "data": { + "description": "The message data field. If this field is empty, the message must contain at least one attribute.", + "format": "byte", + "type": "string" + }, + "messageId": { + "description": "ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", + "type": "string" + }, + "orderingKey": { + "description": "If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value.", + "type": "string" + }, + "publishTime": { + "description": "The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "StackTrace": { "description": "A collection of stack elements (frames) where an error occurred.", "id": "StackTrace", @@ -445,6 +507,25 @@ } }, "type": "object" + }, + "TriggerPubsubExecutionRequest": { + "description": "Request for the TriggerPubsubExecution method.", + "id": "TriggerPubsubExecutionRequest", + "properties": { + "GCPCloudEventsMode": { + "description": "Required. LINT: LEGACY_NAMES The query parameter value for __GCP_CloudEventsMode, set by the Eventarc service when configuring triggers.", + "type": "string" + }, + "message": { + "$ref": "PubsubMessage", + "description": "Required. The message of the Pub/Sub push notification." + }, + "subscription": { + "description": "Required. The subscription of the Pub/Sub push notification. Format: projects/{project}/subscriptions/{sub}", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 080fa511dac..c449ee187b3 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -380,6 +380,69 @@ func (s *Position) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PubsubMessage: A message that is published by publishers and consumed +// by subscribers. The message must contain either a non-empty data +// field or at least one attribute. Note that client libraries represent +// this object differently depending on the language. See the +// corresponding client library documentation +// (https://cloud.google.com/pubsub/docs/reference/libraries) for more +// information. See [quotas and limits] +// (https://cloud.google.com/pubsub/quotas) for more information about +// message limits. +type PubsubMessage struct { + // Attributes: Attributes for this message. If this field is empty, the + // message must contain non-empty data. This can be used to filter + // messages on the subscription. + Attributes map[string]string `json:"attributes,omitempty"` + + // Data: The message data field. If this field is empty, the message + // must contain at least one attribute. + Data string `json:"data,omitempty"` + + // MessageId: ID of this message, assigned by the server when the + // message is published. Guaranteed to be unique within the topic. This + // value may be read by a subscriber that receives a `PubsubMessage` via + // a `Pull` call or a push delivery. It must not be populated by the + // publisher in a `Publish` call. + MessageId string `json:"messageId,omitempty"` + + // OrderingKey: If non-empty, identifies related messages for which + // publish order should be respected. If a `Subscription` has + // `enable_message_ordering` set to `true`, messages published with the + // same non-empty `ordering_key` value will be delivered to subscribers + // in the order in which they are received by the Pub/Sub system. All + // `PubsubMessage`s published in a given `PublishRequest` must specify + // the same `ordering_key` value. + OrderingKey string `json:"orderingKey,omitempty"` + + // PublishTime: The time at which the message was published, populated + // by the server when it receives the `Publish` call. It must not be + // populated by the publisher in a `Publish` call. + PublishTime string `json:"publishTime,omitempty"` + + // 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 *PubsubMessage) MarshalJSON() ([]byte, error) { + type NoMethod PubsubMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StackTrace: A collection of stack elements (frames) where an error // occurred. type StackTrace struct { @@ -444,6 +507,190 @@ func (s *StackTraceElement) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TriggerPubsubExecutionRequest: Request for the TriggerPubsubExecution +// method. +type TriggerPubsubExecutionRequest struct { + // GCPCloudEventsMode: Required. LINT: LEGACY_NAMES The query parameter + // value for __GCP_CloudEventsMode, set by the Eventarc service when + // configuring triggers. + GCPCloudEventsMode string `json:"GCPCloudEventsMode,omitempty"` + + // Message: Required. The message of the Pub/Sub push notification. + Message *PubsubMessage `json:"message,omitempty"` + + // Subscription: Required. The subscription of the Pub/Sub push + // notification. Format: projects/{project}/subscriptions/{sub} + Subscription string `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GCPCloudEventsMode") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GCPCloudEventsMode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TriggerPubsubExecutionRequest) MarshalJSON() ([]byte, error) { + type NoMethod TriggerPubsubExecutionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workflowexecutions.projects.locations.workflows.triggerPubsubExecution": + +type ProjectsLocationsWorkflowsTriggerPubsubExecutionCall struct { + s *Service + workflow string + triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TriggerPubsubExecution: Triggers a new execution using the latest +// revision of the given workflow by a Pub/Sub push notification. +// +// - workflow: Name of the workflow for which an execution should be +// created. Format: +// projects/{project}/locations/{location}/workflows/{workflow}. +func (r *ProjectsLocationsWorkflowsService) TriggerPubsubExecution(workflow string, triggerpubsubexecutionrequest *TriggerPubsubExecutionRequest) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall { + c := &ProjectsLocationsWorkflowsTriggerPubsubExecutionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.workflow = workflow + c.triggerpubsubexecutionrequest = triggerpubsubexecutionrequest + 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 *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall { + 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 *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall { + 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 *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) 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.triggerpubsubexecutionrequest) + 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/{+workflow}:triggerPubsubExecution") + 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{ + "workflow": c.workflow, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workflowexecutions.projects.locations.workflows.triggerPubsubExecution" 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 *ProjectsLocationsWorkflowsTriggerPubsubExecutionCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, 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": "Triggers a new execution using the latest revision of the given workflow by a Pub/Sub push notification.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:triggerPubsubExecution", + // "httpMethod": "POST", + // "id": "workflowexecutions.projects.locations.workflows.triggerPubsubExecution", + // "parameterOrder": [ + // "workflow" + // ], + // "parameters": { + // "workflow": { + // "description": "Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+workflow}:triggerPubsubExecution", + // "request": { + // "$ref": "TriggerPubsubExecutionRequest" + // }, + // "response": { + // "$ref": "Execution" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "workflowexecutions.projects.locations.workflows.executions.cancel": type ProjectsLocationsWorkflowsExecutionsCancelCall struct { diff --git a/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index b1770cac689..c6ae34a3ed9 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -444,11 +444,11 @@ } } }, - "revision": "20210728", + "revision": "20220323", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 48afa21ab34..60a20d30b80 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -186,8 +186,7 @@ type ProjectsLocationsWorkflowsService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server. diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 49d52886ec4..850a95d564e 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -3789,7 +3789,7 @@ } } }, - "revision": "20220312", + "revision": "20220321", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -5214,6 +5214,11 @@ "description": "Information specific to a store on a merchandising platform linked to a YouTube channel.", "id": "ChannelToStoreLinkDetails", "properties": { + "merchantId": { + "description": "Google Merchant Center id of the store.", + "format": "uint64", + "type": "string" + }, "storeName": { "description": "Name of the store.", "type": "string" diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 8a2a68c601f..faa841e13c7 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -2576,13 +2576,16 @@ func (s *ChannelStatus) MarshalJSON() ([]byte, error) { // ChannelToStoreLinkDetails: Information specific to a store on a // merchandising platform linked to a YouTube channel. type ChannelToStoreLinkDetails struct { + // MerchantId: Google Merchant Center id of the store. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // StoreName: Name of the store. StoreName string `json:"storeName,omitempty"` // StoreUrl: Landing page of the store. StoreUrl string `json:"storeUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "StoreName") to + // ForceSendFields is a list of field names (e.g. "MerchantId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2590,7 +2593,7 @@ 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. "StoreName") to include in + // 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 diff --git a/youtubereporting/v1/youtubereporting-api.json b/youtubereporting/v1/youtubereporting-api.json index 4237d11963f..10518deac8a 100644 --- a/youtubereporting/v1/youtubereporting-api.json +++ b/youtubereporting/v1/youtubereporting-api.json @@ -411,11 +411,11 @@ } } }, - "revision": "20200804", + "revision": "20220321", "rootUrl": "https://youtubereporting.googleapis.com/", "schemas": { "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "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" diff --git a/youtubereporting/v1/youtubereporting-gen.go b/youtubereporting/v1/youtubereporting-gen.go index f6de5ad8f91..067db30ce72 100644 --- a/youtubereporting/v1/youtubereporting-gen.go +++ b/youtubereporting/v1/youtubereporting-gen.go @@ -194,8 +194,7 @@ type ReportTypesService struct { // 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); } The JSON representation for `Empty` is -// empty JSON object `{}`. +// (google.protobuf.Empty); } type Empty struct { // ServerResponse contains the HTTP response code and headers from the // server.