diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 5604032c0d9..bf8b42c911b 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1265,7 +1265,7 @@ } } }, - "revision": "20251022", + "revision": "20251104", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -5445,7 +5445,8 @@ "REQUIRED_ACCOUNT_NOT_IN_ENTERPRISE", "NEW_ACCOUNT_NOT_IN_ENTERPRISE", "DEFAULT_APPLICATION_SETTING_UNSUPPORTED_SCOPES", - "DEFAULT_APPLICATION_SETTING_FAILED_FOR_SCOPE" + "DEFAULT_APPLICATION_SETTING_FAILED_FOR_SCOPE", + "PRIVATE_DNS_HOST_NOT_SERVING" ], "enumDescriptions": [ "Specific non-compliance reason is not specified. Fields in specific_non_compliance_context are not set.", @@ -5461,7 +5462,8 @@ "Work account required by the workAccountSetupConfig policy setting is not part of the enterprise anymore. nonComplianceReason is set to USER_ACTION.", "Work account added by the user is not part of the enterprise. nonComplianceReason is set to USER_ACTION.", "The default application setting is applied to the scopes that are not supported by the management mode, even if the management mode itself is supported for the app type (e.g., a policy with DEFAULT_BROWSER app type and SCOPE_PERSONAL_PROFILE list sent to a fully managed device results in the scopes being inapplicable for the management mode). If the management mode is not supported for the app type, a NonComplianceDetail with MANAGEMENT_MODE is reported, without a specificNonComplianceReason.nonComplianceReason is set to MANAGEMENT_MODE.", - "The default application setting failed to apply for a specific scope. defaultApplicationContext is set. nonComplianceReason is set to INVALID_VALUE or APP_NOT_INSTALLED." + "The default application setting failed to apply for a specific scope. defaultApplicationContext is set. nonComplianceReason is set to INVALID_VALUE or APP_NOT_INSTALLED.", + "The specified host for private DNS is a valid hostname but was found to not be a private DNS server. nonComplianceReason is set to INVALID_VALUE." ], "type": "string" } diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index ff26f55bfcf..7a8f4efb038 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -5514,6 +5514,9 @@ type NonComplianceDetail struct { // "DEFAULT_APPLICATION_SETTING_FAILED_FOR_SCOPE" - The default application // setting failed to apply for a specific scope. defaultApplicationContext is // set. nonComplianceReason is set to INVALID_VALUE or APP_NOT_INSTALLED. + // "PRIVATE_DNS_HOST_NOT_SERVING" - The specified host for private DNS is a + // valid hostname but was found to not be a private DNS server. + // nonComplianceReason is set to INVALID_VALUE. SpecificNonComplianceReason string `json:"specificNonComplianceReason,omitempty"` // ForceSendFields is a list of field names (e.g. "CurrentValue") to // unconditionally include in API requests. By default, fields with empty or diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index c7d764a2f76..15cdff9b3b7 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -1395,7 +1395,7 @@ } } }, - "revision": "20251028", + "revision": "20251104", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -2500,10 +2500,11 @@ "type": "object" }, "MediaPlanner": { - "description": "Describes a single Media Planner account.", + "description": "Represents a media planner account.", "id": "MediaPlanner", "properties": { "accountId": { + "deprecated": true, "description": "Output only. Account ID of the media planner.", "readOnly": true, "type": "string" diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index 9c3150ba6fe..517edb4ab68 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -1509,7 +1509,7 @@ func (s MarketplaceTargeting) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MediaPlanner: Describes a single Media Planner account. +// MediaPlanner: Represents a media planner account. type MediaPlanner struct { // AccountId: Output only. Account ID of the media planner. AccountId string `json:"accountId,omitempty"` diff --git a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json index dd0ac6d490b..c5182048a8b 100644 --- a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json @@ -1578,7 +1578,7 @@ } } }, - "revision": "20251028", + "revision": "20251104", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -2755,10 +2755,11 @@ "type": "object" }, "MediaPlanner": { - "description": "Describes a single Media Planner account.", + "description": "Represents a media planner account.", "id": "MediaPlanner", "properties": { "accountId": { + "deprecated": true, "description": "Output only. Account ID of the media planner.", "readOnly": true, "type": "string" diff --git a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go index 96b31a9fb59..1e8d1174b2d 100644 --- a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go @@ -1604,7 +1604,7 @@ func (s MarketplaceTargeting) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MediaPlanner: Describes a single Media Planner account. +// MediaPlanner: Represents a media planner account. type MediaPlanner struct { // AccountId: Output only. Account ID of the media planner. AccountId string `json:"accountId,omitempty"` diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index c9ff9329125..4af4e0cb059 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -2234,7 +2234,7 @@ } } }, - "revision": "20251022", + "revision": "20251029", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -5129,6 +5129,13 @@ "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" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 5691bbde2db..fa27098024b 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -3577,6 +3577,8 @@ type ListDataSourceReferencesResponse struct { // NextPageToken: A token, which can be sent as `page_token` to retrieve the // next page. If this field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` + // 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:"-"` diff --git a/calendar/v3/calendar-api.json b/calendar/v3/calendar-api.json index 479df5d28c9..57b432ece83 100644 --- a/calendar/v3/calendar-api.json +++ b/calendar/v3/calendar-api.json @@ -736,7 +736,7 @@ ] }, "insert": { - "description": "Creates a secondary calendar.", + "description": "Creates a secondary calendar.\nThe authenticated user for the request is made the data owner of the new calendar.\n\nNote: We recommend to authenticate as the intended data owner of the calendar. You can use domain-wide delegation of authority to allow applications to act on behalf of a specific user. Don't use a service account for authentication. If you use a service account for authentication, the service account is the data owner, which can lead to unexpected behavior. For example, if a service account is the data owner, data ownership cannot be transferred.", "httpMethod": "POST", "id": "calendar.calendars.insert", "path": "calendars", @@ -1890,7 +1890,7 @@ } } }, - "revision": "20250404", + "revision": "20251028", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { @@ -1945,7 +1945,7 @@ "calendar.acl.insert" ] }, - "description": "The role assigned to the scope. Possible values are: \n- \"none\" - Provides no access. \n- \"freeBusyReader\" - Provides read access to free/busy information. \n- \"reader\" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. Provides read access to the calendar's ACLs. \n- \"owner\" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to manipulate ACLs.", + "description": "The role assigned to the scope. Possible values are: \n- \"none\" - Provides no access. \n- \"freeBusyReader\" - Provides read access to free/busy information. \n- \"reader\" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. Provides read access to the calendar's ACLs. \n- \"owner\" - Provides manager access to the calendar. This role has all of the permissions of the writer role with the additional ability to modify access levels of other users.\nImportant: the owner role is different from the calendar's data owner. A calendar has a single data owner, but can have multiple users with owner role.", "type": "string" }, "scope": { @@ -1984,6 +1984,10 @@ "$ref": "ConferenceProperties", "description": "Conferencing properties for this calendar, for example what types of conferences are allowed." }, + "dataOwner": { + "description": "The email of the owner of the calendar. Set only for secondary calendars. Read-only.", + "type": "string" + }, "description": { "description": "Description of the calendar. Optional.", "type": "string" @@ -2055,7 +2059,7 @@ "id": "CalendarListEntry", "properties": { "accessRole": { - "description": "The effective access role that the authenticated user has on the calendar. Read-only. Possible values are: \n- \"freeBusyReader\" - Provides read access to free/busy information. \n- \"reader\" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. \n- \"owner\" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs.", + "description": "The effective access role that the authenticated user has on the calendar. Read-only. Possible values are: \n- \"freeBusyReader\" - Provides read access to free/busy information. \n- \"reader\" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. \n- \"owner\" - Provides manager access to the calendar. This role has all of the permissions of the writer role with the additional ability to see and modify access levels of other users.\nImportant: the owner role is different from the calendar's data owner. A calendar has a single data owner, but can have multiple users with owner role.", "type": "string" }, "backgroundColor": { @@ -2070,6 +2074,10 @@ "$ref": "ConferenceProperties", "description": "Conferencing properties for this calendar, for example what types of conferences are allowed." }, + "dataOwner": { + "description": "The email of the owner of the calendar. Set only for secondary calendars. Read-only.", + "type": "string" + }, "defaultReminders": { "description": "The default reminders that the authenticated user has for this calendar.", "items": { @@ -3015,7 +3023,7 @@ "id": "Events", "properties": { "accessRole": { - "description": "The user's access role for this calendar. Read-only. Possible values are: \n- \"none\" - The user has no access. \n- \"freeBusyReader\" - The user has read access to free/busy information. \n- \"reader\" - The user has read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - The user has read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. \n- \"owner\" - The user has ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs.", + "description": "The user's access role for this calendar. Read-only. Possible values are: \n- \"none\" - The user has no access. \n- \"freeBusyReader\" - The user has read access to free/busy information. \n- \"reader\" - The user has read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. \n- \"writer\" - The user has read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. \n- \"owner\" - The user has manager access to the calendar. This role has all of the permissions of the writer role with the additional ability to see and modify access levels of other users.\nImportant: the owner role is different from the calendar's data owner. A calendar has a single data owner, but can have multiple users with owner role.", "type": "string" }, "defaultReminders": { diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index 2bc09c1aabb..21620a49ae4 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -367,9 +367,12 @@ type AclRule struct { // - "writer" - Provides read and write access to the calendar. Private events // will appear to users with writer access, and event details will be visible. // Provides read access to the calendar's ACLs. - // - "owner" - Provides ownership of the calendar. This role has all of the - // permissions of the writer role with the additional ability to manipulate - // ACLs. + // - "owner" - Provides manager access to the calendar. This role has all of + // the permissions of the writer role with the additional ability to modify + // access levels of other users. + // Important: the owner role is different from the calendar's data owner. A + // calendar has a single data owner, but can have multiple users with owner + // role. Role string `json:"role,omitempty"` // Scope: The extent to which calendar access is granted by this ACL rule. Scope *AclRuleScope `json:"scope,omitempty"` @@ -429,6 +432,9 @@ type Calendar struct { // ConferenceProperties: Conferencing properties for this calendar, for example // what types of conferences are allowed. ConferenceProperties *ConferenceProperties `json:"conferenceProperties,omitempty"` + // DataOwner: The email of the owner of the calendar. Set only for secondary + // calendars. Read-only. + DataOwner string `json:"dataOwner,omitempty"` // Description: Description of the calendar. Optional. Description string `json:"description,omitempty"` // Etag: ETag of the resource. @@ -510,9 +516,12 @@ type CalendarListEntry struct { // - "writer" - Provides read and write access to the calendar. Private events // will appear to users with writer access, and event details will be visible. // - // - "owner" - Provides ownership of the calendar. This role has all of the - // permissions of the writer role with the additional ability to see and - // manipulate ACLs. + // - "owner" - Provides manager access to the calendar. This role has all of + // the permissions of the writer role with the additional ability to see and + // modify access levels of other users. + // Important: the owner role is different from the calendar's data owner. A + // calendar has a single data owner, but can have multiple users with owner + // role. AccessRole string `json:"accessRole,omitempty"` // BackgroundColor: The main color of the calendar in the hexadecimal format // "#0088aa". This property supersedes the index-based colorId property. To set @@ -527,6 +536,9 @@ type CalendarListEntry struct { // ConferenceProperties: Conferencing properties for this calendar, for example // what types of conferences are allowed. ConferenceProperties *ConferenceProperties `json:"conferenceProperties,omitempty"` + // DataOwner: The email of the owner of the calendar. Set only for secondary + // calendars. Read-only. + DataOwner string `json:"dataOwner,omitempty"` // DefaultReminders: The default reminders that the authenticated user has for // this calendar. DefaultReminders []*EventReminder `json:"defaultReminders,omitempty"` @@ -1897,9 +1909,12 @@ type Events struct { // - "writer" - The user has read and write access to the calendar. Private // events will appear to users with writer access, and event details will be // visible. - // - "owner" - The user has ownership of the calendar. This role has all of the - // permissions of the writer role with the additional ability to see and - // manipulate ACLs. + // - "owner" - The user has manager access to the calendar. This role has all + // of the permissions of the writer role with the additional ability to see and + // modify access levels of other users. + // Important: the owner role is different from the calendar's data owner. A + // calendar has a single data owner, but can have multiple users with owner + // role. AccessRole string `json:"accessRole,omitempty"` // DefaultReminders: The default reminders on the calendar for the // authenticated user. These reminders apply to all events on this calendar @@ -4178,6 +4193,16 @@ type CalendarsInsertCall struct { } // Insert: Creates a secondary calendar. +// The authenticated user for the request is made the data owner of the new +// calendar. +// +// Note: We recommend to authenticate as the intended data owner of the +// calendar. You can use domain-wide delegation of authority to allow +// applications to act on behalf of a specific user. Don't use a service +// account for authentication. If you use a service account for authentication, +// the service account is the data owner, which can lead to unexpected +// behavior. For example, if a service account is the data owner, data +// ownership cannot be transferred. func (r *CalendarsService) Insert(calendar *Calendar) *CalendarsInsertCall { c := &CalendarsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.calendar = calendar diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 5f082e60a31..0e0ded73d53 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -23736,7 +23736,7 @@ "organizationSecurityPolicies": { "methods": { "addAssociation": { - "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.addAssociation instead if possible.", + "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/addAssociation", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addAssociation", @@ -23775,7 +23775,7 @@ ] }, "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addRule instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/addRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addRule", @@ -23809,7 +23809,7 @@ ] }, "copyRules": { - "description": "Copies rules to the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.copyRules instead.", + "description": "Copies rules to the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.cloneRules\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/copyRules", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.copyRules", @@ -23845,7 +23845,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.\n\nUse of this API to remove firewall policies is deprecated. Use\nfirewallPolicies.delete instead.", + "description": "Deletes the specified policy.\n\nUse this API to remove Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to remove firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.delete instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "DELETE", "id": "compute.organizationSecurityPolicies.delete", @@ -23876,7 +23876,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.get instead.", + "description": "List all of the ordered rules present in a single specified policy.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.get instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.get", @@ -23903,7 +23903,7 @@ ] }, "getAssociation": { - "description": "Gets an association with the specified name.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.getAssociation instead if possible.", + "description": "Gets an association with the specified name.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.getAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/getAssociation", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getAssociation", @@ -23935,7 +23935,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.getRule instead.", + "description": "Gets a rule at the specified priority.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.getRule instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/getRule", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getRule", @@ -23968,7 +23968,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse of this API to insert firewall policies is deprecated. Use\nfirewallPolicies.insert instead.", + "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse this API to add Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to add firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.insert instead.", "flatPath": "locations/global/securityPolicies", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.insert", @@ -23997,7 +23997,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified\norganization.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.list instead.", + "description": "List all the policies that have been configured for the specified\norganization.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.list instead.", "flatPath": "locations/global/securityPolicies", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.list", @@ -24047,7 +24047,7 @@ ] }, "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.listAssociations instead if possible.", + "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.listAssociations\ninstead.", "flatPath": "locations/global/securityPolicies/listAssociations", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.listAssociations", @@ -24119,7 +24119,7 @@ ] }, "move": { - "description": "Moves the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.move instead.", + "description": "Moves the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.move instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/move", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.move", @@ -24155,7 +24155,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.patch instead.", + "description": "Patches the specified policy with the data included in the request.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patch instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.organizationSecurityPolicies.patch", @@ -24195,7 +24195,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.patchRule instead.", + "description": "Patches a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patchRule\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/patchRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.patchRule", @@ -24241,7 +24241,7 @@ ] }, "removeAssociation": { - "description": "Removes an association for the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.removeAssociation instead if possible.", + "description": "Removes an association for the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeAssociation", @@ -24277,7 +24277,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeRule\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeRule", @@ -36935,6 +36935,355 @@ } } }, + "regionRecoverableSnapshots": { + "methods": { + "delete": { + "description": "Deletes the specified RecoverableSnapshot. Deleting a recoverable snapshot\nwill delete the underlying PD snapshot and is irreversible.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", + "httpMethod": "DELETE", + "id": "compute.regionRecoverableSnapshots.delete", + "parameterOrder": [ + "project", + "region", + "recoverableSnapshot" + ], + "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" + }, + "recoverableSnapshot": { + "description": "Name of the recoverable Snapshot 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" + }, + "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\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified RecoverableSnapshot resource.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", + "httpMethod": "GET", + "id": "compute.regionRecoverableSnapshots.get", + "parameterOrder": [ + "project", + "region", + "recoverableSnapshot" + ], + "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" + }, + "recoverableSnapshot": { + "description": "Name of the Snapshot 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" + }, + "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" + } + }, + "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", + "response": { + "$ref": "RecoverableSnapshot" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.regionRecoverableSnapshots.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "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}/recoverableSnapshots/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves the list of RecoverableSnapshot resources contained within\nthe specified region.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots", + "httpMethod": "GET", + "id": "compute.regionRecoverableSnapshots.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`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\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe 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 for 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\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/recoverableSnapshots", + "response": { + "$ref": "RecoverableSnapshotList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "recover": { + "description": "Recovers the specified RecoverableSnapshot.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover", + "httpMethod": "POST", + "id": "compute.regionRecoverableSnapshots.recover", + "parameterOrder": [ + "project", + "region", + "recoverableSnapshot" + ], + "parameters": { + "project": { + "description": "Project Id of the 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" + }, + "recoverableSnapshot": { + "description": "Name of the recoverable resource to recover", + "location": "path", + "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\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "snapshotName": { + "description": "Optional. Name of the snapshot after the recovery\nThe name will be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name will be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter will be a lowercase letter, and all following characters can be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", + "location": "query", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", + "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.regionRecoverableSnapshots.setIamPolicy", + "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}/recoverableSnapshots/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "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}/recoverableSnapshots/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionRecoverableSnapshots.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}/recoverableSnapshots/{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" + ] + } + } + }, "regionSecurityPolicies": { "methods": { "addRule": { @@ -53180,7 +53529,7 @@ } } }, - "revision": "20251019", + "revision": "20251031", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -64635,6 +64984,24 @@ }, "type": "array" }, + "destNetworkContext": { + "description": "Network context of the traffic destination. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - NON_INTERNET", + "enum": [ + "INTERNET", + "INTRA_VPC", + "NON_INTERNET", + "UNSPECIFIED", + "VPC_NETWORKS" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, "destNetworkScope": { "description": "Network scope of the traffic destination.", "enum": [ @@ -64713,6 +65080,24 @@ }, "type": "array" }, + "srcNetworkContext": { + "description": "Network context of the traffic source. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - INTRA_VPC\n - NON_INTERNET\n - VPC_NETWORKS", + "enum": [ + "INTERNET", + "INTRA_VPC", + "NON_INTERNET", + "UNSPECIFIED", + "VPC_NETWORKS" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, "srcNetworkScope": { "description": "Network scope of the traffic source.", "enum": [ @@ -71179,7 +71564,7 @@ "description": "The header value must be an integer and its value must be in the range\nspecified in rangeMatch. If the header does not contain an\ninteger, number or is empty, the match fails.\n\nFor example for a range [-5, 0]\n \n \n - -3 will match.\n - 0 will not match.\n - 0.25 will not match.\n - -3someString will not match.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nrangeMatch is not supported for load balancers\nthat have loadBalancingScheme set to EXTERNAL." }, "regexMatch": { - "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" }, "suffixMatch": { @@ -71451,7 +71836,7 @@ "type": "boolean" }, "regexMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" } }, @@ -71628,7 +72013,7 @@ "id": "HttpRouteRuleMatch", "properties": { "fullPathMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch or regexMatch must be\nspecified.", + "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.", "type": "string" }, "headerMatches": { @@ -71654,7 +72039,7 @@ "type": "string" }, "prefixMatch": { - "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch or regexMatch must be\nspecified.", + "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\nspecified.", "type": "string" }, "queryParameterMatches": { @@ -71665,7 +72050,7 @@ "type": "array" }, "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch orregexMatch must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" } }, @@ -84764,10 +85149,21 @@ "ManagedInstancePropertiesFromFlexibilityPolicy": { "id": "ManagedInstancePropertiesFromFlexibilityPolicy", "properties": { + "disks": { + "description": "List of disks to be attached to the instance.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, "machineType": { "description": "The machine type to be used for this instance.", "type": "string" }, + "minCpuPlatform": { + "description": "Name of the minimum CPU platform to be used by this instance.\ne.g. 'Intel Ice Lake'.", + "type": "string" + }, "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ @@ -89012,25 +89408,6 @@ "format": "int32", "type": "integer" }, - "fieldType": { - "description": "The field type could be one of: TRAFFIC_CLASS or DSCP.", - "enum": [ - "DSCP", - "FIELD_TYPE_UNSPECIFIED", - "TRAFFIC_CLASS" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "fieldValue": { - "description": "For field_type = TRAFFIC_CLASS: 1 to 6. For field_type = DSCP: 0 to 63.", - "format": "int32", - "type": "integer" - }, "trafficClass": { "description": "The traffic class that should be applied to the matching packet.", "enum": [ @@ -96574,27 +96951,33 @@ "type": "object" }, "QueuedResourceStatus": { + "description": "[Output only] Result of queuing and provisioning based on deferred\ncapacity.", "id": "QueuedResourceStatus", "properties": { "failedData": { - "$ref": "QueuedResourceStatusFailedData" + "$ref": "QueuedResourceStatusFailedData", + "description": "Additional status detail for the FAILED state." }, "provisioningOperations": { + "description": "[Output only] Fully qualified URL of the provisioning GCE operation to\ntrack the provisioning along with provisioning errors. The referenced\noperation may not exist after having been deleted or expired.", "items": { "type": "string" }, "type": "array" }, "queuingPolicy": { - "$ref": "QueuingPolicy" + "$ref": "QueuingPolicy", + "description": "Constraints for the time when the resource(s) start provisioning. Always\nexposed as absolute times." } }, "type": "object" }, "QueuedResourceStatusFailedData": { + "description": "Additional status detail for the FAILED state.", "id": "QueuedResourceStatusFailedData", "properties": { "error": { + "description": "The error(s) that caused the QueuedResource to enter the FAILED state.", "properties": { "errors": { "description": "[Output Only] The array of errors encountered while processing this\noperation.", @@ -103453,7 +103836,7 @@ "description": "Required. The resource being rolled out." }, "rolloutPlan": { - "description": "Required. Rollout Plan used to model the Rollout.\nEx. progressiverollout.googleapis.com/v1/organizations/1/rolloutPlans\nEx. progressiverollout.googleapis.com/v1/folders/1/rolloutPlans", + "description": "Required. Rollout Plan used to model the Rollout.\nEx. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1", "type": "string" }, "selfLink": { @@ -103966,7 +104349,7 @@ "type": "string" }, "orchestrationSource": { - "description": "Required. Fully qualified resource name of the resource which contains the source\nof truth of the configuration being rolled out across\nlocations/projects. For example, in the case of a global Rollout which\nis applied across regions, this contains the name of the global\nresource created by the user which contains a payload for a resource\nthat is orchestrated across regions. This follows the following format:\n//.googleapis.com/organizations//locations/global//\ne.g.\n//osconfig.googleapis.com/organizations/1/locations/global/policyOrchestrators/po1", + "description": "Required. Fully qualified resource name of the resource which contains the source\nof truth of the configuration being rolled out across\nlocations/projects. For example, in the case of a global Rollout which\nis applied across regions, this contains the name of the global\nresource created by the user which contains a payload for a resource\nthat is orchestrated across regions. This follows the following format:\n//.googleapis.com/projects//locations/global//\ne.g.\n//osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1", "type": "string" } }, @@ -122011,6 +122394,18 @@ "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the\nthe Cloud VPN Overview.", "id": "VpnTunnel", "properties": { + "capacityTier": { + "description": "Capacity tier of the VPN tunnel. This is used for IPsec over Interconnect\ntunnels to indicate different bandwidth limits.", + "enum": [ + "DEFAULT", + "HIGH" + ], + "enumDescriptions": [ + "DEFAULT: A VPN tunnel which can support up to 1 Gbps.", + "HIGH: A VPN tunnel which can support up to 6 Gbps." + ], + "type": "string" + }, "cipherSuite": { "$ref": "VpnTunnelCipherSuite", "description": "User specified list of ciphers to use for the phase 1 and phase 2 of the\nIKE protocol." diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 13a3bdbf34e..334851c5d64 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -235,6 +235,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.RegionNetworkPolicies = NewRegionNetworkPoliciesService(s) s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) s.RegionOperations = NewRegionOperationsService(s) + s.RegionRecoverableSnapshots = NewRegionRecoverableSnapshotsService(s) s.RegionSecurityPolicies = NewRegionSecurityPoliciesService(s) s.RegionSnapshotSettings = NewRegionSnapshotSettingsService(s) s.RegionSnapshots = NewRegionSnapshotsService(s) @@ -485,6 +486,8 @@ type Service struct { RegionOperations *RegionOperationsService + RegionRecoverableSnapshots *RegionRecoverableSnapshotsService + RegionSecurityPolicies *RegionSecurityPoliciesService RegionSnapshotSettings *RegionSnapshotSettingsService @@ -1390,6 +1393,15 @@ type RegionOperationsService struct { s *Service } +func NewRegionRecoverableSnapshotsService(s *Service) *RegionRecoverableSnapshotsService { + rs := &RegionRecoverableSnapshotsService{s: s} + return rs +} + +type RegionRecoverableSnapshotsService struct { + s *Service +} + func NewRegionSecurityPoliciesService(s *Service) *RegionSecurityPoliciesService { rs := &RegionSecurityPoliciesService{s: s} return rs @@ -18552,6 +18564,21 @@ type FirewallPolicyRuleMatcher struct { // DestIpRanges: CIDR IP address range. // Maximum number of destination CIDR IP ranges allowed is 5000. DestIpRanges []string `json:"destIpRanges,omitempty"` + // DestNetworkContext: Network context of the traffic destination. Allowed + // values are: + // + // + // - UNSPECIFIED + // - INTERNET + // - NON_INTERNET + // + // Possible values: + // "INTERNET" + // "INTRA_VPC" + // "NON_INTERNET" + // "UNSPECIFIED" + // "VPC_NETWORKS" + DestNetworkContext string `json:"destNetworkContext,omitempty"` // DestNetworkScope: Network scope of the traffic destination. // // Possible values: @@ -18599,6 +18626,23 @@ type FirewallPolicyRuleMatcher struct { // SrcIpRanges: CIDR IP address range. // Maximum number of source CIDR IP ranges allowed is 5000. SrcIpRanges []string `json:"srcIpRanges,omitempty"` + // SrcNetworkContext: Network context of the traffic source. Allowed values + // are: + // + // + // - UNSPECIFIED + // - INTERNET + // - INTRA_VPC + // - NON_INTERNET + // - VPC_NETWORKS + // + // Possible values: + // "INTERNET" + // "INTRA_VPC" + // "NON_INTERNET" + // "UNSPECIFIED" + // "VPC_NETWORKS" + SrcNetworkContext string `json:"srcNetworkContext,omitempty"` // SrcNetworkScope: Network scope of the traffic source. // // Possible values: @@ -27297,7 +27341,7 @@ type HttpHeaderMatch struct { // rangeMatch must be set. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` // SuffixMatch: The value of the header must end with the contents // ofsuffixMatch. @@ -27654,7 +27698,7 @@ type HttpQueryParameterMatch struct { // Only one of presentMatch, exactMatch, orregexMatch must be set. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. 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 @@ -28145,7 +28189,8 @@ type HttpRouteRuleMatch struct { // // fullPathMatch must be from 1 to 1024 characters. // - // Only one of prefixMatch, fullPathMatch or regexMatch must be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be // specified. FullPathMatch string `json:"fullPathMatch,omitempty"` // HeaderMatches: Specifies a list of header match criteria, all of which must @@ -28209,7 +28254,9 @@ type HttpRouteRuleMatch struct { // // The value must be from 1 to 1024 characters. // - // Only one of prefixMatch, fullPathMatch or regexMatch must be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be + // specified. // specified. PrefixMatch string `json:"prefixMatch,omitempty"` // QueryParameterMatches: Specifies a list of query parameter match criteria, @@ -28224,12 +28271,12 @@ type HttpRouteRuleMatch struct { // supplied with the original URL. For // more information about regular expression syntax, see Syntax. // - // Only one of prefixMatch, fullPathMatch orregexMatch must - // be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be // specified. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. 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 @@ -45424,8 +45471,14 @@ func (s ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byt } type ManagedInstancePropertiesFromFlexibilityPolicy struct { + // Disks: List of disks to be attached to the instance. + Disks []*AttachedDisk `json:"disks,omitempty"` // MachineType: The machine type to be used for this instance. MachineType string `json:"machineType,omitempty"` + // MinCpuPlatform: Name of the minimum CPU platform to be used by this + // instance. + // e.g. 'Intel Ice Lake'. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: @@ -45438,13 +45491,13 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineType") to include in API + // NullFields is a list of field names (e.g. "Disks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -50924,16 +50977,6 @@ type NetworkPolicyTrafficClassificationRuleAction struct { DscpMode string `json:"dscpMode,omitempty"` // DscpValue: Custom DSCP value from 0-63 range. DscpValue int64 `json:"dscpValue,omitempty"` - // FieldType: The field type could be one of: TRAFFIC_CLASS or DSCP. - // - // Possible values: - // "DSCP" - // "FIELD_TYPE_UNSPECIFIED" - // "TRAFFIC_CLASS" - FieldType string `json:"fieldType,omitempty"` - // FieldValue: For field_type = TRAFFIC_CLASS: 1 to 6. For field_type = DSCP: 0 - // to 63. - FieldValue int64 `json:"fieldValue,omitempty"` // TrafficClass: The traffic class that should be applied to the matching // packet. // @@ -60037,10 +60080,22 @@ func (s QueuedResourceListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// QueuedResourceStatus: [Output only] Result of queuing and provisioning based +// on deferred +// capacity. type QueuedResourceStatus struct { - FailedData *QueuedResourceStatusFailedData `json:"failedData,omitempty"` - ProvisioningOperations []string `json:"provisioningOperations,omitempty"` - QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` + // FailedData: Additional status detail for the FAILED state. + FailedData *QueuedResourceStatusFailedData `json:"failedData,omitempty"` + // ProvisioningOperations: [Output only] Fully qualified URL of the + // provisioning GCE operation to + // track the provisioning along with provisioning errors. The + // referenced + // operation may not exist after having been deleted or expired. + ProvisioningOperations []string `json:"provisioningOperations,omitempty"` + // QueuingPolicy: Constraints for the time when the resource(s) start + // provisioning. Always + // exposed as absolute times. + QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` // ForceSendFields is a list of field names (e.g. "FailedData") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -60059,7 +60114,11 @@ func (s QueuedResourceStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// QueuedResourceStatusFailedData: Additional status detail for the FAILED +// state. type QueuedResourceStatusFailedData struct { + // Error: The error(s) that caused the QueuedResource to enter the FAILED + // state. Error *QueuedResourceStatusFailedDataError `json:"error,omitempty"` // ForceSendFields is a list of field names (e.g. "Error") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -60079,6 +60138,8 @@ func (s QueuedResourceStatusFailedData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// QueuedResourceStatusFailedDataError: The error(s) that caused the +// QueuedResource to enter the FAILED state. type QueuedResourceStatusFailedDataError struct { // Errors: [Output Only] The array of errors encountered while processing // this @@ -68330,8 +68391,7 @@ type Rollout struct { // RolloutEntity: Required. The resource being rolled out. RolloutEntity *RolloutRolloutEntity `json:"rolloutEntity,omitempty"` // RolloutPlan: Required. Rollout Plan used to model the Rollout. - // Ex. progressiverollout.googleapis.com/v1/organizations/1/rolloutPlans - // Ex. progressiverollout.googleapis.com/v1/folders/1/rolloutPlans + // Ex. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1 RolloutPlan string `json:"rolloutPlan,omitempty"` // SelfLink: [Output Only] Server-defined fully-qualified URL for this // resource. @@ -68989,10 +69049,9 @@ type RolloutRolloutEntityOrchestratedEntity struct { // resource created by the user which contains a payload for a resource // that is orchestrated across regions. This follows the following // format: - // //.googleapis.com/organizations//locations/global// + // //.googleapis.com/projects//locations/global// // e.g. - // //osconfig.googleapis.com/organizations/1/locations/global/policyOrchestrator - // s/po1 + // //osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1 OrchestrationSource string `json:"orchestrationSource,omitempty"` // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to // unconditionally include in API requests. By default, fields with empty or @@ -91997,6 +92056,14 @@ func (s VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { // For more information about VPN, read the // the Cloud VPN Overview. type VpnTunnel struct { + // CapacityTier: Capacity tier of the VPN tunnel. This is used for IPsec over + // Interconnect + // tunnels to indicate different bandwidth limits. + // + // Possible values: + // "DEFAULT" - DEFAULT: A VPN tunnel which can support up to 1 Gbps. + // "HIGH" - HIGH: A VPN tunnel which can support up to 6 Gbps. + CapacityTier string `json:"capacityTier,omitempty"` // CipherSuite: User specified list of ciphers to use for the phase 1 and phase // 2 of the // IKE protocol. @@ -92190,13 +92257,13 @@ type VpnTunnel struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CipherSuite") to + // ForceSendFields is a list of field names (e.g. "CapacityTier") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CipherSuite") to include in API + // NullFields is a list of field names (e.g. "CapacityTier") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index 433e0544e8d..4688625e092 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -76845,9 +76845,13 @@ type OrganizationSecurityPoliciesAddAssociationCall struct { // Cloud // Armor Enterprise if not already enrolled. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.addAssociation instead if possible. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.addAssociation +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall { @@ -76985,6 +76989,12 @@ type OrganizationSecurityPoliciesAddRuleCall struct { // AddRule: Inserts a rule into a security policy. // +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.addRule instead. +// // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall { c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77109,9 +77119,13 @@ type OrganizationSecurityPoliciesCopyRulesCall struct { // CopyRules: Copies rules to the specified security policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.copyRules instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.cloneRules +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) CopyRules(securityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { @@ -77239,9 +77253,11 @@ type OrganizationSecurityPoliciesDeleteCall struct { // Delete: Deletes the specified policy. // -// Use of this API to remove firewall policies is deprecated. -// Use -// firewallPolicies.delete instead. +// Use this API to remove Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to remove firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.delete instead. // // - securityPolicy: Name of the security policy to delete. func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall { @@ -77364,9 +77380,11 @@ type OrganizationSecurityPoliciesGetCall struct { // Get: List all of the ordered rules present in a single specified // policy. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.get instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.get instead. // // - securityPolicy: Name of the security policy to get. func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall { @@ -77477,9 +77495,12 @@ type OrganizationSecurityPoliciesGetAssociationCall struct { // GetAssociation: Gets an association with the specified name. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.getAssociation instead if possible. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now disabled for most organizations. Use +// firewallPolicies.getAssociation +// instead. // // - securityPolicy: Name of the security policy to which the queried rule // belongs. @@ -77599,9 +77620,11 @@ type OrganizationSecurityPoliciesGetRuleCall struct { // GetRule: Gets a rule at the specified priority. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.getRule instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.getRule instead. // // - securityPolicy: Name of the security policy to which the queried rule // belongs. @@ -77722,9 +77745,11 @@ type OrganizationSecurityPoliciesInsertCall struct { // included // in the request. // -// Use of this API to insert firewall policies is deprecated. -// Use -// firewallPolicies.insert instead. +// Use this API to add Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to add firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.insert instead. func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall { c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securitypolicy = securitypolicy @@ -77855,9 +77880,11 @@ type OrganizationSecurityPoliciesListCall struct { // specified // organization. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.list instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.list instead. func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall { c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -78118,9 +78145,12 @@ type OrganizationSecurityPoliciesListAssociationsCall struct { // ListAssociations: Lists associations of a specified target, i.e., // organization or folder. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.listAssociations instead if possible. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now disabled for most organizations. Use +// firewallPolicies.listAssociations +// instead. func (r *OrganizationSecurityPoliciesService) ListAssociations() *OrganizationSecurityPoliciesListAssociationsCall { c := &OrganizationSecurityPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -78472,9 +78502,11 @@ type OrganizationSecurityPoliciesMoveCall struct { // Move: Moves the specified security policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.move instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.move instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) Move(securityPolicy string) *OrganizationSecurityPoliciesMoveCall { @@ -78604,9 +78636,11 @@ type OrganizationSecurityPoliciesPatchCall struct { // Patch: Patches the specified policy with the data included in the // request. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.patch instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.patch instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) Patch(securityPolicy string, securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesPatchCall { @@ -78740,9 +78774,12 @@ type OrganizationSecurityPoliciesPatchRuleCall struct { // PatchRule: Patches a rule at the specified priority. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.patchRule instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.patchRule +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall { @@ -78883,9 +78920,13 @@ type OrganizationSecurityPoliciesRemoveAssociationCall struct { // RemoveAssociation: Removes an association for the specified security // policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.removeAssociation instead if possible. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.removeAssociation +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall { @@ -79013,6 +79054,14 @@ type OrganizationSecurityPoliciesRemoveRuleCall struct { // RemoveRule: Deletes a rule at the specified priority. // +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.removeRule +// instead. +// // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall { c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -93556,3 +93605,252 @@ func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } + +type RegionDiskSettingsGetCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get Regional Disk Settings. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { + c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDiskSettingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDiskSettings.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DiskSettings.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DiskSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionDiskSettingsPatchCall struct { + s *Service + project string + region string + disksettings *DiskSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patch Regional Disk Settings +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { + c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.disksettings = disksettings + 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 *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDiskSettingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") + 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, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDiskSettings.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 44566957b7f..47b898b3c84 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -16,255 +16,6 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) -type RegionDiskSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Regional Disk Settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { - c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DiskSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskSettingsPatchCall struct { - s *Service - project string - region string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Regional Disk Settings -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { - c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksettings = disksettings - 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 *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - type RegionDiskTypesGetCall struct { s *Service project string @@ -25259,6 +25010,1012 @@ func (c *RegionOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } +type RegionRecoverableSnapshotsDeleteCall struct { + s *Service + project string + region string + recoverableSnapshot string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified RecoverableSnapshot. Deleting a recoverable +// snapshot +// will delete the underlying PD snapshot and is irreversible. +// +// - project: Project ID for this request. +// - recoverableSnapshot: Name of the recoverable Snapshot resource to delete. +// - region: Name of the region for this request. +func (r *RegionRecoverableSnapshotsService) Delete(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsDeleteCall { + c := &RegionRecoverableSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.recoverableSnapshot = recoverableSnapshot + 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 *RegionRecoverableSnapshotsDeleteCall) RequestId(requestId string) *RegionRecoverableSnapshotsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsDeleteCall) Context(ctx context.Context) *RegionRecoverableSnapshotsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "recoverableSnapshot": c.recoverableSnapshot, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionRecoverableSnapshotsGetCall struct { + s *Service + project string + region string + recoverableSnapshot string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified RecoverableSnapshot resource. +// +// - project: Project ID for this request. +// - recoverableSnapshot: Name of the Snapshot resource to return. +// - region: Name of the region for this request. +func (r *RegionRecoverableSnapshotsService) Get(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsGetCall { + c := &RegionRecoverableSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.recoverableSnapshot = recoverableSnapshot + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionRecoverableSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsGetCall) Context(ctx context.Context) *RegionRecoverableSnapshotsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "recoverableSnapshot": c.recoverableSnapshot, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *RecoverableSnapshot.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionRecoverableSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshot, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RecoverableSnapshot{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionRecoverableSnapshotsGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such +// policy or resource exists. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionRecoverableSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionRecoverableSnapshotsGetIamPolicyCall { + c := &RegionRecoverableSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionRecoverableSnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionRecoverableSnapshotsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionRecoverableSnapshotsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of RecoverableSnapshot resources contained +// within +// the specified region. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionRecoverableSnapshotsService) List(project string, region string) *RegionRecoverableSnapshotsListCall { + c := &RegionRecoverableSnapshotsListCall{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. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *RegionRecoverableSnapshotsListCall) Filter(filter string) *RegionRecoverableSnapshotsListCall { + 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 *RegionRecoverableSnapshotsListCall) MaxResults(maxResults int64) *RegionRecoverableSnapshotsListCall { + 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 *RegionRecoverableSnapshotsListCall) OrderBy(orderBy string) *RegionRecoverableSnapshotsListCall { + 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 *RegionRecoverableSnapshotsListCall) PageToken(pageToken string) *RegionRecoverableSnapshotsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RegionRecoverableSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionRecoverableSnapshotsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsListCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionRecoverableSnapshotsListCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsListCall) Context(ctx context.Context) *RegionRecoverableSnapshotsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *RecoverableSnapshotList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsListCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshotList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RecoverableSnapshotList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionRecoverableSnapshotsListCall) Pages(ctx context.Context, f func(*RecoverableSnapshotList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionRecoverableSnapshotsRecoverCall struct { + s *Service + project string + region string + recoverableSnapshot string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Recover: Recovers the specified RecoverableSnapshot. +// +// - project: Project Id of the request. +// - recoverableSnapshot: Name of the recoverable resource to recover. +// - region: Name of the region for this request. +func (r *RegionRecoverableSnapshotsService) Recover(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsRecoverCall { + c := &RegionRecoverableSnapshotsRecoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.recoverableSnapshot = recoverableSnapshot + 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 *RegionRecoverableSnapshotsRecoverCall) RequestId(requestId string) *RegionRecoverableSnapshotsRecoverCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SnapshotName sets the optional parameter "snapshotName": Name of the +// snapshot after the recovery +// The name will be 1-63 characters long, and comply withRFC1035. +// Specifically, the name will be 1-63 characters long and match the +// regular +// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first +// character will be a lowercase letter, and all following characters can be +// a dash, lowercase letter, or digit, except the last character, which +// cannot +// be a dash. +func (c *RegionRecoverableSnapshotsRecoverCall) SnapshotName(snapshotName string) *RegionRecoverableSnapshotsRecoverCall { + c.urlParams_.Set("snapshotName", snapshotName) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsRecoverCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsRecoverCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsRecoverCall) Context(ctx context.Context) *RegionRecoverableSnapshotsRecoverCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsRecoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsRecoverCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "recoverableSnapshot": c.recoverableSnapshot, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.recover", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.recover" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsRecoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.recover", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionRecoverableSnapshotsSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionRecoverableSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionRecoverableSnapshotsSetIamPolicyCall { + c := &RegionRecoverableSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionRecoverableSnapshotsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionRecoverableSnapshotsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionRecoverableSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionRecoverableSnapshotsTestIamPermissionsCall { + c := &RegionRecoverableSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionRecoverableSnapshotsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionRecoverableSnapshots.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type RegionSecurityPoliciesAddRuleCall struct { s *Service project string diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index c767d4eba11..ed0fdb34e65 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -7591,6 +7591,47 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "delete": { + "description": "Purge scoped resources (zonal policies) from a global VM extension\npolicy, and then delete the global VM extension policy. Purge of the scoped\nresources is a pre-condition of the global VM extension policy deletion.\nThe deletion of the global VM extension policy happens after the purge\nrollout is done, so it's not a part of the LRO. It's an automatic process\nthat triggers in the backend.", + "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", + "httpMethod": "POST", + "id": "compute.globalVmExtensionPolicies.delete", + "parameterOrder": [ + "project", + "globalVmExtensionPolicy" + ], + "parameters": { + "globalVmExtensionPolicy": { + "description": "Name of the global VM extension policy to purge scoped resources for.", + "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\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", + "request": { + "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutInput" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "description": "Gets details of a global VM extension policy.", "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", @@ -7625,6 +7666,136 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "insert": { + "description": "Creates a new project level GlobalVmExtensionPolicy.", + "flatPath": "projects/{project}/global/vmExtensionPolicies", + "httpMethod": "POST", + "id": "compute.globalVmExtensionPolicies.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/vmExtensionPolicies", + "request": { + "$ref": "GlobalVmExtensionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists global VM extension policies.", + "flatPath": "projects/{project}/global/vmExtensionPolicies", + "httpMethod": "GET", + "id": "compute.globalVmExtensionPolicies.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`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\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe 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\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/vmExtensionPolicies", + "response": { + "$ref": "GlobalVmExtensionPolicyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "update": { + "description": "Updates a global VM extension policy.", + "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", + "httpMethod": "PATCH", + "id": "compute.globalVmExtensionPolicies.update", + "parameterOrder": [ + "project", + "globalVmExtensionPolicy" + ], + "parameters": { + "globalVmExtensionPolicy": { + "description": "Name of the global VM extension policy to update.", + "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\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", + "request": { + "$ref": "GlobalVmExtensionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -21980,7 +22151,7 @@ "organizationSecurityPolicies": { "methods": { "addAssociation": { - "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.addAssociation instead if possible.", + "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/addAssociation", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addAssociation", @@ -22019,7 +22190,7 @@ ] }, "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addRule instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/addRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addRule", @@ -22053,7 +22224,7 @@ ] }, "copyRules": { - "description": "Copies rules to the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.copyRules instead.", + "description": "Copies rules to the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.cloneRules\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/copyRules", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.copyRules", @@ -22089,7 +22260,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.\n\nUse of this API to remove firewall policies is deprecated. Use\nfirewallPolicies.delete instead.", + "description": "Deletes the specified policy.\n\nUse this API to remove Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to remove firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.delete instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "DELETE", "id": "compute.organizationSecurityPolicies.delete", @@ -22120,7 +22291,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.get instead.", + "description": "List all of the ordered rules present in a single specified policy.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.get instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.get", @@ -22147,7 +22318,7 @@ ] }, "getAssociation": { - "description": "Gets an association with the specified name.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.getAssociation instead if possible.", + "description": "Gets an association with the specified name.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.getAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/getAssociation", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getAssociation", @@ -22179,7 +22350,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.getRule instead.", + "description": "Gets a rule at the specified priority.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.getRule instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/getRule", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getRule", @@ -22212,7 +22383,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse of this API to insert firewall policies is deprecated. Use\nfirewallPolicies.insert instead.", + "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse this API to add Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to add firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.insert instead.", "flatPath": "locations/global/securityPolicies", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.insert", @@ -22241,7 +22412,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified\norganization.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.list instead.", + "description": "List all the policies that have been configured for the specified\norganization.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.list instead.", "flatPath": "locations/global/securityPolicies", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.list", @@ -22291,7 +22462,7 @@ ] }, "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse of this API to read firewall policies is deprecated. Use\nfirewallPolicies.listAssociations instead if possible.", + "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.listAssociations\ninstead.", "flatPath": "locations/global/securityPolicies/listAssociations", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.listAssociations", @@ -22363,7 +22534,7 @@ ] }, "move": { - "description": "Moves the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.move instead.", + "description": "Moves the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.move instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/move", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.move", @@ -22399,7 +22570,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.patch instead.", + "description": "Patches the specified policy with the data included in the request.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patch instead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.organizationSecurityPolicies.patch", @@ -22439,7 +22610,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.patchRule instead.", + "description": "Patches a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patchRule\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/patchRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.patchRule", @@ -22485,7 +22656,7 @@ ] }, "removeAssociation": { - "description": "Removes an association for the specified security policy.\n\nUse of this API to modify firewall policies is deprecated. Use\nfirewallPolicies.removeAssociation instead if possible.", + "description": "Removes an association for the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeAssociation\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeAssociation", @@ -22521,7 +22692,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeRule\ninstead.", "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeRule", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeRule", @@ -38861,13 +39032,121 @@ } } }, - "routers": { + "rolloutPlans": { "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of routers.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/routers", + "delete": { + "description": "Deletes a RolloutPlan.", + "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", + "httpMethod": "DELETE", + "id": "compute.rolloutPlans.delete", + "parameterOrder": [ + "project", + "rolloutPlan" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "rolloutPlan": { + "description": "Name of the RolloutPlan 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}/global/rolloutPlans/{rolloutPlan}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Gets details of a single project-scoped RolloutPlan.", + "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", "httpMethod": "GET", - "id": "compute.routers.aggregatedList", + "id": "compute.rolloutPlans.get", + "parameterOrder": [ + "project", + "rolloutPlan" + ], + "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" + }, + "rolloutPlan": { + "description": "Name of the persistent rollout plan 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}/global/rolloutPlans/{rolloutPlan}", + "response": { + "$ref": "RolloutPlan" + }, + "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 RolloutPlan in a given project and location.", + "flatPath": "projects/{project}/global/rolloutPlans", + "httpMethod": "POST", + "id": "compute.rolloutPlans.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/rolloutPlans", + "request": { + "$ref": "RolloutPlan" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists RolloutPlans in a given project and location.", + "flatPath": "projects/{project}/global/rolloutPlans", + "httpMethod": "GET", + "id": "compute.rolloutPlans.list", "parameterOrder": [ "project" ], @@ -38877,8 +39156,244 @@ "location": "query", "type": "string" }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`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\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe 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\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/rolloutPlans", + "response": { + "$ref": "RolloutPlansListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "rollouts": { + "methods": { + "cancel": { + "description": "Cancels a Rollout.", + "flatPath": "projects/{project}/global/rollouts/{rollout}", + "httpMethod": "PATCH", + "id": "compute.rollouts.cancel", + "parameterOrder": [ + "project", + "rollout" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "rollback": { + "description": "Optional. If true, then the ongoing rollout must be rolled back. Else, just cancel\nthe rollout without taking any further actions. Note that products must\nsupport at least one of these options, however, it does not need to support\nboth.", + "location": "query", + "type": "boolean" + }, + "rollout": { + "description": "Name of the Rollout resource to cancel.", + "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}/global/rollouts/{rollout}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes a Rollout.", + "flatPath": "projects/{project}/global/rollouts/{rollout}", + "httpMethod": "DELETE", + "id": "compute.rollouts.delete", + "parameterOrder": [ + "project", + "rollout" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "rollout": { + "description": "Name of the Rollout 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}/global/rollouts/{rollout}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Gets details of a single project-scoped Rollout.", + "flatPath": "projects/{project}/global/rollouts/{rollout}", + "httpMethod": "GET", + "id": "compute.rollouts.get", + "parameterOrder": [ + "project", + "rollout" + ], + "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" + }, + "rollout": { + "description": "Name of the persistent rollout 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}/global/rollouts/{rollout}", + "response": { + "$ref": "Rollout" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Lists Rollouts in a given project and location.", + "flatPath": "projects/{project}/global/rollouts", + "httpMethod": "GET", + "id": "compute.rollouts.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`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\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe 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\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/rollouts", + "response": { + "$ref": "RolloutsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "routers": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of routers.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", + "flatPath": "projects/{project}/aggregated/routers", + "httpMethod": "GET", + "id": "compute.routers.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", "location": "query", "type": "boolean" }, @@ -48851,7 +49366,7 @@ } } }, - "revision": "20251019", + "revision": "20251031", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -54980,6 +55495,7 @@ "GENERAL_PURPOSE_N2", "GENERAL_PURPOSE_N2D", "GENERAL_PURPOSE_N4", + "GENERAL_PURPOSE_N4D", "GENERAL_PURPOSE_T2D", "GRAPHICS_OPTIMIZED", "MEMORY_OPTIMIZED", @@ -55022,6 +55538,7 @@ "", "", "", + "", "Note for internal users: When adding a new enum Type for v1, make sure\nto also add it in the comment for the `optional Type type` definition.\nThis ensures that the public documentation displays the new enum Type." ], "type": "string" @@ -57281,24 +57798,27 @@ "type": "object" }, "DiskSettingsAccessLocation": { + "description": "AccessLocation is only used for regional snapshot. It contains which\nregions are allowed to create a regional snapshot from disks located in the\ngiven region/zone.\nIt includes key-value pairs designed to store the following structure. The\nkeys should match their corresponding values, which must be provided:\naccess_location: {\n locations {\n us-central1 {\n region: \"us-central1\"\n },\n asia-west2 {\n region: \"asia-west2\"\n }\n }\n}", "id": "DiskSettingsAccessLocation", "properties": { "locations": { "additionalProperties": { "$ref": "DiskSettingsAccessLocationAccessLocationPreference" }, + "description": "List of regions that can create a regional\nsnapshot from the current region", "type": "object" }, "policy": { + "description": "Policy of which location is allowed to access snapshot.", "enum": [ "ALL_REGIONS", "POLICY_UNSPECIFIED", "SPECIFIC_REGIONS" ], "enumDescriptions": [ + "Any regions will be able to access the source location.", "", - "", - "" + "Only allowlisted regions will be able to create region scoped\nsnapshots" ], "type": "string" } @@ -57306,9 +57826,11 @@ "type": "object" }, "DiskSettingsAccessLocationAccessLocationPreference": { + "description": "A structure for specifying an allowed target region to create snapshot.", "id": "DiskSettingsAccessLocationAccessLocationPreference", "properties": { "region": { + "description": "Accessible region name", "type": "string" } }, @@ -61944,6 +62466,171 @@ }, "type": "object" }, + "GlobalVmExtensionPolicyList": { + "description": "Response to list global VM extension policy resources.", + "id": "GlobalVmExtensionPolicyList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of GlobalVmExtensionPolicy resources.", + "items": { + "$ref": "GlobalVmExtensionPolicy" + }, + "type": "array" + }, + "kind": { + "default": "compute#globalVmExtensionPolicyList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue 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\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed\noperation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as\ndeprecated", + "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\nexperimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden.\nDeprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the\nsame 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\nthe mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g:\nregions.list).", + "The user attempted to use a resource that requires a TOS they have not\naccepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle 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:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts 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" + }, "GlobalVmExtensionPolicyRolloutOperation": { "description": "Represents the rollout operation", "id": "GlobalVmExtensionPolicyRolloutOperation", @@ -64569,7 +65256,7 @@ "description": "The header value must be an integer and its value must be in the range\nspecified in rangeMatch. If the header does not contain an\ninteger, number or is empty, the match fails.\n\nFor example for a range [-5, 0]\n \n \n - -3 will match.\n - 0 will not match.\n - 0.25 will not match.\n - -3someString will not match.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nrangeMatch is not supported for load balancers\nthat have loadBalancingScheme set to EXTERNAL." }, "regexMatch": { - "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" }, "suffixMatch": { @@ -64837,7 +65524,7 @@ "type": "boolean" }, "regexMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" } }, @@ -65014,7 +65701,7 @@ "id": "HttpRouteRuleMatch", "properties": { "fullPathMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch or regexMatch must be\nspecified.", + "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.", "type": "string" }, "headerMatches": { @@ -65040,7 +65727,7 @@ "type": "string" }, "prefixMatch": { - "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch or regexMatch must be\nspecified.", + "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\nspecified.", "type": "string" }, "queryParameterMatches": { @@ -65051,7 +65738,7 @@ "type": "array" }, "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch orregexMatch must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", + "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", "type": "string" } }, @@ -67098,6 +67785,13 @@ "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection": { "id": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection", "properties": { + "disks": { + "description": "List of disks to be attached to the instances created from this\nselection.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, "machineTypes": { "description": "Full machine-type names, e.g. \"n1-standard-16\".", "items": { @@ -67105,6 +67799,10 @@ }, "type": "array" }, + "minCpuPlatform": { + "description": "Name of the minimum CPU platform to be used by this instance selection.\ne.g. 'Intel Ice Lake'.", + "type": "string" + }, "rank": { "description": "Preference of this instance selection. Lower number means higher\npreference. MIG will first try to create a VM based on the machine-type\nwith lowest rank and fallback to next rank based on availability.\nMachine types and instance selections with the same rank have the same\npreference.", "format": "int32", @@ -76521,10 +77219,21 @@ "ManagedInstancePropertiesFromFlexibilityPolicy": { "id": "ManagedInstancePropertiesFromFlexibilityPolicy", "properties": { + "disks": { + "description": "List of disks to be attached to the instance.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, "machineType": { "description": "The machine type to be used for this instance.", "type": "string" }, + "minCpuPlatform": { + "description": "Name of the minimum CPU platform to be used by this instance.\ne.g. 'Intel Ice Lake'.", + "type": "string" + }, "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ @@ -92028,6 +92737,530 @@ }, "type": "object" }, + "Rollout": { + "description": "Represent a Rollout resource.", + "id": "Rollout", + "properties": { + "cancellationTime": { + "description": "Output only. The timestamp at which the Rollout was cancelled.", + "readOnly": true, + "type": "string" + }, + "completionTime": { + "description": "Output only. The timestamp at which the Rollout was completed.", + "readOnly": true, + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", + "type": "string" + }, + "currentWaveNumber": { + "description": "Output only. The number of the currently running wave.\nEx. 1", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", + "type": "string" + }, + "etag": { + "description": "Output only. etag of the Rollout\nEx. abc1234", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#rollout", + "description": "[Output Only] Type of the resource. Always compute#rollout\nfor rollouts.", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "rolloutEntity": { + "$ref": "RolloutRolloutEntity", + "description": "Required. The resource being rolled out." + }, + "rolloutPlan": { + "description": "Required. Rollout Plan used to model the Rollout.\nEx. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, + "state": { + "description": "Output only. The current state of the Rollout.", + "enum": [ + "CANCELLED", + "CANCELLING", + "CANCEL_FAILED", + "COMPLETED", + "COMPLETE_FAILED", + "COMPLETING", + "FAILED", + "PAUSED", + "PAUSE_FAILED", + "PAUSING", + "PROCESSING", + "READY", + "RESUMING", + "ROLLBACK_WAVE_FAILED", + "ROLLING_BACK", + "STATE_UNSPECIFIED", + "UNINITIALIZED", + "WAVE_FAILED" + ], + "enumDescriptions": [ + "The rollout is in a failure terminal state.", + "The rollout is being cancelled.", + "An attempted cancel operation was unsuccessful.", + "The rollout is in a successful terminal state.", + "An attempted complete operation was unsuccessful.", + "The rollout is being marked as completed.", + "The rollout completed with failures.", + "The rollout is paused.", + "An attempted pause operation was unsuccessful.", + "The rollout is being paused.", + "A wave is being processed by the product.", + "The rollout has been successfully initialized and is ready to start.", + "The rollout is being resumed after being paused.", + "An attempted rollback operation failed to complete successfully.", + "A wave rollback is in progress for this rollout.", + "Undefined default state. Should never be exposed to users.", + "The rollout has been created but is not yet ready to be started.", + "The product failed to process the wave." + ], + "readOnly": true, + "type": "string" + }, + "waveDetails": { + "description": "Output only. Details about each wave of the rollout.", + "items": { + "$ref": "RolloutWaveDetails" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "RolloutPlan": { + "description": "Message describing RolloutPlan object", + "id": "RolloutPlan", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#rolloutPlan", + "description": "[Output Only] Type of the resource. Always compute#rolloutPlan\nfor rolloutPlans.", + "type": "string" + }, + "locationScope": { + "description": "The location scope of the rollout plan. If not specified, the location\nscope is considered as ZONAL.", + "enum": [ + "LOCATION_SCOPE_UNSPECIFIED", + "REGIONAL", + "ZONAL" + ], + "enumDescriptions": [ + "Unspecified value. Considered as ZONAL.", + "Regional scope.", + "Zonal scope." + ], + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.rolloutPlans.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, + "waves": { + "description": "Required. The waves included in this rollout plan.", + "items": { + "$ref": "RolloutPlanWave" + }, + "type": "array" + } + }, + "type": "object" + }, + "RolloutPlanWave": { + "description": "A single wave in a rollout plan.", + "id": "RolloutPlanWave", + "properties": { + "displayName": { + "description": "Optional. The display name of this wave of the rollout plan.", + "type": "string" + }, + "number": { + "description": "Output only. The wave number.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "orchestrationOptions": { + "$ref": "RolloutPlanWaveOrchestrationOptions", + "description": "Optional. The orchestration options for this wave." + }, + "selectors": { + "description": "Required. The selectors for this wave. There is a logical AND between each selector\ndefined in a wave, so a resource must satisfy the criteria of *all* the\nspecified selectors to be in scope for the wave.", + "items": { + "$ref": "RolloutPlanWaveSelector" + }, + "type": "array" + }, + "validation": { + "$ref": "RolloutPlanWaveValidation", + "description": "Required. The validation to be performed at the end of this wave." + } + }, + "type": "object" + }, + "RolloutPlanWaveOrchestrationOptions": { + "description": "Options to control the pace of orchestration of a wave. These options are\nrequired only if the resource being rolled out follows the Orchestrated\npattern.", + "id": "RolloutPlanWaveOrchestrationOptions", + "properties": { + "delays": { + "description": "Optional. Delays, if any, to be added between batches of projects. We allow\nmultiple Delays to be specified, letting users set separate delays\nbetween batches of projects corresponding to different locations and\nbatches of projects corresponding to the same location.", + "items": { + "$ref": "RolloutPlanWaveOrchestrationOptionsDelay" + }, + "type": "array" + }, + "maxConcurrentLocations": { + "description": "Optional. Maximum number of locations to be orchestrated in parallel.", + "format": "int64", + "type": "string" + }, + "maxConcurrentResourcesPerLocation": { + "description": "Optional. Maximum number of resources to be orchestrated per location in\nparallel.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "RolloutPlanWaveOrchestrationOptionsDelay": { + "description": "Options to control the delay, if any, between batches of projects.", + "id": "RolloutPlanWaveOrchestrationOptionsDelay", + "properties": { + "delimiter": { + "description": "Optional. Controls whether the delay should only be added between batches of\nprojects corresponding to different locations, or also between\nbatches of projects corresponding to the same location.\n\nMust be set to DELIMITER_UNSPECIFIED if no delay is to be added.", + "enum": [ + "DELIMITER_BATCH", + "DELIMITER_LOCATION", + "DELIMITER_UNSPECIFIED" + ], + "enumDescriptions": [ + "The delay will also be added between batches of projects\ncorresponding to the same location.", + "The delay will only be added between batches of projects\ncorresponding to different locations.", + "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." + ], + "type": "string" + }, + "duration": { + "description": "Optional. The duration of the delay, if any, to be added between batches of\nprojects. A zero duration corresponds to no delay.", + "format": "google-duration", + "type": "string" + }, + "type": { + "description": "Optional. Controls whether the specified duration is to be added at the end of\neach batch, or if the total processing time for each batch will be\npadded if needed to meet the specified duration.\n\nMust be set to TYPE_UNSPECIFIED if no delay is to be added.", + "enum": [ + "TYPE_MINIMUM", + "TYPE_OFFSET", + "TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "The total processing time for each batch of projects will be padded\nif needed to meet the specified delay duration.", + "The specified delay will directly be added after each batch of\nprojects as specified by the delimiter.", + "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." + ], + "type": "string" + } + }, + "type": "object" + }, + "RolloutPlanWaveSelector": { + "description": "A selector which specifies what resource(s) are included in a given wave.", + "id": "RolloutPlanWaveSelector", + "properties": { + "locationSelector": { + "$ref": "RolloutPlanWaveSelectorLocationSelector", + "description": "Optional. Roll out to resources by Cloud locations." + }, + "resourceHierarchySelector": { + "$ref": "RolloutPlanWaveSelectorResourceHierarchySelector", + "description": "Optional. Roll out to resources by Cloud Resource Manager resource hierarchy." + } + }, + "type": "object" + }, + "RolloutPlanWaveSelectorLocationSelector": { + "description": "Roll out to resources by location.", + "id": "RolloutPlanWaveSelectorLocationSelector", + "properties": { + "includedLocations": { + "description": "Optional. Example: \"us-central1-a\"", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RolloutPlanWaveSelectorResourceHierarchySelector": { + "description": "Roll out to resources by Cloud Resource Manager resource hierarchy\nnodes such as projects, folders, orgs.", + "id": "RolloutPlanWaveSelectorResourceHierarchySelector", + "properties": { + "includedFolders": { + "description": "Optional. Format: \"folders/{folder_id}\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedOrganizations": { + "description": "Optional. Format: \"organizations/{organization_id}\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedProjects": { + "description": "Optional. Format: \"projects/{project_id}\"", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RolloutPlanWaveValidation": { + "description": "The validation to be performed before progressing to the next wave.", + "id": "RolloutPlanWaveValidation", + "properties": { + "timeBasedValidationMetadata": { + "$ref": "RolloutPlanWaveValidationTimeBasedValidationMetadata", + "description": "Optional. Metadata required if type = \"time\"." + }, + "type": { + "description": "Required. The type of the validation. If a type of validation is associated with\na metadata object, the appropriate metadata field mapping to the\nvalidation type must be provided in the validation message. Possible\nvalues are in quotes below alongside an explanation:\n \"manual\": The system waits for an end-user approval API before\n progressing to the next wave.\n \"time\": The system waits for a user specified duration before\n progressing to the next wave. TimeBasedValidation must be provided.", + "type": "string" + } + }, + "type": "object" + }, + "RolloutPlanWaveValidationTimeBasedValidationMetadata": { + "description": "Metadata required if type = \"time\".", + "id": "RolloutPlanWaveValidationTimeBasedValidationMetadata", + "properties": { + "waitDuration": { + "description": "Optional. The duration that the system waits in between waves. This wait starts\nafter all changes in the wave are rolled out.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "RolloutPlansListResponse": { + "description": "Contains a list of RolloutPlan resources.", + "id": "RolloutPlansListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of RolloutPlan resources.", + "items": { + "$ref": "RolloutPlan" + }, + "type": "array" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", + "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\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed\noperation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as\ndeprecated", + "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\nexperimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden.\nDeprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the\nsame 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\nthe mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g:\nregions.list).", + "The user attempted to use a resource that requires a TOS they have not\naccepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle 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:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts 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" + }, "RolloutPolicy": { "description": "A rollout policy configuration.", "id": "RolloutPolicy", @@ -92046,6 +93279,251 @@ }, "type": "object" }, + "RolloutRolloutEntity": { + "description": "Specifications of the resource to roll out.", + "id": "RolloutRolloutEntity", + "properties": { + "orchestratedEntity": { + "$ref": "RolloutRolloutEntityOrchestratedEntity", + "description": "Optional. Entity details for products using the Orchestrated Integration model." + } + }, + "type": "object" + }, + "RolloutRolloutEntityOrchestratedEntity": { + "description": "This message is used if the resource type follows the Orchestrated\nintegration model with ProgressiveRollout.", + "id": "RolloutRolloutEntityOrchestratedEntity", + "properties": { + "conflictBehavior": { + "description": "Required. Specifies the behavior of the Rollout if an out of band update is\ndetected in a project during a Rollout. It can be one of the following\nvalues:\n1) overwrite : Overwrite the local value with the rollout value.\n2) no_overwrite : Do not overwrite the local value with the rollout\nvalue.", + "type": "string" + }, + "orchestrationAction": { + "description": "Required. Orchestration action during the Rollout. It can be one of the following\nvalues:\n1) \"update\": Resources will be updated by the rollout.\n2) \"delete\": Resources will be deleted by the rollout.", + "type": "string" + }, + "orchestrationSource": { + "description": "Required. Fully qualified resource name of the resource which contains the source\nof truth of the configuration being rolled out across\nlocations/projects. For example, in the case of a global Rollout which\nis applied across regions, this contains the name of the global\nresource created by the user which contains a payload for a resource\nthat is orchestrated across regions. This follows the following format:\n//.googleapis.com/projects//locations/global//\ne.g.\n//osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1", + "type": "string" + } + }, + "type": "object" + }, + "RolloutWaveDetails": { + "description": "Additional metadata about the status of each wave provided by the server.", + "id": "RolloutWaveDetails", + "properties": { + "orchestratedWaveDetails": { + "$ref": "RolloutWaveDetailsOrchestratedWaveDetails", + "description": "Output only. Additional details of the wave for products using the Orchestrated\nIntegration model.", + "readOnly": true + }, + "waveDisplayName": { + "description": "Output only. Wave name.\nEx. wave1", + "readOnly": true, + "type": "string" + }, + "waveNumber": { + "description": "Output only. System generated number for the wave.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RolloutWaveDetailsOrchestratedWaveDetails": { + "description": "Details of the wave for products using the Orchestrated integration\nmodel.", + "id": "RolloutWaveDetailsOrchestratedWaveDetails", + "properties": { + "completedResourcesCount": { + "description": "Output only. Resource completed so far.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "estimatedTotalResourcesCount": { + "description": "Output only. Estimated total count of resources.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "failedLocations": { + "description": "Output only. Locations that failed during orchestration, and ProgressiveRollout\nstopped retrying. There may be some successful resources rolled out in\nthe wave as the location may have failed later in the Rollout.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "failedResourcesCount": { + "description": "Output only. Resources failed.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RolloutsListResponse": { + "id": "RolloutsListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of Rollout resources.", + "items": { + "$ref": "Rollout" + }, + "type": "array" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", + "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\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed\noperation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as\ndeprecated", + "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\nexperimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden.\nDeprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the\nsame 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\nthe mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g:\nregions.list).", + "The user attempted to use a resource that requires a TOS they have not\naccepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle 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:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts 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" + }, "Route": { "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific\ndestination. This destination can be inside or outside the VPC network.\nFor more information, read theRoutes overview.", "id": "Route", diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index cacbc85d0c9..3e92aae3522 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -244,6 +244,8 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.ReservationSubBlocks = NewReservationSubBlocksService(s) s.Reservations = NewReservationsService(s) s.ResourcePolicies = NewResourcePoliciesService(s) + s.RolloutPlans = NewRolloutPlansService(s) + s.Rollouts = NewRolloutsService(s) s.Routers = NewRoutersService(s) s.Routes = NewRoutesService(s) s.SecurityPolicies = NewSecurityPoliciesService(s) @@ -490,6 +492,10 @@ type Service struct { ResourcePolicies *ResourcePoliciesService + RolloutPlans *RolloutPlansService + + Rollouts *RolloutsService + Routers *RoutersService Routes *RoutesService @@ -1432,6 +1438,24 @@ type ResourcePoliciesService struct { s *Service } +func NewRolloutPlansService(s *Service) *RolloutPlansService { + rs := &RolloutPlansService{s: s} + return rs +} + +type RolloutPlansService struct { + s *Service +} + +func NewRolloutsService(s *Service) *RolloutsService { + rs := &RolloutsService{s: s} + return rs +} + +type RolloutsService struct { + s *Service +} + func NewRoutersService(s *Service) *RoutersService { rs := &RoutersService{s: s} return rs @@ -11005,6 +11029,7 @@ type Commitment struct { // "GENERAL_PURPOSE_N2" // "GENERAL_PURPOSE_N2D" // "GENERAL_PURPOSE_N4" + // "GENERAL_PURPOSE_N4D" // "GENERAL_PURPOSE_T2D" // "GRAPHICS_OPTIMIZED" // "MEMORY_OPTIMIZED" @@ -14176,12 +14201,38 @@ func (s DiskSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DiskSettingsAccessLocation: AccessLocation is only used for regional +// snapshot. It contains which +// regions are allowed to create a regional snapshot from disks located in +// the +// given region/zone. +// It includes key-value pairs designed to store the following structure. +// The +// keys should match their corresponding values, which must be +// provided: +// +// access_location: { +// locations { +// us-central1 { +// region: "us-central1" +// }, +// asia-west2 { +// region: "asia-west2" +// } +// } +// } type DiskSettingsAccessLocation struct { + // Locations: List of regions that can create a regional + // snapshot from the current region Locations map[string]DiskSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` + // Policy: Policy of which location is allowed to access snapshot. + // // Possible values: - // "ALL_REGIONS" + // "ALL_REGIONS" - Any regions will be able to access the source location. // "POLICY_UNSPECIFIED" - // "SPECIFIC_REGIONS" + // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to create + // region scoped + // snapshots Policy string `json:"policy,omitempty"` // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with empty or @@ -14201,7 +14252,10 @@ func (s DiskSettingsAccessLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DiskSettingsAccessLocationAccessLocationPreference: A structure for +// specifying an allowed target region to create snapshot. type DiskSettingsAccessLocationAccessLocationPreference struct { + // Region: Accessible region name Region string `json:"region,omitempty"` // ForceSendFields is a list of field names (e.g. "Region") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -20568,6 +20622,191 @@ func (s GlobalVmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GlobalVmExtensionPolicyList: Response to list global VM extension policy +// resources. +type GlobalVmExtensionPolicyList 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 GlobalVmExtensionPolicy resources. + Items []*GlobalVmExtensionPolicy `json:"items,omitempty"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for + // list requests. If the number of results is larger thanmaxResults, 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 *GlobalVmExtensionPolicyListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GlobalVmExtensionPolicyList) MarshalJSON() ([]byte, error) { + type NoMethod GlobalVmExtensionPolicyList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GlobalVmExtensionPolicyListWarning: [Output Only] Informational warning +// message. +type GlobalVmExtensionPolicyListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute + // Engine returns NO_RESULTS_ON_PAGE if there + // are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed + // operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as + // deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as + // experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. + // Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is + // not of type HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed + // which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the + // network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an + // ipv6 interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the + // same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite + // the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: + // regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not + // accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted + // because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but + // its application does not make a lot of sense, because it allows only + // single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: + // value format. For example: + // + // "data": [ + // { + // "key": "scope", + // "value": "zones/us-east1-d" + // } + Data []*GlobalVmExtensionPolicyListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GlobalVmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod GlobalVmExtensionPolicyListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type GlobalVmExtensionPolicyListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being + // returned. For example, for warnings where there are no results in a + // list + // request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a + // key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GlobalVmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod GlobalVmExtensionPolicyListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GlobalVmExtensionPolicyRolloutOperation: Represents the rollout operation type GlobalVmExtensionPolicyRolloutOperation struct { // RolloutInput: Required. The rollout input which defines the rollout plan. @@ -24099,7 +24338,7 @@ type HttpHeaderMatch struct { // rangeMatch must be set. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` // SuffixMatch: The value of the header must end with the contents // ofsuffixMatch. @@ -24453,7 +24692,7 @@ type HttpQueryParameterMatch struct { // Only one of presentMatch, exactMatch, orregexMatch must be set. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. 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 @@ -24944,7 +25183,8 @@ type HttpRouteRuleMatch struct { // // fullPathMatch must be from 1 to 1024 characters. // - // Only one of prefixMatch, fullPathMatch or regexMatch must be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be // specified. FullPathMatch string `json:"fullPathMatch,omitempty"` // HeaderMatches: Specifies a list of header match criteria, all of which must @@ -25008,7 +25248,9 @@ type HttpRouteRuleMatch struct { // // The value must be from 1 to 1024 characters. // - // Only one of prefixMatch, fullPathMatch or regexMatch must be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be + // specified. // specified. PrefixMatch string `json:"prefixMatch,omitempty"` // QueryParameterMatches: Specifies a list of query parameter match criteria, @@ -25023,12 +25265,12 @@ type HttpRouteRuleMatch struct { // supplied with the original URL. For // more information about regular expression syntax, see Syntax. // - // Only one of prefixMatch, fullPathMatch orregexMatch must - // be + // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match + // must be // specified. // // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. + // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. 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 @@ -27564,8 +27806,16 @@ func (s InstanceGroupManagerInstanceFlexibilityPolicy) MarshalJSON() ([]byte, er } type InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection struct { + // Disks: List of disks to be attached to the instances created from + // this + // selection. + Disks []*AttachedDisk `json:"disks,omitempty"` // MachineTypes: Full machine-type names, e.g. "n1-standard-16". MachineTypes []string `json:"machineTypes,omitempty"` + // MinCpuPlatform: Name of the minimum CPU platform to be used by this instance + // selection. + // e.g. 'Intel Ice Lake'. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // Rank: Preference of this instance selection. Lower number means // higher // preference. MIG will first try to create a VM based on the machine-type @@ -27574,13 +27824,13 @@ type InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection struct { // same // preference. Rank int64 `json:"rank,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineTypes") to include in API + // NullFields is a list of field names (e.g. "Disks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -40204,8 +40454,14 @@ func (s ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byt } type ManagedInstancePropertiesFromFlexibilityPolicy struct { + // Disks: List of disks to be attached to the instance. + Disks []*AttachedDisk `json:"disks,omitempty"` // MachineType: The machine type to be used for this instance. MachineType string `json:"machineType,omitempty"` + // MinCpuPlatform: Name of the minimum CPU platform to be used by this + // instance. + // e.g. 'Intel Ice Lake'. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: @@ -40218,13 +40474,13 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineType") to include in API + // NullFields is a list of field names (e.g. "Disks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -59470,6 +59726,623 @@ func (s ResourceStatusShutdownDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Rollout: Represent a Rollout resource. +type Rollout struct { + // CancellationTime: Output only. The timestamp at which the Rollout was + // cancelled. + CancellationTime string `json:"cancellationTime,omitempty"` + // CompletionTime: Output only. The timestamp at which the Rollout was + // completed. + CompletionTime string `json:"completionTime,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 + // text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // CurrentWaveNumber: Output only. The number of the currently running + // wave. + // Ex. 1 + CurrentWaveNumber int64 `json:"currentWaveNumber,omitempty,string"` + // Description: An optional description of this resource. Provide this property + // when you + // create the resource. + Description string `json:"description,omitempty"` + // Etag: Output only. etag of the Rollout + // Ex. abc1234 + Etag string `json:"etag,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#rollout + // for rollouts. + 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 withRFC1035. + // 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"` + // RolloutEntity: Required. The resource being rolled out. + RolloutEntity *RolloutRolloutEntity `json:"rolloutEntity,omitempty"` + // RolloutPlan: Required. Rollout Plan used to model the Rollout. + // Ex. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1 + RolloutPlan string `json:"rolloutPlan,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // State: Output only. The current state of the Rollout. + // + // Possible values: + // "CANCELLED" - The rollout is in a failure terminal state. + // "CANCELLING" - The rollout is being cancelled. + // "CANCEL_FAILED" - An attempted cancel operation was unsuccessful. + // "COMPLETED" - The rollout is in a successful terminal state. + // "COMPLETE_FAILED" - An attempted complete operation was unsuccessful. + // "COMPLETING" - The rollout is being marked as completed. + // "FAILED" - The rollout completed with failures. + // "PAUSED" - The rollout is paused. + // "PAUSE_FAILED" - An attempted pause operation was unsuccessful. + // "PAUSING" - The rollout is being paused. + // "PROCESSING" - A wave is being processed by the product. + // "READY" - The rollout has been successfully initialized and is ready to + // start. + // "RESUMING" - The rollout is being resumed after being paused. + // "ROLLBACK_WAVE_FAILED" - An attempted rollback operation failed to + // complete successfully. + // "ROLLING_BACK" - A wave rollback is in progress for this rollout. + // "STATE_UNSPECIFIED" - Undefined default state. Should never be exposed to + // users. + // "UNINITIALIZED" - The rollout has been created but is not yet ready to be + // started. + // "WAVE_FAILED" - The product failed to process the wave. + State string `json:"state,omitempty"` + // WaveDetails: Output only. Details about each wave of the rollout. + WaveDetails []*RolloutWaveDetails `json:"waveDetails,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CancellationTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CancellationTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Rollout) MarshalJSON() ([]byte, error) { + type NoMethod Rollout + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlan: Message describing RolloutPlan object +type RolloutPlan struct { + // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 + // 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"` + // 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#rolloutPlan + // for rolloutPlans. + Kind string `json:"kind,omitempty"` + // LocationScope: The location scope of the rollout plan. If not specified, the + // location + // scope is considered as ZONAL. + // + // Possible values: + // "LOCATION_SCOPE_UNSPECIFIED" - Unspecified value. Considered as ZONAL. + // "REGIONAL" - Regional scope. + // "ZONAL" - Zonal scope. + LocationScope string `json:"locationScope,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 withRFC1035. + // 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"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Waves: Required. The waves included in this rollout plan. + Waves []*RolloutPlanWave `json:"waves,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreationTimestamp") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlan) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlan + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWave: A single wave in a rollout plan. +type RolloutPlanWave struct { + // DisplayName: Optional. The display name of this wave of the rollout plan. + DisplayName string `json:"displayName,omitempty"` + // Number: Output only. The wave number. + Number int64 `json:"number,omitempty,string"` + // OrchestrationOptions: Optional. The orchestration options for this wave. + OrchestrationOptions *RolloutPlanWaveOrchestrationOptions `json:"orchestrationOptions,omitempty"` + // Selectors: Required. The selectors for this wave. There is a logical AND + // between each selector + // defined in a wave, so a resource must satisfy the criteria of *all* + // the + // specified selectors to be in scope for the wave. + Selectors []*RolloutPlanWaveSelector `json:"selectors,omitempty"` + // Validation: Required. The validation to be performed at the end of this + // wave. + Validation *RolloutPlanWaveValidation `json:"validation,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWave) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWave + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveOrchestrationOptions: Options to control the pace of +// orchestration of a wave. These options are +// required only if the resource being rolled out follows the +// Orchestrated +// pattern. +type RolloutPlanWaveOrchestrationOptions struct { + // Delays: Optional. Delays, if any, to be added between batches of projects. + // We allow + // multiple Delays to be specified, letting users set separate delays + // between batches of projects corresponding to different locations and + // batches of projects corresponding to the same location. + Delays []*RolloutPlanWaveOrchestrationOptionsDelay `json:"delays,omitempty"` + // MaxConcurrentLocations: Optional. Maximum number of locations to be + // orchestrated in parallel. + MaxConcurrentLocations int64 `json:"maxConcurrentLocations,omitempty,string"` + // MaxConcurrentResourcesPerLocation: Optional. Maximum number of resources to + // be orchestrated per location in + // parallel. + MaxConcurrentResourcesPerLocation int64 `json:"maxConcurrentResourcesPerLocation,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Delays") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Delays") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveOrchestrationOptions) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveOrchestrationOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveOrchestrationOptionsDelay: Options to control the delay, if +// any, between batches of projects. +type RolloutPlanWaveOrchestrationOptionsDelay struct { + // Delimiter: Optional. Controls whether the delay should only be added between + // batches of + // projects corresponding to different locations, or also between + // batches of projects corresponding to the same location. + // + // Must be set to DELIMITER_UNSPECIFIED if no delay is to be added. + // + // Possible values: + // "DELIMITER_BATCH" - The delay will also be added between batches of + // projects + // corresponding to the same location. + // "DELIMITER_LOCATION" - The delay will only be added between batches of + // projects + // corresponding to different locations. + // "DELIMITER_UNSPECIFIED" - No delay will be added between batches of + // projects. Processing will + // continue with the next batch as soon as the previous batch of LROs + // is done. + Delimiter string `json:"delimiter,omitempty"` + // Duration: Optional. The duration of the delay, if any, to be added between + // batches of + // projects. A zero duration corresponds to no delay. + Duration string `json:"duration,omitempty"` + // Type: Optional. Controls whether the specified duration is to be added at + // the end of + // each batch, or if the total processing time for each batch will be + // padded if needed to meet the specified duration. + // + // Must be set to TYPE_UNSPECIFIED if no delay is to be added. + // + // Possible values: + // "TYPE_MINIMUM" - The total processing time for each batch of projects will + // be padded + // if needed to meet the specified delay duration. + // "TYPE_OFFSET" - The specified delay will directly be added after each + // batch of + // projects as specified by the delimiter. + // "TYPE_UNSPECIFIED" - No delay will be added between batches of projects. + // Processing will + // continue with the next batch as soon as the previous batch of LROs + // is done. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Delimiter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Delimiter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveOrchestrationOptionsDelay) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveOrchestrationOptionsDelay + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveSelector: A selector which specifies what resource(s) are +// included in a given wave. +type RolloutPlanWaveSelector struct { + // LocationSelector: Optional. Roll out to resources by Cloud locations. + LocationSelector *RolloutPlanWaveSelectorLocationSelector `json:"locationSelector,omitempty"` + // ResourceHierarchySelector: Optional. Roll out to resources by Cloud Resource + // Manager resource hierarchy. + ResourceHierarchySelector *RolloutPlanWaveSelectorResourceHierarchySelector `json:"resourceHierarchySelector,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationSelector") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationSelector") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveSelector) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveSelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveSelectorLocationSelector: Roll out to resources by location. +type RolloutPlanWaveSelectorLocationSelector struct { + // IncludedLocations: Optional. Example: "us-central1-a" + IncludedLocations []string `json:"includedLocations,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludedLocations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludedLocations") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveSelectorLocationSelector) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveSelectorLocationSelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveSelectorResourceHierarchySelector: Roll out to resources by +// Cloud Resource Manager resource hierarchy +// nodes such as projects, folders, orgs. +type RolloutPlanWaveSelectorResourceHierarchySelector struct { + // IncludedFolders: Optional. Format: "folders/{folder_id}" + IncludedFolders []string `json:"includedFolders,omitempty"` + // IncludedOrganizations: Optional. Format: "organizations/{organization_id}" + IncludedOrganizations []string `json:"includedOrganizations,omitempty"` + // IncludedProjects: Optional. Format: "projects/{project_id}" + IncludedProjects []string `json:"includedProjects,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludedFolders") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludedFolders") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveSelectorResourceHierarchySelector) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveSelectorResourceHierarchySelector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveValidation: The validation to be performed before progressing +// to the next wave. +type RolloutPlanWaveValidation struct { + // TimeBasedValidationMetadata: Optional. Metadata required if type = "time". + TimeBasedValidationMetadata *RolloutPlanWaveValidationTimeBasedValidationMetadata `json:"timeBasedValidationMetadata,omitempty"` + // Type: Required. The type of the validation. If a type of validation is + // associated with + // a metadata object, the appropriate metadata field mapping to the + // validation type must be provided in the validation message. Possible + // values are in quotes below alongside an explanation: + // "manual": The system waits for an end-user approval API before + // progressing to the next wave. + // "time": The system waits for a user specified duration before + // progressing to the next wave. TimeBasedValidation must be provided. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TimeBasedValidationMetadata") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TimeBasedValidationMetadata") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveValidation) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveValidation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlanWaveValidationTimeBasedValidationMetadata: Metadata required if +// type = "time". +type RolloutPlanWaveValidationTimeBasedValidationMetadata struct { + // WaitDuration: Optional. The duration that the system waits in between waves. + // This wait starts + // after all changes in the wave are rolled out. + WaitDuration string `json:"waitDuration,omitempty"` + // ForceSendFields is a list of field names (e.g. "WaitDuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "WaitDuration") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlanWaveValidationTimeBasedValidationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlanWaveValidationTimeBasedValidationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlansListResponse: Contains a list of RolloutPlan resources. +type RolloutPlansListResponse 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 RolloutPlan resources. + Items []*RolloutPlan `json:"items,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 thanmaxResults, 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. + // end_interface: MixerListResponseWithEtagBuilder + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RolloutPlansListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlansListResponse) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlansListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutPlansListResponseWarning: [Output Only] Informational warning +// message. +type RolloutPlansListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute + // Engine returns NO_RESULTS_ON_PAGE if there + // are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed + // operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as + // deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as + // experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. + // Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is + // not of type HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed + // which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the + // network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an + // ipv6 interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the + // same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite + // the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: + // regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not + // accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted + // because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but + // its application does not make a lot of sense, because it allows only + // single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: + // value format. For example: + // + // "data": [ + // { + // "key": "scope", + // "value": "zones/us-east1-d" + // } + Data []*RolloutPlansListResponseWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlansListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlansListResponseWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RolloutPlansListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being + // returned. For example, for warnings where there are no results in a + // list + // request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a + // key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutPlansListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPlansListResponseWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RolloutPolicy: A rollout policy configuration. type RolloutPolicy struct { // DefaultRolloutTime: An optional RFC3339 timestamp on or after which the @@ -59504,6 +60377,323 @@ func (s RolloutPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RolloutRolloutEntity: Specifications of the resource to roll out. +type RolloutRolloutEntity struct { + // OrchestratedEntity: Optional. Entity details for products using the + // Orchestrated Integration model. + OrchestratedEntity *RolloutRolloutEntityOrchestratedEntity `json:"orchestratedEntity,omitempty"` + // ForceSendFields is a list of field names (e.g. "OrchestratedEntity") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OrchestratedEntity") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutRolloutEntity) MarshalJSON() ([]byte, error) { + type NoMethod RolloutRolloutEntity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutRolloutEntityOrchestratedEntity: This message is used if the resource +// type follows the Orchestrated +// integration model with ProgressiveRollout. +type RolloutRolloutEntityOrchestratedEntity struct { + // ConflictBehavior: Required. Specifies the behavior of the Rollout if an out + // of band update is + // detected in a project during a Rollout. It can be one of the + // following + // values: + // 1) overwrite : Overwrite the local value with the rollout value. + // 2) no_overwrite : Do not overwrite the local value with the rollout + // value. + ConflictBehavior string `json:"conflictBehavior,omitempty"` + // OrchestrationAction: Required. Orchestration action during the Rollout. It + // can be one of the following + // values: + // 1) "update": Resources will be updated by the rollout. + // 2) "delete": Resources will be deleted by the rollout. + OrchestrationAction string `json:"orchestrationAction,omitempty"` + // OrchestrationSource: Required. Fully qualified resource name of the resource + // which contains the source + // of truth of the configuration being rolled out across + // locations/projects. For example, in the case of a global Rollout which + // is applied across regions, this contains the name of the global + // resource created by the user which contains a payload for a resource + // that is orchestrated across regions. This follows the following + // format: + // //.googleapis.com/projects//locations/global// + // e.g. + // //osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1 + OrchestrationSource string `json:"orchestrationSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConflictBehavior") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutRolloutEntityOrchestratedEntity) MarshalJSON() ([]byte, error) { + type NoMethod RolloutRolloutEntityOrchestratedEntity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutWaveDetails: Additional metadata about the status of each wave +// provided by the server. +type RolloutWaveDetails struct { + // OrchestratedWaveDetails: Output only. Additional details of the wave for + // products using the Orchestrated + // Integration model. + OrchestratedWaveDetails *RolloutWaveDetailsOrchestratedWaveDetails `json:"orchestratedWaveDetails,omitempty"` + // WaveDisplayName: Output only. Wave name. + // Ex. wave1 + WaveDisplayName string `json:"waveDisplayName,omitempty"` + // WaveNumber: Output only. System generated number for the wave. + WaveNumber int64 `json:"waveNumber,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "OrchestratedWaveDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OrchestratedWaveDetails") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutWaveDetails) MarshalJSON() ([]byte, error) { + type NoMethod RolloutWaveDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutWaveDetailsOrchestratedWaveDetails: Details of the wave for products +// using the Orchestrated integration +// model. +type RolloutWaveDetailsOrchestratedWaveDetails struct { + // CompletedResourcesCount: Output only. Resource completed so far. + CompletedResourcesCount int64 `json:"completedResourcesCount,omitempty,string"` + // EstimatedTotalResourcesCount: Output only. Estimated total count of + // resources. + EstimatedTotalResourcesCount int64 `json:"estimatedTotalResourcesCount,omitempty,string"` + // FailedLocations: Output only. Locations that failed during orchestration, + // and ProgressiveRollout + // stopped retrying. There may be some successful resources rolled out in + // the wave as the location may have failed later in the Rollout. + FailedLocations []string `json:"failedLocations,omitempty"` + // FailedResourcesCount: Output only. Resources failed. + FailedResourcesCount int64 `json:"failedResourcesCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CompletedResourcesCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CompletedResourcesCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutWaveDetailsOrchestratedWaveDetails) MarshalJSON() ([]byte, error) { + type NoMethod RolloutWaveDetailsOrchestratedWaveDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RolloutsListResponse 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 Rollout resources. + Items []*Rollout `json:"items,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 thanmaxResults, 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. + // end_interface: MixerListResponseWithEtagBuilder + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RolloutsListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod RolloutsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RolloutsListResponseWarning: [Output Only] Informational warning message. +type RolloutsListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute + // Engine returns NO_RESULTS_ON_PAGE if there + // are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed + // operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as + // deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as + // experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. + // Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is + // not of type HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed + // which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the + // network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an + // ipv6 interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the + // same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite + // the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: + // regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not + // accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted + // because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but + // its application does not make a lot of sense, because it allows only + // single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: + // value format. For example: + // + // "data": [ + // { + // "key": "scope", + // "value": "zones/us-east1-d" + // } + Data []*RolloutsListResponseWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutsListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod RolloutsListResponseWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RolloutsListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being + // returned. For example, for warnings where there are no results in a + // list + // request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a + // key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RolloutsListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RolloutsListResponseWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Route: Represents a Route resource. // // A route defines a path from VM instances in the VPC network to a diff --git a/compute/v0.beta/compute2-gen.go b/compute/v0.beta/compute2-gen.go index 3d530b1908d..e2580135dce 100644 --- a/compute/v0.beta/compute2-gen.go +++ b/compute/v0.beta/compute2-gen.go @@ -25581,6 +25581,145 @@ func (c *GlobalVmExtensionPoliciesAggregatedListCall) Pages(ctx context.Context, } } +type GlobalVmExtensionPoliciesDeleteCall struct { + s *Service + project string + globalVmExtensionPolicy string + globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Purge scoped resources (zonal policies) from a global VM +// extension +// policy, and then delete the global VM extension policy. Purge of the +// scoped +// resources is a pre-condition of the global VM extension policy deletion. +// The deletion of the global VM extension policy happens after the +// purge +// rollout is done, so it's not a part of the LRO. It's an automatic +// process +// that triggers in the backend. +// +// - globalVmExtensionPolicy: Name of the global VM extension policy to purge +// scoped resources for. +// - project: Project ID for this request. +func (r *GlobalVmExtensionPoliciesService) Delete(project string, globalVmExtensionPolicy string, globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput) *GlobalVmExtensionPoliciesDeleteCall { + c := &GlobalVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.globalVmExtensionPolicy = globalVmExtensionPolicy + c.globalvmextensionpolicyrolloutoperationrolloutinput = globalvmextensionpolicyrolloutoperationrolloutinput + 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 *GlobalVmExtensionPoliciesDeleteCall) RequestId(requestId string) *GlobalVmExtensionPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *GlobalVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *GlobalVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *GlobalVmExtensionPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicyrolloutoperationrolloutinput) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete") + 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, + "globalVmExtensionPolicy": c.globalVmExtensionPolicy, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalVmExtensionPolicies.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *GlobalVmExtensionPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type GlobalVmExtensionPoliciesGetCall struct { s *Service project string @@ -25696,7 +25835,132 @@ func (c *GlobalVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Gl return ret, nil } -type HealthChecksAggregatedListCall struct { +type GlobalVmExtensionPoliciesInsertCall struct { + s *Service + project string + globalvmextensionpolicy *GlobalVmExtensionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new project level GlobalVmExtensionPolicy. +// +// - project: Project ID for this request. +func (r *GlobalVmExtensionPoliciesService) Insert(project string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesInsertCall { + c := &GlobalVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.globalvmextensionpolicy = globalvmextensionpolicy + 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 *GlobalVmExtensionPoliciesInsertCall) RequestId(requestId string) *GlobalVmExtensionPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *GlobalVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *GlobalVmExtensionPoliciesInsertCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *GlobalVmExtensionPoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalVmExtensionPolicies.insert" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *GlobalVmExtensionPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type GlobalVmExtensionPoliciesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -25705,17 +25969,11 @@ type HealthChecksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of all HealthCheck resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. +// List: Lists global VM extension policies. // -// - project: Name of the project scoping this request. -func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { - c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *GlobalVmExtensionPoliciesService) List(project string) *GlobalVmExtensionPoliciesListCall { + c := &GlobalVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -25787,29 +26045,11 @@ func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggreg // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) Filter(filter string) *GlobalVmExtensionPoliciesListCall { 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 *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { - 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`, @@ -25817,7 +26057,7 @@ func (c *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) MaxResults(maxResults int64) *GlobalVmExtensionPoliciesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -25837,7 +26077,7 @@ func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChe // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) OrderBy(orderBy string) *GlobalVmExtensionPoliciesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -25846,7 +26086,7 @@ func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAg // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) PageToken(pageToken string) *GlobalVmExtensionPoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25861,23 +26101,15 @@ func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChec // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalVmExtensionPoliciesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *HealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *HealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25885,34 +26117,34 @@ func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChe // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { +func (c *GlobalVmExtensionPoliciesListCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *HealthChecksAggregatedListCall) Header() http.Header { +func (c *GlobalVmExtensionPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -25922,17 +26154,17 @@ func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, googleapi.Expand(req.URL, map[string]string{ "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.aggregatedList" call. +// Do executes the "compute.globalVmExtensionPolicies.list" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthChecksAggregatedList.ServerResponse.Header or (if a response was +// *GlobalVmExtensionPolicyList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, error) { +func (c *GlobalVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*GlobalVmExtensionPolicyList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25951,7 +26183,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthChecksAggregatedList{ + ret := &GlobalVmExtensionPolicyList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25962,14 +26194,14 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { +func (c *GlobalVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*GlobalVmExtensionPolicyList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25987,23 +26219,25 @@ func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*Heal } } -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalVmExtensionPoliciesUpdateCall struct { + s *Service + project string + globalVmExtensionPolicy string + globalvmextensionpolicy *GlobalVmExtensionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Update: Updates a global VM extension policy. // -// - healthCheck: Name of the HealthCheck resource to delete. +// - globalVmExtensionPolicy: Name of the global VM extension policy to update. // - project: Project ID for this request. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalVmExtensionPoliciesService) Update(project string, globalVmExtensionPolicy string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesUpdateCall { + c := &GlobalVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck + c.globalVmExtensionPolicy = globalVmExtensionPolicy + c.globalvmextensionpolicy = globalvmextensionpolicy return c } @@ -26024,7 +26258,7 @@ func (r *HealthChecksService) Delete(project string, healthCheck string) *Health // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { +func (c *GlobalVmExtensionPoliciesUpdateCall) RequestId(requestId string) *GlobalVmExtensionPoliciesUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -26032,51 +26266,55 @@ func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDelete // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { +func (c *GlobalVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { +func (c *GlobalVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { +func (c *GlobalVmExtensionPoliciesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *GlobalVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + 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, - "healthCheck": c.healthCheck, + "project": c.project, + "globalVmExtensionPolicy": c.globalVmExtensionPolicy, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.delete" call. +// Do executes the "compute.globalVmExtensionPolicies.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalVmExtensionPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26106,35 +26344,192 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type HealthChecksGetCall struct { +type HealthChecksAggregatedListCall struct { s *Service project string - healthCheck string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified HealthCheck resource. +// AggregatedList: Retrieves the list of all HealthCheck resources, regional +// and global, +// available to the specified project. // -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// To prevent failure, Google recommends that you set +// the +// `returnPartialSuccess` parameter to `true`. +// +// - project: Name of the project scoping this request. +func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { + c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { + 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 *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { + 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 *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { + 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 *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { + 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 *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which +// aggregated list request is invoked for subnetworks list-usable api. +func (c *HealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *HealthChecksAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { +func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26142,34 +26537,34 @@ func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { +func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { +func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { +func (c *HealthChecksAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -26177,19 +26572,19 @@ func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.get" call. +// Do executes the "compute.healthChecks.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { +// *HealthChecksAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26208,7 +26603,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheck{ + ret := &HealthChecksAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26219,7 +26614,264 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type HealthChecksDeleteCall struct { + s *Service + project string + healthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified HealthCheck resource. +// +// - healthCheck: Name of the HealthCheck resource to delete. +// - project: Project ID for this request. +func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { + c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.healthCheck = healthCheck + 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 *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *HealthChecksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "healthCheck": c.healthCheck, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.healthChecks.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type HealthChecksGetCall struct { + s *Service + project string + healthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified HealthCheck resource. +// +// - healthCheck: Name of the HealthCheck resource to return. +// - project: Project ID for this request. +func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { + c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.healthCheck = healthCheck + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *HealthChecksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "healthCheck": c.healthCheck, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.healthChecks.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *HealthCheck.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &HealthCheck{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } @@ -71277,9 +71929,13 @@ type OrganizationSecurityPoliciesAddAssociationCall struct { // Cloud // Armor Enterprise if not already enrolled. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.addAssociation instead if possible. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.addAssociation +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall { @@ -71417,6 +72073,12 @@ type OrganizationSecurityPoliciesAddRuleCall struct { // AddRule: Inserts a rule into a security policy. // +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.addRule instead. +// // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall { c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -71541,9 +72203,13 @@ type OrganizationSecurityPoliciesCopyRulesCall struct { // CopyRules: Copies rules to the specified security policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.copyRules instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.cloneRules +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) CopyRules(securityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { @@ -71671,9 +72337,11 @@ type OrganizationSecurityPoliciesDeleteCall struct { // Delete: Deletes the specified policy. // -// Use of this API to remove firewall policies is deprecated. -// Use -// firewallPolicies.delete instead. +// Use this API to remove Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to remove firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.delete instead. // // - securityPolicy: Name of the security policy to delete. func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall { @@ -71796,9 +72464,11 @@ type OrganizationSecurityPoliciesGetCall struct { // Get: List all of the ordered rules present in a single specified // policy. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.get instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.get instead. // // - securityPolicy: Name of the security policy to get. func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall { @@ -71909,9 +72579,12 @@ type OrganizationSecurityPoliciesGetAssociationCall struct { // GetAssociation: Gets an association with the specified name. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.getAssociation instead if possible. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now disabled for most organizations. Use +// firewallPolicies.getAssociation +// instead. // // - securityPolicy: Name of the security policy to which the queried rule // belongs. @@ -72031,9 +72704,11 @@ type OrganizationSecurityPoliciesGetRuleCall struct { // GetRule: Gets a rule at the specified priority. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.getRule instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.getRule instead. // // - securityPolicy: Name of the security policy to which the queried rule // belongs. @@ -72154,9 +72829,11 @@ type OrganizationSecurityPoliciesInsertCall struct { // included // in the request. // -// Use of this API to insert firewall policies is deprecated. -// Use -// firewallPolicies.insert instead. +// Use this API to add Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to add firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.insert instead. func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall { c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securitypolicy = securitypolicy @@ -72287,9 +72964,11 @@ type OrganizationSecurityPoliciesListCall struct { // specified // organization. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.list instead. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now +// disabled for most organizations. Use firewallPolicies.list instead. func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall { c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -72550,9 +73229,12 @@ type OrganizationSecurityPoliciesListAssociationsCall struct { // ListAssociations: Lists associations of a specified target, i.e., // organization or folder. // -// Use of this API to read firewall policies is deprecated. -// Use -// firewallPolicies.listAssociations instead if possible. +// Use this API to read Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to read firewall policies. This usage is +// now disabled for most organizations. Use +// firewallPolicies.listAssociations +// instead. func (r *OrganizationSecurityPoliciesService) ListAssociations() *OrganizationSecurityPoliciesListAssociationsCall { c := &OrganizationSecurityPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -72904,9 +73586,11 @@ type OrganizationSecurityPoliciesMoveCall struct { // Move: Moves the specified security policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.move instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.move instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) Move(securityPolicy string) *OrganizationSecurityPoliciesMoveCall { @@ -73036,9 +73720,11 @@ type OrganizationSecurityPoliciesPatchCall struct { // Patch: Patches the specified policy with the data included in the // request. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.patch instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.patch instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) Patch(securityPolicy string, securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesPatchCall { @@ -73172,9 +73858,12 @@ type OrganizationSecurityPoliciesPatchRuleCall struct { // PatchRule: Patches a rule at the specified priority. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.patchRule instead. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use firewallPolicies.patchRule +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall { @@ -73315,9 +74004,13 @@ type OrganizationSecurityPoliciesRemoveAssociationCall struct { // RemoveAssociation: Removes an association for the specified security // policy. // -// Use of this API to modify firewall policies is deprecated. -// Use -// firewallPolicies.removeAssociation instead if possible. +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.removeAssociation +// instead. // // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall { @@ -73445,6 +74138,14 @@ type OrganizationSecurityPoliciesRemoveRuleCall struct { // RemoveRule: Deletes a rule at the specified priority. // +// Use this API to modify Cloud Armor policies. Previously, alpha and +// beta +// versions of this API were used to modify firewall policies. This usage +// is +// now disabled for most organizations. Use +// firewallPolicies.removeRule +// instead. +// // - securityPolicy: Name of the security policy to update. func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall { c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -82927,62 +83628,1527 @@ func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBacke 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. +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BackendServiceList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionBackendServicesListUsableCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in +// the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// It must be a string that meets the requirements in RFC1035. +func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { + c := &RegionBackendServicesListUsableCall{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. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.listUsable" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceListUsable.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BackendServiceListUsable{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionBackendServicesPatchCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional BackendService resource with the +// data +// included in the request. For more information, see +// Understanding backend services This method +// supports PATCH semantics and uses the JSON merge +// patch format and processing rules. +// +// - backendService: Name of the BackendService resource to patch. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { + c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { + c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesSetSecurityPolicyCall struct { + s *Service + project string + region string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the +// specified backend +// service. For more information, seeGoogle +// Cloud Armor Overview +// +// - backendService: Name of the BackendService resource to which the security +// policy should be +// +// set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { + c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference + 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") + 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, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { + c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesUpdateCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified regional BackendService resource with the +// data +// included in the request. For more information, +// see +// Backend services overview. +// +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { + c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionCommitmentsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of commitments by region. +// +// To prevent failure, it is recommended that you set +// the +// `returnPartialSuccess` parameter to `true`. +// +// - project: Project ID for this request. +func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { + c := &RegionCommitmentsAggregatedListCall{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. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { + 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 *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { + 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 *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { + 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 *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { + 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 *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which +// aggregated list request is invoked for subnetworks list-usable api. +func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.aggregatedList" call. +// Any non-2xx status code is an error. Response headers are in either +// *CommitmentAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &CommitmentAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionCommitmentsGetCall struct { + s *Service + project string + region string + commitment string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified commitment resource. +// +// - commitment: Name of the commitment to return. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { + c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.commitment = commitment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCommitmentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "commitment": c.commitment, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Commitment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Commitment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionCommitmentsInsertCall struct { + s *Service + project string + region string + commitment *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a commitment in the specified project using the +// data +// included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { + c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.commitment = commitment + 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, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// 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 *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { +func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { +func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { +func (c *RegionCommitmentsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -82991,17 +85157,16 @@ func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, e "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.list" call. +// Do executes the "compute.regionCommitments.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83020,7 +85185,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83031,32 +85196,11 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionBackendServicesListUsableCall struct { +type RegionCommitmentsListCall struct { s *Service project string region string @@ -83066,15 +85210,13 @@ type RegionBackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves a list of all usable backend services in the specified -// project in -// the given region. +// List: Retrieves a list of commitments contained within +// the specified region. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { + c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -83147,7 +85289,7 @@ func (r *RegionBackendServicesService) ListUsable(project string, region string) // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { c.urlParams_.Set("filter", filter) return c } @@ -83159,7 +85301,7 @@ func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBacke // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -83179,7 +85321,7 @@ func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *Regi // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -83188,7 +85330,7 @@ func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBac // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -83203,7 +85345,7 @@ func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *Regio // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -83211,7 +85353,7 @@ func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartial // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83219,34 +85361,34 @@ func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *Regi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { +func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesListUsableCall) Header() http.Header { +func (c *RegionCommitmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -83257,17 +85399,16 @@ func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Respo "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.listUsable" call. +// Do executes the "compute.regionCommitments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, error) { +// *CommitmentList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83286,7 +85427,7 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceListUsable{ + ret := &CommitmentList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83297,14 +85438,14 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { +func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -83322,203 +85463,64 @@ func (c *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func( } } -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, see -// Understanding backend services This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetIamPolicyCall struct { +type RegionCommitmentsTestIamPermissionsCall struct { s *Service project string region string resource string - regionsetpolicyrequest *RegionSetPolicyRequest + testpermissionsrequest *TestPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified +// TestIamPermissions: Returns permissions that a caller has on the specified // resource. -// Replaces any existing policy. // // - project: Project ID for this request. // - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { + c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { +func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83530,16 +85532,17 @@ func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Res "region": c.region, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Do executes the "compute.regionCommitments.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83558,7 +85561,7 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83569,38 +85572,41 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsUpdateCall struct { + s *Service + project string + region string + commitment string + commitment2 *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend -// service. For more information, seeGoogle -// Cloud Armor Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be +// Update: Updates the specified commitment with the data included in the +// request. +// Update is performed only on selected fields included as part of +// update-mask. Only the following fields can be updated: auto_renew and plan. // -// set. The name should conform to RFC1035. +// - commitment: Name of the commitment that you want to update. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { + c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference + c.commitment = commitment + c.commitment2 = commitment2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -83621,64 +85627,71 @@ func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { +func (c *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { +func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { +func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { +func (c *RegionCommitmentsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. +// Do executes the "compute.regionCommitments.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83708,149 +85721,35 @@ func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsUpdateReservationsCall struct { + s *Service + project string + region string + commitment string + regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, -// see -// Backend services overview. +// UpdateReservations: Transfers GPUs or Local SSD disks between reservations +// that are attached +// to the same commitment. // -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - commitment: Name of the commitment for which the reservations are being +// updated. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { + c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.backendservice = backendservice + c.commitment = commitment + c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest return c } @@ -83871,7 +85770,7 @@ func (r *RegionBackendServicesService) Update(project string, region string, bac // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { +func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83879,56 +85778,56 @@ func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { +func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { +func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { +func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.update" call. +// Do executes the "compute.regionCommitments.updateReservations" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83958,6 +85857,6 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) return ret, nil } diff --git a/compute/v0.beta/compute3-gen.go b/compute/v0.beta/compute3-gen.go index a52fa6f722f..ae08237348f 100644 --- a/compute/v0.beta/compute3-gen.go +++ b/compute/v0.beta/compute3-gen.go @@ -16,7 +16,7 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) -type RegionCommitmentsAggregatedListCall struct { +type RegionCompositeHealthChecksAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -25,15 +25,17 @@ type RegionCommitmentsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of commitments by region. +// AggregatedList: Retrieves the list of all CompositeHealthCheck resources +// (all +// regional) available to the specified project. // // To prevent failure, it is recommended that you set // the // `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *RegionCompositeHealthChecksService) AggregatedList(project string) *RegionCompositeHealthChecksAggregatedListCall { + c := &RegionCompositeHealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -105,7 +107,7 @@ func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitm // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) Filter(filter string) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -123,7 +125,7 @@ func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommi // scopes of the scope types where the resource type is expected to be // found // will be included. -func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -135,7 +137,7 @@ func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -155,7 +157,7 @@ func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *Regi // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -164,7 +166,7 @@ func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCom // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) PageToken(pageToken string) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -179,7 +181,7 @@ func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *Regio // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -187,7 +189,7 @@ func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartial // ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The // Shared VPC service project id or service project number for which // aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } @@ -195,7 +197,7 @@ func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -203,34 +205,34 @@ func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *Regi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { +func (c *RegionCompositeHealthChecksAggregatedListCall) Context(ctx context.Context) *RegionCompositeHealthChecksAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { +func (c *RegionCompositeHealthChecksAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCompositeHealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/compositeHealthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -240,17 +242,17 @@ func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.aggregatedList" call. +// Do executes the "compute.regionCompositeHealthChecks.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *CompositeHealthCheckAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { +func (c *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -269,7 +271,7 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitmentAggregatedList{ + ret := &CompositeHealthCheckAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -280,14 +282,14 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { +func (c *RegionCompositeHealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -305,34 +307,162 @@ func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func( } } -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionCompositeHealthChecksDeleteCall struct { + s *Service + project string + region string + compositeHealthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified commitment resource. +// Delete: Deletes the specified CompositeHealthCheck in the given region // -// - commitment: Name of the commitment to return. +// - compositeHealthCheck: Name of the CompositeHealthCheck resource to delete. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionCompositeHealthChecksService) Delete(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksDeleteCall { + c := &RegionCompositeHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.compositeHealthCheck = compositeHealthCheck + 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 *RegionCompositeHealthChecksDeleteCall) RequestId(requestId string) *RegionCompositeHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCompositeHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionCompositeHealthChecksDeleteCall) Context(ctx context.Context) *RegionCompositeHealthChecksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCompositeHealthChecksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCompositeHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "compositeHealthCheck": c.compositeHealthCheck, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCompositeHealthChecks.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionCompositeHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionCompositeHealthChecksGetCall struct { + s *Service + project string + region string + compositeHealthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified CompositeHealthCheck resource in the given +// region. +// +// - compositeHealthCheck: Name of the CompositeHealthCheck resource to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionCompositeHealthChecksService) Get(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksGetCall { + c := &RegionCompositeHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment + c.compositeHealthCheck = compositeHealthCheck return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { +func (c *RegionCompositeHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -340,34 +470,34 @@ func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmen // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { +func (c *RegionCompositeHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { +func (c *RegionCompositeHealthChecksGetCall) Context(ctx context.Context) *RegionCompositeHealthChecksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { +func (c *RegionCompositeHealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCompositeHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -375,20 +505,21 @@ func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, + "compositeHealthCheck": c.compositeHealthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.get" call. +// Do executes the "compute.regionCompositeHealthChecks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { +// *CompositeHealthCheck.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -407,7 +538,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Commitment{ + ret := &CompositeHealthCheck{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -418,31 +549,31 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCompositeHealthChecksInsertCall struct { + s *Service + project string + region string + compositehealthcheck *CompositeHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a commitment in the specified project using the -// data -// included in the request. +// Insert: Create a CompositeHealthCheck in the specified project in the given +// region +// using the parameters that are included in the request. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionCompositeHealthChecksService) Insert(project string, region string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksInsertCall { + c := &RegionCompositeHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment + c.compositehealthcheck = compositehealthcheck return c } @@ -463,7 +594,7 @@ func (r *RegionCommitmentsService) Insert(project string, region string, commitm // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { +func (c *RegionCompositeHealthChecksInsertCall) RequestId(requestId string) *RegionCompositeHealthChecksInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -471,35 +602,35 @@ func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitm // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { +func (c *RegionCompositeHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { +func (c *RegionCompositeHealthChecksInsertCall) Context(ctx context.Context) *RegionCompositeHealthChecksInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { +func (c *RegionCompositeHealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCompositeHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -510,16 +641,16 @@ func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, err "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.insert" call. +// Do executes the "compute.regionCompositeHealthChecks.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCompositeHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -549,11 +680,11 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsListCall struct { +type RegionCompositeHealthChecksListCall struct { s *Service project string region string @@ -563,13 +694,12 @@ type RegionCommitmentsListCall struct { header_ http.Header } -// List: Retrieves a list of commitments contained within -// the specified region. +// List: Lists the CompositeHealthChecks for a project in the given region. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionCompositeHealthChecksService) List(project string, region string) *RegionCompositeHealthChecksListCall { + c := &RegionCompositeHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -642,7 +772,7 @@ func (r *RegionCommitmentsService) List(project string, region string) *RegionCo // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) Filter(filter string) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("filter", filter) return c } @@ -654,7 +784,7 @@ func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsList // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -674,7 +804,7 @@ func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitme // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -683,7 +813,7 @@ func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsLi // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) PageToken(pageToken string) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -698,7 +828,7 @@ func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmen // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -706,7 +836,7 @@ func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -714,34 +844,34 @@ func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitme // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { +func (c *RegionCompositeHealthChecksListCall) Context(ctx context.Context) *RegionCompositeHealthChecksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { +func (c *RegionCompositeHealthChecksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCompositeHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -752,16 +882,17 @@ func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.list" call. +// Do executes the "compute.regionCompositeHealthChecks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitmentList.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { +// *CompositeHealthCheckList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -780,7 +911,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitmentList{ + ret := &CompositeHealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -791,14 +922,14 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { +func (c *RegionCompositeHealthChecksListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -816,150 +947,34 @@ func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*Commitmen } } -type RegionCommitmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCompositeHealthChecksPatchCall struct { + s *Service + project string + region string + compositeHealthCheck string + compositehealthcheck *CompositeHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Patch: Updates the specified regional CompositeHealthCheck resource +// with the data included in the request. This method supportsPATCH +// semantics and uses theJSON merge +// patch format and processing rules. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { - c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsUpdateCall struct { - s *Service - project string - region string - commitment string - commitment2 *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified commitment with the data included in the -// request. -// Update is performed only on selected fields included as part of -// update-mask. Only the following fields can be updated: auto_renew and plan. +// - compositeHealthCheck: Name of the CompositeHealthCheck to update. The +// name // -// - commitment: Name of the commitment that you want to update. +// must be 1-63 characters long, and comply with RFC1035. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { - c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionCompositeHealthChecksService) Patch(project string, region string, compositeHealthCheck string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksPatchCall { + c := &RegionCompositeHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - c.commitment2 = commitment2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + c.compositeHealthCheck = compositeHealthCheck + c.compositehealthcheck = compositehealthcheck return c } @@ -980,50 +995,43 @@ func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsU // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { +func (c *RegionCompositeHealthChecksPatchCall) RequestId(requestId string) *RegionCompositeHealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { +func (c *RegionCompositeHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { +func (c *RegionCompositeHealthChecksPatchCall) Context(ctx context.Context) *RegionCompositeHealthChecksPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsUpdateCall) Header() http.Header { +func (c *RegionCompositeHealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCompositeHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -1031,20 +1039,20 @@ func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, + "compositeHealthCheck": c.compositeHealthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.update" call. +// Do executes the "compute.regionCompositeHealthChecks.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCompositeHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1074,35 +1082,255 @@ func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsUpdateReservationsCall struct { - s *Service - project string - region string - commitment string - regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCompositeHealthChecksTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateReservations: Transfers GPUs or Local SSD disks between reservations -// that are attached -// to the same commitment. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - commitment: Name of the commitment for which the reservations are being -// updated. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { - c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionCompositeHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCompositeHealthChecksTestIamPermissionsCall { + c := &RegionCompositeHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionCompositeHealthChecksTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCompositeHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCompositeHealthChecks.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionDiskSettingsGetCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get Regional Disk Settings. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { + c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDiskSettingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDiskSettings.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DiskSettings.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DiskSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionDiskSettingsPatchCall struct { + s *Service + project string + region string + disksettings *DiskSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patch Regional Disk Settings +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { + c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest + c.disksettings = disksettings return c } @@ -1123,64 +1351,70 @@ func (r *RegionCommitmentsService) UpdateReservations(project string, region str // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { +func (c *RegionDiskSettingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.updateReservations" call. +// Do executes the "compute.regionDiskSettings.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1210,31 +1444,146 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCompositeHealthChecksAggregatedListCall struct { +type RegionDiskTypesGetCall struct { s *Service project string + region string + diskType string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves the list of all CompositeHealthCheck resources -// (all -// regional) available to the specified project. +// Get: Returns the specified regional disk type. // -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. +// - diskType: Name of the disk type to return. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { + c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.diskType = diskType + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDiskTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "diskType": c.diskType, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDiskTypes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DiskType.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DiskType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionDiskTypesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of regional disk types available to the specified +// project. // -// - project: Name of the project scoping this request. -func (r *RegionCompositeHealthChecksService) AggregatedList(project string) *RegionCompositeHealthChecksAggregatedListCall { - c := &RegionCompositeHealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { + c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -1305,29 +1654,11 @@ func (r *RegionCompositeHealthChecksService) AggregatedList(project string) *Reg // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionCompositeHealthChecksAggregatedListCall) Filter(filter string) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { 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 *RegionCompositeHealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCompositeHealthChecksAggregatedListCall { - 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`, @@ -1335,7 +1666,7 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) IncludeAllScopes(include // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCompositeHealthChecksAggregatedListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -1355,7 +1686,7 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) MaxResults(maxResults in // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksAggregatedListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -1364,7 +1695,7 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) OrderBy(orderBy string) // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionCompositeHealthChecksAggregatedListCall) PageToken(pageToken string) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1379,23 +1710,15 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) PageToken(pageToken stri // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionCompositeHealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCompositeHealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1403,34 +1726,34 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCompositeHealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksAggregatedListCall) Context(ctx context.Context) *RegionCompositeHealthChecksAggregatedListCall { +func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksAggregatedListCall) Header() http.Header { +func (c *RegionDiskTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/compositeHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -1439,18 +1762,19 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) doRequest(alt string) (* req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.aggregatedList" call. +// Do executes the "compute.regionDiskTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckAggregatedList, error) { +// *RegionDiskTypeList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1469,7 +1793,7 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CompositeHealthCheckAggregatedList{ + ret := &RegionDiskTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1480,14 +1804,14 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.Cal if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionCompositeHealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckAggregatedList) error) error { +func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -1505,26 +1829,31 @@ func (c *RegionCompositeHealthChecksAggregatedListCall) Pages(ctx context.Contex } } -type RegionCompositeHealthChecksDeleteCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksAddResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified CompositeHealthCheck in the given region +// AddResourcePolicies: Adds existing resource policies to a regional disk. You +// can only add one +// policy which will be applied to this disk for scheduling snapshot +// creation. // -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to delete. +// - disk: The disk name for this request. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Delete(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksDeleteCall { - c := &RegionCompositeHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { + c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.compositeHealthCheck = compositeHealthCheck + c.disk = disk + c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest return c } @@ -1545,7 +1874,7 @@ func (r *RegionCompositeHealthChecksService) Delete(project string, region strin // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionCompositeHealthChecksDeleteCall) RequestId(requestId string) *RegionCompositeHealthChecksDeleteCall { +func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -1553,52 +1882,56 @@ func (c *RegionCompositeHealthChecksDeleteCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksDeleteCall { +func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksDeleteCall) Context(ctx context.Context) *RegionCompositeHealthChecksDeleteCall { +func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksDeleteCall) Header() http.Header { +func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + 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, - "compositeHealthCheck": c.compositeHealthCheck, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.delete" call. +// Do executes the "compute.regionDisks.addResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1628,96 +1961,106 @@ func (c *RegionCompositeHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCompositeHealthChecksGetCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksBulkInsertCall struct { + s *Service + project string + region string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified CompositeHealthCheck resource in the given -// region. +// BulkInsert: Bulk create a set of disks. // -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to return. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Get(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksGetCall { - c := &RegionCompositeHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { + c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.compositeHealthCheck = compositeHealthCheck + c.bulkinsertdiskresource = bulkinsertdiskresource + 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksGetCall { +func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionCompositeHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksGetCall) Context(ctx context.Context) *RegionCompositeHealthChecksGetCall { +func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksGetCall) Header() http.Header { +func (c *RegionDisksBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + 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, - "compositeHealthCheck": c.compositeHealthCheck, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.get" call. +// Do executes the "compute.regionDisks.bulkInsert" call. // Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheck.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheck, 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 *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1736,7 +2079,7 @@ func (c *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CompositeHealthCheck{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1747,31 +2090,37 @@ func (c *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCompositeHealthChecksInsertCall struct { - s *Service - project string - region string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksCreateSnapshotCall struct { + s *Service + project string + region string + disk string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Create a CompositeHealthCheck in the specified project in the given -// region -// using the parameters that are included in the request. +// CreateSnapshot: Creates a snapshot of a specified persistent disk. For +// regular snapshot +// creation, consider using snapshots.insert +// instead, as that method supports more features, such as creating +// snapshots +// in a project different from the source disk project. // +// - disk: Name of the regional persistent disk to snapshot. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Insert(project string, region string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksInsertCall { - c := &RegionCompositeHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { + c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.compositehealthcheck = compositehealthcheck + c.disk = disk + c.snapshot = snapshot return c } @@ -1792,7 +2141,7 @@ func (r *RegionCompositeHealthChecksService) Insert(project string, region strin // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionCompositeHealthChecksInsertCall) RequestId(requestId string) *RegionCompositeHealthChecksInsertCall { +func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("requestId", requestId) return c } @@ -1800,35 +2149,35 @@ func (c *RegionCompositeHealthChecksInsertCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksInsertCall { +func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksInsertCall) Context(ctx context.Context) *RegionCompositeHealthChecksInsertCall { +func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksInsertCall) Header() http.Header { +func (c *RegionDisksCreateSnapshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -1838,17 +2187,18 @@ func (c *RegionCompositeHealthChecksInsertCall) doRequest(alt string) (*http.Res googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.insert" call. +// Do executes the "compute.regionDisks.createSnapshot" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1878,200 +2228,91 @@ func (c *RegionCompositeHealthChecksInsertCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCompositeHealthChecksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksDeleteCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the CompositeHealthChecks for a project in the given region. +// Delete: Deletes the specified regional persistent disk. Deleting a regional +// disk +// removes all the replicas of its data permanently and is +// irreversible. +// However, deleting a disk does not delete anysnapshots +// previously made from the disk. You must separatelydelete +// snapshots. // +// - disk: Name of the regional persistent disk to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) List(project string, region string) *RegionCompositeHealthChecksListCall { - c := &RegionCompositeHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { + c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.disk = disk return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCompositeHealthChecksListCall) Filter(filter string) *RegionCompositeHealthChecksListCall { - 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 *RegionCompositeHealthChecksListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksListCall { - 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. +// 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. // -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksListCall { - 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 *RegionCompositeHealthChecksListCall) PageToken(pageToken string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. +// For example, 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. // -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCompositeHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// The request ID must be +// a valid UUID with the exception that zero UUID is not +// supported +// (00000000-0000-0000-0000-000000000000). +func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksListCall { +func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionCompositeHealthChecksListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksListCall) Context(ctx context.Context) *RegionCompositeHealthChecksListCall { +func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksListCall) Header() http.Header { +func (c *RegionDisksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } @@ -2079,18 +2320,18 @@ func (c *RegionCompositeHealthChecksListCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.list" call. +// Do executes the "compute.regionDisks.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckList, 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 *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2109,7 +2350,7 @@ func (c *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CompositeHealthCheckList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2120,250 +2361,94 @@ func (c *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCompositeHealthChecksListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionCompositeHealthChecksPatchCall struct { - s *Service - project string - region string - compositeHealthCheck string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksGetCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified regional CompositeHealthCheck resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - compositeHealthCheck: Name of the CompositeHealthCheck to update. The -// name +// Get: Returns a specified regional persistent disk. // -// must be 1-63 characters long, and comply with RFC1035. +// - disk: Name of the regional persistent disk to return. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Patch(project string, region string, compositeHealthCheck string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksPatchCall { - c := &RegionCompositeHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { + c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.compositeHealthCheck = compositeHealthCheck - c.compositehealthcheck = compositehealthcheck - 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 *RegionCompositeHealthChecksPatchCall) RequestId(requestId string) *RegionCompositeHealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) + c.disk = disk return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCompositeHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksPatchCall { +func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksPatchCall) Context(ctx context.Context) *RegionCompositeHealthChecksPatchCall { +func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCompositeHealthChecksPatchCall) Header() http.Header { +func (c *RegionDisksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCompositeHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) - if err != nil { - return nil, err +func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCompositeHealthChecks.patch" call. +// Do executes the "compute.regionDisks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Disk.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCompositeHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCompositeHealthChecksTestIamPermissionsCall { - c := &RegionCompositeHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2382,7 +2467,7 @@ func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Disk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2393,35 +2478,47 @@ func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskSettingsGetCall struct { +type RegionDisksGetIamPolicyCall struct { s *Service project string region string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get Regional Disk Settings. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such +// policy or resource exists. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { - c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { + c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { +func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2429,34 +2526,34 @@ func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSett // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { +func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { +func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDiskSettingsGetCall) Header() http.Header { +func (c *RegionDisksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -2464,19 +2561,20 @@ func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskSettings.get" call. +// Do executes the "compute.regionDisks.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { +func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2495,7 +2593,7 @@ func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSetti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskSettings{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2506,29 +2604,31 @@ func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSetti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskSettingsPatchCall struct { - s *Service - project string - region string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksInsertCall struct { + s *Service + project string + region string + disk *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patch Regional Disk Settings +// Insert: Creates a persistent regional disk in the specified project using +// the data +// included in the request. // // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { - c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { + c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disksettings = disksettings + c.disk = disk return c } @@ -2549,52 +2649,52 @@ func (r *RegionDiskSettingsService) Patch(project string, region string, diskset // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { +func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// SourceImage sets the optional parameter "sourceImage": Source image to +// restore onto a disk. This field is optional. +func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { + c.urlParams_.Set("sourceImage", sourceImage) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { +func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { +func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDiskSettingsPatchCall) Header() http.Header { +func (c *RegionDisksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -2603,16 +2703,16 @@ func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, err "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskSettings.patch" call. +// Do executes the "compute.regionDisks.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2642,128 +2742,11 @@ func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskTypesGetCall struct { - s *Service - project string - region string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional disk type. -// -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskTypesListCall struct { +type RegionDisksListCall struct { s *Service project string region string @@ -2773,13 +2756,13 @@ type RegionDiskTypesListCall struct { header_ http.Header } -// List: Retrieves a list of regional disk types available to the specified -// project. +// List: Retrieves the list of persistent disks contained within +// the specified region. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { + c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -2852,7 +2835,7 @@ func (r *RegionDiskTypesService) List(project string, region string) *RegionDisk // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { c.urlParams_.Set("filter", filter) return c } @@ -2864,7 +2847,7 @@ func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -2884,7 +2867,7 @@ func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesL // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -2893,7 +2876,7 @@ func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCa // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2908,7 +2891,7 @@ func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesLi // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -2916,7 +2899,7 @@ func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2924,34 +2907,34 @@ func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesL // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { +func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDiskTypesListCall) Header() http.Header { +func (c *RegionDisksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -2962,17 +2945,16 @@ func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskTypes.list" call. +// Do executes the "compute.regionDisks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { +// *DiskList.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2991,7 +2973,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionDiskTypeList{ + ret := &DiskList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3002,14 +2984,14 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { +func (c *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -3027,31 +3009,28 @@ func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskT } } -type RegionDisksAddResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksRemoveResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to a regional disk. You -// can only add one -// policy which will be applied to this disk for scheduling snapshot -// creation. +// RemoveResourcePolicies: Removes resource policies from a regional disk. // // - disk: The disk name for this request. // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { - c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { + c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest + c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest return c } @@ -3072,7 +3051,7 @@ func (r *RegionDisksService) AddResourcePolicies(project string, region string, // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3080,35 +3059,35 @@ func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *Region // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { +func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3120,16 +3099,16 @@ func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Respon "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.addResourcePolicies" call. +// Do executes the "compute.regionDisks.removeResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3159,29 +3138,32 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksBulkInsertCall struct { - s *Service - project string - region string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksResizeCall struct { + s *Service + project string + region string + disk string + regiondisksresizerequest *RegionDisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkInsert: Bulk create a set of disks. +// Resize: Resizes the specified regional persistent disk. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { - c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the regional persistent disk. +// - project: The project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { + c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.bulkinsertdiskresource = bulkinsertdiskresource + c.disk = disk + c.regiondisksresizerequest = regiondisksresizerequest return c } @@ -3202,7 +3184,7 @@ func (r *RegionDisksService) BulkInsert(project string, region string, bulkinser // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { +func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3210,35 +3192,35 @@ func (c *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulk // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { +func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { +func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksBulkInsertCall) Header() http.Header { +func (c *RegionDisksResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3248,17 +3230,18 @@ func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.bulkInsert" call. +// Do executes the "compute.regionDisks.resize" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3288,94 +3271,69 @@ func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot -// creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots -// in a project different from the source disk project. +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. // -// - disk: Name of the regional persistent disk to snapshot. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { + c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.snapshot = snapshot - 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 *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { +func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { +func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksCreateSnapshotCall) Header() http.Header { +func (c *RegionDisksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3383,20 +3341,20 @@ func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.createSnapshot" call. +// Do executes the "compute.regionDisks.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3415,7 +3373,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3426,36 +3384,32 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional persistent disk. Deleting a regional -// disk -// removes all the replicas of its data permanently and is -// irreversible. -// However, deleting a disk does not delete anysnapshots -// previously made from the disk. You must separatelydelete -// snapshots. +// SetLabels: Sets the labels on the target regional disk. // -// - disk: Name of the regional persistent disk to delete. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { + c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest return c } @@ -3476,7 +3430,7 @@ func (r *RegionDisksService) Delete(project string, region string, disk string) // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { +func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3484,52 +3438,56 @@ func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { +func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { +func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksDeleteCall) Header() http.Header { +func (c *RegionDisksSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + 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, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.delete" call. +// Do executes the "compute.regionDisks.setLabels" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3559,75 +3517,92 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksGetCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStartAsyncReplicationCall struct { + s *Service + project string + region string + disk string + regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns a specified regional persistent disk. +// StartAsyncReplication: Starts asynchronous replication. +// Must be invoked on the primary disk. // -// - disk: Name of the regional persistent disk to return. +// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { + c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk + c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest + 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { +func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { +func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksGetCall) Header() http.Header { +func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3637,16 +3612,16 @@ func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.get" call. +// Do executes the "compute.regionDisks.startAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { +func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3665,7 +3640,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Disk{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3676,103 +3651,105 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStopAsyncReplicationCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. +// StopAsyncReplication: Stops asynchronous replication. +// Can be invoked either on the primary or on the secondary disk. // +// - disk: The name of the persistent disk. // - project: Project ID for this request. // - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { - c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { + c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource + c.disk = disk return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// 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 *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { +func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { +func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksGetIamPolicyCall) Header() http.Header { +func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.getIamPolicy" call. +// Do executes the "compute.regionDisks.stopAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3791,7 +3768,7 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3802,31 +3779,34 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksInsertCall struct { - s *Service - project string - region string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksStopGroupAsyncReplicationCall struct { + s *Service + project string + region string + disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a persistent regional disk in the specified project using -// the data -// included in the request. +// StopGroupAsyncReplication: Stops asynchronous replication for a consistency +// group of disks. +// Can be invoked either in the primary or secondary scope. // -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. This must be the region +// of the +// +// primary or secondary disks in the consistency group. +func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { + c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource return c } @@ -3847,50 +3827,43 @@ func (r *RegionDisksService) Insert(project string, region string, disk *Disk) * // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { +func (c *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { +func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { +func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksInsertCall) Header() http.Header { +func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3901,16 +3874,16 @@ func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.insert" call. +// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3940,1204 +3913,33 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of persistent disks contained within -// the specified region. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { + c := &RegionDisksTestIamPermissionsCall{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. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - 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 *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - 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 *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - 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 *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionDisksRemoveResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from a regional disk. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { - c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest - 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 *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") - 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, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified regional persistent disk. -// -// - disk: Name of the regional persistent disk. -// - project: The project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest - 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 *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") - 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, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { - c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the target regional disk. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") - 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, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStartAsyncReplicationCall struct { - s *Service - project string - region string - disk string - regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartAsyncReplication: Starts asynchronous replication. -// Must be invoked on the primary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { - c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest - 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") - 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, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.startAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopAsyncReplicationCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopAsyncReplication: Stops asynchronous replication. -// Can be invoked either on the primary or on the secondary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { - c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopGroupAsyncReplicationCall struct { - s *Service - project string - region string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. -// Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. This must be the region -// of the -// -// primary or secondary disks in the consistency group. -func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { - c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - 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 *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } @@ -33750,75 +32552,434 @@ func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionUrlMapsUpdateCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionUrlMapsUpdateCall struct { + s *Service + project string + region string + urlMap string + urlmap *UrlMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified UrlMap resource with the data included in +// the +// request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - urlMap: Name of the UrlMap resource to update. +func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { + c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder +// Request ID to support idempotency. +func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionUrlMapsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionUrlMapsValidateCall struct { + s *Service + project string + region string + urlMap string + regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Validate: Runs static validation for the UrlMap. In particular, the tests of +// the +// provided UrlMap will be run. Calling this method does NOT create the +// UrlMap. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - urlMap: Name of the UrlMap resource to be validated as. +func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { + c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionUrlMapsValidateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionurlmapsvalidaterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") + 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, + "urlMap": c.urlMap, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.validate" call. +// Any non-2xx status code is an error. Response headers are in either +// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &UrlMapsValidateResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionZonesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of Zone resources under the specific region +// available to +// the specified project. +// +// - project: Project ID for this request. +// - region: Region for this request. +func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { + c := &RegionZonesListCall{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. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { + 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 *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -// Update: Updates the specified UrlMap resource with the data included in -// the -// request. +// 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. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { - c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.urlmap = urlmap +// 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 *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { - c.urlParams_.Set("requestId", requestId) +// 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 *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { +func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { +func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsUpdateCall) Header() http.Header { +func (c *RegionZonesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err +func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/zones") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -33826,18 +32987,17 @@ func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "urlMap": c.urlMap, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionZones.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.update" call. +// Do executes the "compute.regionZones.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *ZoneList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33856,7 +33016,7 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ZoneList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33867,72 +33027,117 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionZones.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionUrlMapsValidateCall struct { - s *Service - project string - region string - urlMap string - regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest - urlParams_ gensupport.URLParams - 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 *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the -// provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. +type RegionsGetCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified Region resource. +// +// To decrease latency for this method, you can optionally omit any +// unneeded +// information from the response by using a field mask. This practice +// is +// especially recommended for unused quota information (the `quotas` field). +// To exclude one or more fields, set your request's `fields` query +// parameter +// to only include the fields you need. For example, to only include the +// `id` +// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to +// your request. +// +// This method fails if the quota information is unavailable for the region +// and if the organization policy +// constraint +// compute.requireBasicQuotaInResponse is enforced. This +// constraint, when enforced, disables the fail-open behaviour when +// quota +// information (the `items.quotas` field) is unavailable for the region. +// It is recommended to use the default setting +// for the constraint unless your application requires the +// fail-closed +// behaviour for this method. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { - c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region resource to return. +func (r *RegionsService) Get(project string, region string) *RegionsGetCall { + c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.urlMap = urlMap - c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { +func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { +func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionUrlMapsValidateCall) Header() http.Header { +func (c *RegionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionurlmapsvalidaterequest) - if err != nil { - return nil, err +func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -33940,19 +33145,17 @@ func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "urlMap": c.urlMap, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionUrlMaps.validate" call. +// Do executes the "compute.regions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { +// *Region.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33971,7 +33174,7 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &UrlMapsValidateResponse{ + ret := &Region{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33982,30 +33185,51 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionZonesListCall struct { +type RegionsListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of Zone resources under the specific region -// available to -// the specified project. +// List: Retrieves the list of region resources available to the specified +// project. +// +// To decrease latency for this method, you can optionally omit any +// unneeded +// information from the response by using a field mask. This practice +// is +// especially recommended for unused quota information +// (the `items.quotas` field). +// To exclude one or more fields, set your request's `fields` query +// parameter +// to only include the fields you need. For example, to only include the +// `id` +// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to +// your request. +// +// This method fails if the quota information is unavailable for the region +// and if the organization policy +// constraint +// compute.requireBasicQuotaInResponse is enforced. This +// constraint, when enforced, disables the fail-open behaviour when +// quota +// information (the `items.quotas` field) is unavailable for the region. +// It is recommended to use the default setting +// for the constraint unless your application requires the +// fail-closed +// behaviour for this method. // // - project: Project ID for this request. -// - region: Region for this request. -func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { - c := &RegionZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionsService) List(project string) *RegionsListCall { + c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -34076,7 +33300,7 @@ func (r *RegionZonesService) List(project string, region string) *RegionZonesLis // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { +func (c *RegionsListCall) Filter(filter string) *RegionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -34088,7 +33312,7 @@ func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { +func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -34108,7 +33332,7 @@ func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { +func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -34117,7 +33341,7 @@ func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { +func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -34132,7 +33356,7 @@ func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { +func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -34140,7 +33364,7 @@ func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *R // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { +func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34148,34 +33372,34 @@ func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { +func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { +func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionZonesListCall) Header() http.Header { +func (c *RegionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/zones") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -34184,18 +33408,17 @@ func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionZones.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionZones.list" call. +// Do executes the "compute.regions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ZoneList.ServerResponse.Header or (if a response was returned at all) in +// *RegionList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { +func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34214,7 +33437,7 @@ func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ZoneList{ + ret := &RegionList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34225,14 +33448,14 @@ func (c *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionZones.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { +func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -34250,55 +33473,187 @@ func (c *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error } } -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationBlocksGetCall struct { + s *Service + project string + zone string + reservation string + reservationBlock string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified Region resource. +// Get: Retrieves information about the specified reservation block. // -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information (the `quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. +// - project: Project ID for this request. +// - reservation: The name of the reservation. +// Name should conform to RFC1035 or be a resource ID. +// - reservationBlock: The name of the reservation block. +// Name should conform to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) Get(project string, zone string, reservation string, reservationBlock string) *ReservationBlocksGetCall { + c := &ReservationBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationBlock = reservationBlock + return c +} + +// View sets the optional parameter "view": View of the Block. // -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. +// Possible values: +// +// "BASIC" - This view includes basic information about the reservation block +// "BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will default +// +// to the BASIC view. +// +// "FULL" - Includes detailed topology view. +func (c *ReservationBlocksGetCall) View(view string) *ReservationBlocksGetCall { + c.urlParams_.Set("view", view) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBlocksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ReservationBlocksGetCall) IfNoneMatch(entityTag string) *ReservationBlocksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationBlocksGetCall) Context(ctx context.Context) *ReservationBlocksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationBlocksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + "reservationBlock": c.reservationBlock, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservationBlocks.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ReservationBlocksGetResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksGetResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ReservationBlocksGetResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ReservationBlocksGetIamPolicyCall struct { + s *Service + project string + zone string + parentResource string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such +// policy or resource exists. // -// - project: Project ID for this request. -// - region: Name of the region resource to return. -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parentResource: Name or id of parent resource of the resource for this +// request. +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationBlocksGetIamPolicyCall { + c := &ReservationBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region + c.zone = zone + c.parentResource = parentResource + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ReservationBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationBlocksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { +func (c *ReservationBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34306,34 +33661,34 @@ func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { +func (c *ReservationBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationBlocksGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { +func (c *ReservationBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsGetCall) Header() http.Header { +func (c *ReservationBlocksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -34341,19 +33696,21 @@ func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "parentResource": c.parentResource, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regions.get" call. +// Do executes the "compute.reservationBlocks.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { +func (c *ReservationBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34372,7 +33729,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Region{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34383,51 +33740,33 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionsListCall struct { +type ReservationBlocksListCall struct { s *Service project string + zone string + reservation string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of region resources available to the specified -// project. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information -// (the `items.quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. +// List: Retrieves a list of reservation blocks under a single reservation. // -// - project: Project ID for this request. -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: The name of the reservation. +// Name should conform to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) List(project string, zone string, reservation string) *ReservationBlocksListCall { + c := &ReservationBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.reservation = reservation return c } @@ -34498,7 +33837,7 @@ func (r *RegionsService) List(project string) *RegionsListCall { // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { +func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksListCall { c.urlParams_.Set("filter", filter) return c } @@ -34510,7 +33849,7 @@ func (c *RegionsListCall) Filter(filter string) *RegionsListCall { // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { +func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlocksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -34530,7 +33869,7 @@ func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { +func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -34539,7 +33878,7 @@ func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { +func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBlocksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -34554,7 +33893,7 @@ func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { +func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationBlocksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -34562,7 +33901,7 @@ func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { +func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlocksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34570,34 +33909,34 @@ func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { +func (c *ReservationBlocksListCall) IfNoneMatch(entityTag string) *ReservationBlocksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { +func (c *ReservationBlocksListCall) Context(ctx context.Context) *ReservationBlocksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionsListCall) Header() http.Header { +func (c *ReservationBlocksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -34605,18 +33944,21 @@ func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regions.list" call. +// Do executes the "compute.reservationBlocks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionList.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { +// *ReservationBlocksListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34635,7 +33977,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionList{ + ret := &ReservationBlocksListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34646,14 +33988,14 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { +func (c *ReservationBlocksListCall) Pages(ctx context.Context, f func(*ReservationBlocksListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -34671,47 +34013,428 @@ func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) } } -type ReservationBlocksGetCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationBlocksPerformMaintenanceCall struct { + s *Service + project string + zone string + reservation string + reservationBlock string + reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PerformMaintenance: Allows customers to perform maintenance on a reservation +// block +// +// - project: Project ID for this request. +// - reservation: The name of the reservation. +// Name should conform to RFC1035 or be a resource ID. +// - reservationBlock: The name of the reservation block. +// Name should conform to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) PerformMaintenance(project string, zone string, reservation string, reservationBlock string, reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest) *ReservationBlocksPerformMaintenanceCall { + c := &ReservationBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationBlock = reservationBlock + c.reservationsblocksperformmaintenancerequest = reservationsblocksperformmaintenancerequest + 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 *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationBlocksPerformMaintenanceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ReservationBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationBlocksPerformMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationBlocksPerformMaintenanceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationBlocksPerformMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsblocksperformmaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance") + 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, + "reservation": c.reservation, + "reservationBlock": c.reservationBlock, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservationBlocks.performMaintenance" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ReservationBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ReservationBlocksSetIamPolicyCall struct { + s *Service + project string + zone string + parentResource string + resource string + zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. +// +// - parentResource: Name or id of parent resource of the resource for this +// request. +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationBlocksSetIamPolicyCall { + c := &ReservationBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.parentResource = parentResource + c.resource = resource + c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ReservationBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationBlocksSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{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{ + "project": c.project, + "zone": c.zone, + "parentResource": c.parentResource, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservationBlocks.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ReservationBlocksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ReservationBlocksTestIamPermissionsCall struct { + s *Service + project string + zone string + parentResource string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - parentResource: Name or id of parent resource of the resource for this +// request. +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationBlocksTestIamPermissionsCall { + c := &ReservationBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.parentResource = parentResource + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ReservationBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationBlocksTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationBlocksTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationBlocksTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{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{ + "project": c.project, + "zone": c.zone, + "parentResource": c.parentResource, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservationBlocks.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ReservationSubBlocksGetCall struct { + s *Service + project string + zone string + parentName string + reservationSubBlock string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Retrieves information about the specified reservation block. +// Get: Retrieves information about the specified reservation subBlock. // +// - parentName: The name of the parent reservation and parent block. In the +// format +// of +// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. // - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. +// - reservationSubBlock: The name of the reservation subBlock. // Name should conform to RFC1035 or be a resource ID. // - zone: Name of the zone for this request. Zone name should conform to // RFC1035. -func (r *ReservationBlocksService) Get(project string, zone string, reservation string, reservationBlock string) *ReservationBlocksGetCall { - c := &ReservationBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationSubBlocksService) Get(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksGetCall { + c := &ReservationSubBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock + c.parentName = parentName + c.reservationSubBlock = reservationSubBlock return c } -// View sets the optional parameter "view": View of the Block. +// View sets the optional parameter "view": View of the subBlock. // // Possible values: // -// "BASIC" - This view includes basic information about the reservation block -// "BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will default +// "SUB_BLOCK_VIEW_BASIC" - This view includes basic information about the // -// to the BASIC view. +// reservation sub block // -// "FULL" - Includes detailed topology view. -func (c *ReservationBlocksGetCall) View(view string) *ReservationBlocksGetCall { +// "SUB_BLOCK_VIEW_FULL" - Includes detailed topology view. +// "SUB_BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +func (c *ReservationSubBlocksGetCall) View(view string) *ReservationSubBlocksGetCall { c.urlParams_.Set("view", view) return c } @@ -34719,7 +34442,7 @@ func (c *ReservationBlocksGetCall) View(view string) *ReservationBlocksGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBlocksGetCall { +func (c *ReservationSubBlocksGetCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34727,34 +34450,34 @@ func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBloc // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationBlocksGetCall) IfNoneMatch(entityTag string) *ReservationBlocksGetCall { +func (c *ReservationSubBlocksGetCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksGetCall) Context(ctx context.Context) *ReservationBlocksGetCall { +func (c *ReservationSubBlocksGetCall) Context(ctx context.Context) *ReservationSubBlocksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationBlocksGetCall) Header() http.Header { +func (c *ReservationSubBlocksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationSubBlocksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -34762,22 +34485,22 @@ func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, + "project": c.project, + "zone": c.zone, + "parentName": c.parentName, + "reservationSubBlock": c.reservationSubBlock, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationBlocks.get" call. +// Do executes the "compute.reservationSubBlocks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksGetResponse.ServerResponse.Header or (if a response was +// *ReservationSubBlocksGetResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksGetResponse, error) { +func (c *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksGetResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34796,7 +34519,7 @@ func (c *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*Reservatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationBlocksGetResponse{ + ret := &ReservationSubBlocksGetResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34807,11 +34530,11 @@ func (c *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*Reservatio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationBlocksGetIamPolicyCall struct { +type ReservationSubBlocksGetIamPolicyCall struct { s *Service project string zone string @@ -34832,8 +34555,8 @@ type ReservationBlocksGetIamPolicyCall struct { // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *ReservationBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationBlocksGetIamPolicyCall { - c := &ReservationBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationSubBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationSubBlocksGetIamPolicyCall { + c := &ReservationSubBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.parentResource = parentResource @@ -34843,7 +34566,7 @@ func (r *ReservationBlocksService) GetIamPolicy(project string, zone string, par // OptionsRequestedPolicyVersion sets the optional parameter // "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationSubBlocksGetIamPolicyCall { c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -34851,7 +34574,7 @@ func (c *ReservationBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(option // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34859,34 +34582,34 @@ func (c *ReservationBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *Reserv // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationBlocksGetIamPolicyCall) Header() http.Header { +func (c *ReservationSubBlocksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationSubBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -34899,16 +34622,16 @@ func (c *ReservationBlocksGetIamPolicyCall) doRequest(alt string) (*http.Respons "parentResource": c.parentResource, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationBlocks.getIamPolicy" call. +// Do executes the "compute.reservationSubBlocks.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ReservationSubBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34938,33 +34661,35 @@ func (c *ReservationBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationBlocksListCall struct { +type ReservationSubBlocksListCall struct { s *Service project string zone string - reservation string + parentName string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of reservation blocks under a single reservation. +// List: Retrieves a list of reservation subBlocks under a single reservation. // +// - parentName: The name of the parent reservation and parent block. In the +// format +// of +// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. // - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. // - zone: Name of the zone for this request. Zone name should conform to // RFC1035. -func (r *ReservationBlocksService) List(project string, zone string, reservation string) *ReservationBlocksListCall { - c := &ReservationBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationSubBlocksService) List(project string, zone string, parentName string) *ReservationSubBlocksListCall { + c := &ReservationSubBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.reservation = reservation + c.parentName = parentName return c } @@ -35035,7 +34760,7 @@ func (r *ReservationBlocksService) List(project string, zone string, reservation // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) Filter(filter string) *ReservationSubBlocksListCall { c.urlParams_.Set("filter", filter) return c } @@ -35047,7 +34772,7 @@ func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksList // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) MaxResults(maxResults int64) *ReservationSubBlocksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -35067,7 +34792,7 @@ func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlo // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) OrderBy(orderBy string) *ReservationSubBlocksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -35076,7 +34801,7 @@ func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksLi // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) PageToken(pageToken string) *ReservationSubBlocksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -35091,7 +34816,7 @@ func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBloc // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationSubBlocksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -35099,7 +34824,7 @@ func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) Fields(s ...googleapi.Field) *ReservationSubBlocksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35107,34 +34832,34 @@ func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationBlocksListCall) IfNoneMatch(entityTag string) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) IfNoneMatch(entityTag string) *ReservationSubBlocksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksListCall) Context(ctx context.Context) *ReservationBlocksListCall { +func (c *ReservationSubBlocksListCall) Context(ctx context.Context) *ReservationSubBlocksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationBlocksListCall) Header() http.Header { +func (c *ReservationSubBlocksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationSubBlocksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -35142,21 +34867,21 @@ func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, + "project": c.project, + "zone": c.zone, + "parentName": c.parentName, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationBlocks.list" call. +// Do executes the "compute.reservationSubBlocks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *ReservationSubBlocksListResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksListResponse, error) { +func (c *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35175,7 +34900,7 @@ func (c *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*Reservati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationBlocksListResponse{ + ret := &ReservationSubBlocksListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35186,14 +34911,14 @@ func (c *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*Reservati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ReservationBlocksListCall) Pages(ctx context.Context, f func(*ReservationBlocksListResponse) error) error { +func (c *ReservationSubBlocksListCall) Pages(ctx context.Context, f func(*ReservationSubBlocksListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -35211,35 +34936,35 @@ func (c *ReservationBlocksListCall) Pages(ctx context.Context, f func(*Reservati } } -type ReservationBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationSubBlocksPerformMaintenanceCall struct { + s *Service + project string + zone string + parentName string + reservationSubBlock string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // PerformMaintenance: Allows customers to perform maintenance on a reservation -// block +// subBlock // +// - parentName: The name of the parent reservation and parent block. In the +// format +// of +// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. // - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. +// - reservationSubBlock: The name of the reservation subBlock. // Name should conform to RFC1035 or be a resource ID. // - zone: Name of the zone for this request. Zone name should conform to // RFC1035. -func (r *ReservationBlocksService) PerformMaintenance(project string, zone string, reservation string, reservationBlock string, reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest) *ReservationBlocksPerformMaintenanceCall { - c := &ReservationBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationSubBlocksService) PerformMaintenance(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksPerformMaintenanceCall { + c := &ReservationSubBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock - c.reservationsblocksperformmaintenancerequest = reservationsblocksperformmaintenancerequest + c.parentName = parentName + c.reservationSubBlock = reservationSubBlock return c } @@ -35260,7 +34985,7 @@ func (r *ReservationBlocksService) PerformMaintenance(project string, zone strin // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationBlocksPerformMaintenanceCall { +func (c *ReservationSubBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationSubBlocksPerformMaintenanceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35268,57 +34993,53 @@ func (c *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *R // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationBlocksPerformMaintenanceCall { +func (c *ReservationSubBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationSubBlocksPerformMaintenanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationBlocksPerformMaintenanceCall { +func (c *ReservationSubBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationSubBlocksPerformMaintenanceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationBlocksPerformMaintenanceCall) Header() http.Header { +func (c *ReservationSubBlocksPerformMaintenanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsblocksperformmaintenancerequest) - if err != nil { - return nil, err - } +func (c *ReservationSubBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, + "project": c.project, + "zone": c.zone, + "parentName": c.parentName, + "reservationSubBlock": c.reservationSubBlock, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationBlocks.performMaintenance" call. +// Do executes the "compute.reservationSubBlocks.performMaintenance" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ReservationSubBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35348,190 +35069,97 @@ func (c *ReservationBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationBlocksSetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationSubBlocksReportFaultyCall struct { + s *Service + project string + zone string + parentName string + reservationSubBlock string + reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. +// ReportFaulty: Allows customers to report a faulty subBlock. // -// - parentResource: Name or id of parent resource of the resource for this -// request. +// - parentName: The name of the parent reservation and parent block. In the +// format +// of +// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationBlocksSetIamPolicyCall { - c := &ReservationBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - reservationSubBlock: The name of the reservation subBlock. +// Name should conform to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationSubBlocksService) ReportFaulty(project string, zone string, parentName string, reservationSubBlock string, reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest) *ReservationSubBlocksReportFaultyCall { + c := &ReservationSubBlocksReportFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksSetIamPolicyCall { - c.ctx_ = ctx + c.parentName = parentName + c.reservationSubBlock = reservationSubBlock + c.reservationsubblocksreportfaultyrequest = reservationsubblocksreportfaultyrequest return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{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{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationBlocksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksTestIamPermissionsCall struct { - s *Service - project string - zone string - parentResource string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// 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. // -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationBlocksTestIamPermissionsCall { - c := &ReservationBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// 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 *ReservationSubBlocksReportFaultyCall) RequestId(requestId string) *ReservationSubBlocksReportFaultyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationBlocksTestIamPermissionsCall { +func (c *ReservationSubBlocksReportFaultyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksReportFaultyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationBlocksTestIamPermissionsCall { +func (c *ReservationSubBlocksReportFaultyCall) Context(ctx context.Context) *ReservationSubBlocksReportFaultyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationBlocksTestIamPermissionsCall) Header() http.Header { +func (c *ReservationSubBlocksReportFaultyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationSubBlocksReportFaultyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsubblocksreportfaultyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -35539,22 +35167,21 @@ func (c *ReservationBlocksTestIamPermissionsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "parentName": c.parentName, + "reservationSubBlock": c.reservationSubBlock, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationBlocks.testIamPermissions" call. +// Do executes the "compute.reservationSubBlocks.reportFaulty" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ReservationBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 *ReservationSubBlocksReportFaultyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35573,7 +35200,7 @@ func (c *ReservationBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35584,121 +35211,95 @@ func (c *ReservationBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksGetCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation subBlock. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) Get(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksGetCall { - c := &ReservationSubBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - return c +type ReservationSubBlocksSetIamPolicyCall struct { + s *Service + project string + zone string + parentResource string + resource string + zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": View of the subBlock. -// -// Possible values: -// -// "SUB_BLOCK_VIEW_BASIC" - This view includes basic information about the -// -// reservation sub block -// -// "SUB_BLOCK_VIEW_FULL" - Includes detailed topology view. -// "SUB_BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. // -// default to the BASIC view. -func (c *ReservationSubBlocksGetCall) View(view string) *ReservationSubBlocksGetCall { - c.urlParams_.Set("view", view) +// - parentResource: Name or id of parent resource of the resource for this +// request. +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationSubBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationSubBlocksSetIamPolicyCall { + c := &ReservationSubBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.parentResource = parentResource + c.resource = resource + c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksGetCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetCall { +func (c *ReservationSubBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ReservationSubBlocksGetCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksGetCall) Context(ctx context.Context) *ReservationSubBlocksGetCall { +func (c *ReservationSubBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksGetCall) Header() http.Header { +func (c *ReservationSubBlocksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ReservationSubBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + 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, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, + "project": c.project, + "zone": c.zone, + "parentResource": c.parentResource, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.get" call. +// Do executes the "compute.reservationSubBlocks.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksGetResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksGetResponse, error) { +// *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 *ReservationSubBlocksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35717,7 +35318,7 @@ func (c *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*Reserva if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationSubBlocksGetResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35728,88 +35329,74 @@ func (c *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*Reserva if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksGetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationSubBlocksTestIamPermissionsCall struct { + s *Service + project string + zone string + parentResource string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - parentResource: Name or id of parent resource of the resource for this // request. // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationSubBlocksGetIamPolicyCall { - c := &ReservationSubBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationSubBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationSubBlocksTestIamPermissionsCall { + c := &ReservationSubBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.parentResource = parentResource c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationSubBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationSubBlocksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationSubBlocksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ReservationSubBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksGetIamPolicyCall { +func (c *ReservationSubBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationSubBlocksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksGetIamPolicyCall) Header() http.Header { +func (c *ReservationSubBlocksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ReservationSubBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -35820,16 +35407,17 @@ func (c *ReservationSubBlocksGetIamPolicyCall) doRequest(alt string) (*http.Resp "parentResource": c.parentResource, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.getIamPolicy" call. +// Do executes the "compute.reservationSubBlocks.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationSubBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35848,7 +35436,7 @@ func (c *ReservationSubBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35859,35 +35447,29 @@ func (c *ReservationSubBlocksGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksListCall struct { +type ReservationsAggregatedListCall struct { s *Service project string - zone string - parentName string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of reservation subBlocks under a single reservation. +// AggregatedList: Retrieves an aggregated list of reservations. // -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) List(project string, zone string, parentName string) *ReservationSubBlocksListCall { - c := &ReservationSubBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// To prevent failure, it is recommended that you set +// the +// `returnPartialSuccess` parameter to `true`. +// +// - project: Project ID for this request. +func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { + c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.parentName = parentName return c } @@ -35958,11 +35540,29 @@ func (r *ReservationSubBlocksService) List(project string, zone string, parentNa // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ReservationSubBlocksListCall) Filter(filter string) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { 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 *ReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ReservationsAggregatedListCall { + 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`, @@ -35970,7 +35570,7 @@ func (c *ReservationSubBlocksListCall) Filter(filter string) *ReservationSubBloc // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationSubBlocksListCall) MaxResults(maxResults int64) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -35990,7 +35590,7 @@ func (c *ReservationSubBlocksListCall) MaxResults(maxResults int64) *Reservation // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ReservationSubBlocksListCall) OrderBy(orderBy string) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -35999,7 +35599,7 @@ func (c *ReservationSubBlocksListCall) OrderBy(orderBy string) *ReservationSubBl // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ReservationSubBlocksListCall) PageToken(pageToken string) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -36014,15 +35614,23 @@ func (c *ReservationSubBlocksListCall) PageToken(pageToken string) *ReservationS // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ReservationSubBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which +// aggregated list request is invoked for subnetworks list-usable api. +func (c *ReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ReservationsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksListCall) Fields(s ...googleapi.Field) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36030,34 +35638,34 @@ func (c *ReservationSubBlocksListCall) Fields(s ...googleapi.Field) *Reservation // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationSubBlocksListCall) IfNoneMatch(entityTag string) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksListCall) Context(ctx context.Context) *ReservationSubBlocksListCall { +func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksListCall) Header() http.Header { +func (c *ReservationsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/reservations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -36065,21 +35673,19 @@ func (c *ReservationSubBlocksListCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.list" call. +// Do executes the "compute.reservations.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksListResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *ReservationAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksListResponse, error) { +func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36098,7 +35704,7 @@ func (c *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*Reserv if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationSubBlocksListResponse{ + ret := &ReservationAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36109,14 +35715,14 @@ func (c *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*Reserv if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ReservationSubBlocksListCall) Pages(ctx context.Context, f func(*ReservationSubBlocksListResponse) error) error { +func (c *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -36134,35 +35740,26 @@ func (c *ReservationSubBlocksListCall) Pages(ctx context.Context, f func(*Reserv } } -type ReservationSubBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsDeleteCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PerformMaintenance: Allows customers to perform maintenance on a reservation -// subBlock +// Delete: Deletes the specified reservation. // -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) PerformMaintenance(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksPerformMaintenanceCall { - c := &ReservationSubBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: Name of the reservation to delete. +// - zone: Name of the zone for this request. +func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { + c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock + c.reservation = reservation return c } @@ -36183,7 +35780,7 @@ func (r *ReservationSubBlocksService) PerformMaintenance(project string, zone st // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationSubBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationSubBlocksPerformMaintenanceCall { +func (c *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -36191,53 +35788,52 @@ func (c *ReservationSubBlocksPerformMaintenanceCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationSubBlocksPerformMaintenanceCall { +func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationSubBlocksPerformMaintenanceCall { +func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksPerformMaintenanceCall) Header() http.Header { +func (c *ReservationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.performMaintenance" call. +// Do executes the "compute.reservations.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36267,119 +35863,94 @@ func (c *ReservationSubBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksReportFaultyCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsGetCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ReportFaulty: Allows customers to report a faulty subBlock. +// Get: Retrieves information about the specified reservation. // -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) ReportFaulty(project string, zone string, parentName string, reservationSubBlock string, reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest) *ReservationSubBlocksReportFaultyCall { - c := &ReservationSubBlocksReportFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: Name of the reservation to retrieve. +// - zone: Name of the zone for this request. +func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { + c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - c.reservationsubblocksreportfaultyrequest = reservationsubblocksreportfaultyrequest - 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 *ReservationSubBlocksReportFaultyCall) RequestId(requestId string) *ReservationSubBlocksReportFaultyCall { - c.urlParams_.Set("requestId", requestId) + c.reservation = reservation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksReportFaultyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksReportFaultyCall { +func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksReportFaultyCall) Context(ctx context.Context) *ReservationSubBlocksReportFaultyCall { +func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksReportFaultyCall) Header() http.Header { +func (c *ReservationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksReportFaultyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsubblocksreportfaultyrequest) - if err != nil { - return nil, err +func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.reportFaulty" call. +// Do executes the "compute.reservations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Reservation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksReportFaultyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36398,7 +35969,7 @@ func (c *ReservationSubBlocksReportFaultyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Reservation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36409,95 +35980,103 @@ func (c *ReservationSubBlocksReportFaultyCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksSetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsGetIamPolicyCall struct { + s *Service + project string + zone string + resource 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. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such +// policy or resource exists. // -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationSubBlocksSetIamPolicyCall { - c := &ReservationSubBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { + c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.parentResource = parentResource c.resource = resource - c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksSetIamPolicyCall { +func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksSetIamPolicyCall { +func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksSetIamPolicyCall) Header() http.Header { +func (c *ReservationsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) - if err != nil { - return nil, err +func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.setIamPolicy" call. +// Do executes the "compute.reservations.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36527,72 +36106,88 @@ func (c *ReservationSubBlocksSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationSubBlocksTestIamPermissionsCall struct { - s *Service - project string - zone string - parentResource string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsInsertCall struct { + s *Service + project string + zone string + reservation *Reservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Insert: Creates a new reservation. For more information, readReserving +// zonal +// resources. // -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationSubBlocksTestIamPermissionsCall { - c := &ReservationSubBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { + c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.reservation = reservation + 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 *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationSubBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationSubBlocksTestIamPermissionsCall { +func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationSubBlocksTestIamPermissionsCall { +func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationSubBlocksTestIamPermissionsCall) Header() http.Header { +func (c *ReservationsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationSubBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36600,22 +36195,19 @@ func (c *ReservationSubBlocksTestIamPermissionsCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservationSubBlocks.testIamPermissions" call. +// Do executes the "compute.reservations.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ReservationSubBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36634,7 +36226,7 @@ func (c *ReservationSubBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36645,29 +36237,30 @@ func (c *ReservationSubBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOp if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsAggregatedListCall struct { +type ReservationsListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of reservations. -// -// To prevent failure, it is recommended that you set +// List: A list of all the reservations that have been configured for // the -// `returnPartialSuccess` parameter to `true`. +// specified project in specified zone. // // - project: Project ID for this request. -func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { - c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { + c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -36738,29 +36331,11 @@ func (r *ReservationsService) AggregatedList(project string) *ReservationsAggreg // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { 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 *ReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ReservationsAggregatedListCall { - 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`, @@ -36768,7 +36343,7 @@ func (c *ReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -36788,7 +36363,7 @@ func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *Reservati // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -36797,7 +36372,7 @@ func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAg // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -36812,23 +36387,15 @@ func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *Reservatio // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ReservationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36836,34 +36403,34 @@ func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *Reservati // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { +func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsAggregatedListCall) Header() http.Header { +func (c *ReservationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/reservations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -36872,18 +36439,19 @@ func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.aggregatedList" call. +// Do executes the "compute.reservations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, error) { +// *ReservationList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36902,7 +36470,7 @@ func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Rese if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationAggregatedList{ + ret := &ReservationList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36913,14 +36481,14 @@ func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Rese if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { +func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -36938,26 +36506,30 @@ func (c *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*Rese } } -type ReservationsDeleteCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsPerformMaintenanceCall struct { + s *Service + project string + zone string + reservation string + reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified reservation. +// PerformMaintenance: Perform maintenance on an extended reservation // -// - project: Project ID for this request. -// - reservation: Name of the reservation to delete. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { - c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - reservation: The name of the reservation. +// Name should conform to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationsService) PerformMaintenance(project string, zone string, reservation string, reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest) *ReservationsPerformMaintenanceCall { + c := &ReservationsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.reservation = reservation + c.reservationsperformmaintenancerequest = reservationsperformmaintenancerequest return c } @@ -36978,7 +36550,7 @@ func (r *ReservationsService) Delete(project string, zone string, reservation st // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { +func (c *ReservationsPerformMaintenanceCall) RequestId(requestId string) *ReservationsPerformMaintenanceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -36986,33 +36558,37 @@ func (c *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDelete // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { +func (c *ReservationsPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationsPerformMaintenanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { +func (c *ReservationsPerformMaintenanceCall) Context(ctx context.Context) *ReservationsPerformMaintenanceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsDeleteCall) Header() http.Header { +func (c *ReservationsPerformMaintenanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ReservationsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsperformmaintenancerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -37022,16 +36598,16 @@ func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { "zone": c.zone, "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.delete" call. +// Do executes the "compute.reservations.performMaintenance" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ReservationsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37061,75 +36637,94 @@ func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsGetCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationsResizeCall struct { + s *Service + project string + zone string + reservation string + reservationsresizerequest *ReservationsResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves information about the specified reservation. +// Resize: Resizes the reservation (applicable to standalone reservations +// only). For +// more information, readModifying +// reservations. // // - project: Project ID for this request. -// - reservation: Name of the reservation to retrieve. +// - reservation: Name of the reservation to update. // - zone: Name of the zone for this request. -func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { - c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { + c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.reservation = reservation + c.reservationsresizerequest = reservationsresizerequest + 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 *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { +func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { +func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsGetCall) Header() http.Header { +func (c *ReservationsResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsresizerequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -37139,16 +36734,16 @@ func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { "zone": c.zone, "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.resize", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.get" call. +// Do executes the "compute.reservations.resize" call. // Any non-2xx status code is an error. Response headers are in either -// *Reservation.ServerResponse.Header or (if a response was returned at all) in +// *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 *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error) { +func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37167,7 +36762,7 @@ func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Reservation{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37178,84 +36773,183 @@ func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.resize", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReservationsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { - c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { + c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { +func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. +func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{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{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ReservationsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { + c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { +func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsGetIamPolicyCall) Header() http.Header { +func (c *ReservationsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -37265,16 +36959,17 @@ func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, er "zone": c.zone, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.getIamPolicy" call. +// Do executes the "compute.reservations.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37293,7 +36988,7 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37304,31 +36999,38 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsInsertCall struct { - s *Service - project string - zone string - reservation *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ReservationsUpdateCall struct { + s *Service + project string + zone string + reservation string + reservation2 *Reservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a new reservation. For more information, readReserving -// zonal -// resources. +// Update: Update share settings of the reservation. // // - project: Project ID for this request. +// - reservation: Name of the reservation to update. // - zone: Name of the zone for this request. -func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { - c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ReservationsService) Update(project string, zone string, reservation string, reservation2 *Reservation) *ReservationsUpdateCall { + c := &ReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.reservation = reservation + c.reservation2 = reservation2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *ReservationsUpdateCall) Paths(paths ...string) *ReservationsUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -37349,63 +37051,71 @@ func (r *ReservationsService) Insert(project string, zone string, reservation *R // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { +func (c *ReservationsUpdateCall) RequestId(requestId string) *ReservationsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": Update_mask indicates +// fields to be updated as part of this request. +func (c *ReservationsUpdateCall) UpdateMask(updateMask string) *ReservationsUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { +func (c *ReservationsUpdateCall) Fields(s ...googleapi.Field) *ReservationsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { +func (c *ReservationsUpdateCall) Context(ctx context.Context) *ReservationsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsInsertCall) Header() http.Header { +func (c *ReservationsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation2) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.insert" call. +// Do executes the "compute.reservations.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ReservationsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37435,30 +37145,29 @@ func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsListCall struct { +type ResourcePoliciesAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: A list of all the reservations that have been configured for +// AggregatedList: Retrieves an aggregated list of resource policies. +// +// To prevent failure, Google recommends that you set // the -// specified project in specified zone. +// `returnPartialSuccess` parameter to `true`. // // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { - c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { + c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -37529,11 +37238,29 @@ func (r *ReservationsService) List(project string, zone string) *ReservationsLis // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) Filter(filter string) *ResourcePoliciesAggregatedListCall { 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 *ResourcePoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ResourcePoliciesAggregatedListCall { + 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`, @@ -37541,7 +37268,7 @@ func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *ResourcePoliciesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -37561,7 +37288,7 @@ func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCal // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePoliciesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -37570,7 +37297,7 @@ func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *ResourcePoliciesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -37585,15 +37312,23 @@ func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which +// aggregated list request is invoked for subnetworks list-usable api. +func (c *ResourcePoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *ResourcePoliciesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37601,34 +37336,34 @@ func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) IfNoneMatch(entityTag string) *ResourcePoliciesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { +func (c *ResourcePoliciesAggregatedListCall) Context(ctx context.Context) *ResourcePoliciesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsListCall) Header() http.Header { +func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/resourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -37637,19 +37372,18 @@ func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.list" call. +// Do executes the "compute.resourcePolicies.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *ReservationList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, error) { +// *ResourcePolicyAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37668,7 +37402,7 @@ func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReservationList{ + ret := &ResourcePolicyAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37679,14 +37413,14 @@ func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationLis if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { +func (c *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(*ResourcePolicyAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -37704,30 +37438,26 @@ func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationLis } } -type ReservationsPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ResourcePoliciesDeleteCall struct { + s *Service + project string + region string + resourcePolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PerformMaintenance: Perform maintenance on an extended reservation +// Delete: Deletes the specified resource policy. // -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationsService) PerformMaintenance(project string, zone string, reservation string, reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest) *ReservationsPerformMaintenanceCall { - c := &ReservationsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - resourcePolicy: Name of the resource policy to delete. +func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { + c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsperformmaintenancerequest = reservationsperformmaintenancerequest + c.region = region + c.resourcePolicy = resourcePolicy return c } @@ -37748,7 +37478,7 @@ func (r *ReservationsService) PerformMaintenance(project string, zone string, re // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationsPerformMaintenanceCall) RequestId(requestId string) *ReservationsPerformMaintenanceCall { +func (c *ResourcePoliciesDeleteCall) RequestId(requestId string) *ResourcePoliciesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -37756,56 +37486,52 @@ func (c *ReservationsPerformMaintenanceCall) RequestId(requestId string) *Reserv // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationsPerformMaintenanceCall { +func (c *ResourcePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResourcePoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsPerformMaintenanceCall) Context(ctx context.Context) *ReservationsPerformMaintenanceCall { +func (c *ResourcePoliciesDeleteCall) Context(ctx context.Context) *ResourcePoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsPerformMaintenanceCall) Header() http.Header { +func (c *ResourcePoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsperformmaintenancerequest) - if err != nil { - return nil, err - } +func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, + "project": c.project, + "region": c.region, + "resourcePolicy": c.resourcePolicy, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.performMaintenance" call. +// Do executes the "compute.resourcePolicies.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37835,226 +37561,94 @@ func (c *ReservationsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsResizeCall struct { - s *Service - project string - zone string - reservation string - reservationsresizerequest *ReservationsResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ResourcePoliciesGetCall struct { + s *Service + project string + region string + resourcePolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the reservation (applicable to standalone reservations -// only). For -// more information, readModifying -// reservations. +// Get: Retrieves all information of the specified resource policy. // // - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { - c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +// - resourcePolicy: Name of the resource policy to retrieve. +func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { + c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsresizerequest = reservationsresizerequest - 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 *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { - c.urlParams_.Set("requestId", requestId) + c.region = region + c.resourcePolicy = resourcePolicy return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { +func (c *ResourcePoliciesGetCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. -func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/resize") - 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, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { - c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ResourcePoliciesGetCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetCall { + c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { +func (c *ResourcePoliciesGetCall) Context(ctx context.Context) *ResourcePoliciesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsSetIamPolicyCall) Header() http.Header { +func (c *ResourcePoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err +func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "region": c.region, + "resourcePolicy": c.resourcePolicy, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.setIamPolicy" call. +// Do executes the "compute.resourcePolicies.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *ResourcePolicy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38073,7 +37667,7 @@ func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ResourcePolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38084,90 +37678,103 @@ func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ResourcePoliciesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such +// policy or resource exists. // // - project: Project ID for this request. +// - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { - c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { + c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone + c.region = region c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { +func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { +func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsTestIamPermissionsCall) Header() http.Header { +func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, + "region": c.region, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.testIamPermissions" call. +// Do executes the "compute.resourcePolicies.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38186,7 +37793,7 @@ func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38197,38 +37804,29 @@ func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ReservationsUpdateCall struct { - s *Service - project string - zone string - reservation string - reservation2 *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ResourcePoliciesInsertCall struct { + s *Service + project string + region string + resourcepolicy *ResourcePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Update share settings of the reservation. +// Insert: Creates a new resource policy. // // - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Update(project string, zone string, reservation string, reservation2 *Reservation) *ReservationsUpdateCall { - c := &ReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { + c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.reservation = reservation - c.reservation2 = reservation2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *ReservationsUpdateCall) Paths(paths ...string) *ReservationsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + c.region = region + c.resourcepolicy = resourcepolicy return c } @@ -38249,71 +37847,63 @@ func (c *ReservationsUpdateCall) Paths(paths ...string) *ReservationsUpdateCall // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ReservationsUpdateCall) RequestId(requestId string) *ReservationsUpdateCall { +func (c *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePoliciesInsertCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": Update_mask indicates -// fields to be updated as part of this request. -func (c *ReservationsUpdateCall) UpdateMask(updateMask string) *ReservationsUpdateCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ReservationsUpdateCall) Fields(s ...googleapi.Field) *ReservationsUpdateCall { +func (c *ResourcePoliciesInsertCall) Fields(s ...googleapi.Field) *ResourcePoliciesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ReservationsUpdateCall) Context(ctx context.Context) *ReservationsUpdateCall { +func (c *ResourcePoliciesInsertCall) Context(ctx context.Context) *ResourcePoliciesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ReservationsUpdateCall) Header() http.Header { +func (c *ResourcePoliciesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation2) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.reservations.update" call. +// Do executes the "compute.resourcePolicies.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38343,29 +37933,30 @@ func (c *ReservationsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesAggregatedListCall struct { +type ResourcePoliciesListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of resource policies. -// -// To prevent failure, Google recommends that you set +// List: A list all the resource policies that have been configured for // the -// `returnPartialSuccess` parameter to `true`. +// specified project in specified region. // // - project: Project ID for this request. -func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { - c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { + c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -38436,29 +38027,11 @@ func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePolici // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ResourcePoliciesAggregatedListCall) Filter(filter string) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCall { 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 *ResourcePoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ResourcePoliciesAggregatedListCall { - 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`, @@ -38466,7 +38039,7 @@ func (c *ResourcePoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes b // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePoliciesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -38486,7 +38059,7 @@ func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *Resou // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -38495,7 +38068,7 @@ func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePo // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -38510,23 +38083,15 @@ func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *Resour // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ResourcePoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ResourcePoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38534,34 +38099,34 @@ func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *Resou // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ResourcePoliciesAggregatedListCall) IfNoneMatch(entityTag string) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) IfNoneMatch(entityTag string) *ResourcePoliciesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesAggregatedListCall) Context(ctx context.Context) *ResourcePoliciesAggregatedListCall { +func (c *ResourcePoliciesListCall) Context(ctx context.Context) *ResourcePoliciesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { +func (c *ResourcePoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/resourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -38570,18 +38135,19 @@ func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Respon req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.aggregatedList" call. +// Do executes the "compute.resourcePolicies.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyAggregatedList, error) { +// *ResourcePolicyList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38600,7 +38166,7 @@ func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ResourcePolicyAggregatedList{ + ret := &ResourcePolicyList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38611,14 +38177,14 @@ func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(*ResourcePolicyAggregatedList) error) error { +func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38636,26 +38202,28 @@ func (c *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(* } } -type ResourcePoliciesDeleteCall struct { +type ResourcePoliciesPatchCall struct { s *Service project string region string resourcePolicy string + resourcepolicy *ResourcePolicy urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified resource policy. +// Patch: Modify the specified resource policy. // // - project: Project ID for this request. // - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to delete. -func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { - c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resourcePolicy: Id of the resource policy to patch. +func (r *ResourcePoliciesService) Patch(project string, region string, resourcePolicy string, resourcepolicy *ResourcePolicy) *ResourcePoliciesPatchCall { + c := &ResourcePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.resourcePolicy = resourcePolicy + c.resourcepolicy = resourcepolicy return c } @@ -38676,41 +38244,52 @@ func (r *ResourcePoliciesService) Delete(project string, region string, resource // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ResourcePoliciesDeleteCall) RequestId(requestId string) *ResourcePoliciesDeleteCall { +func (c *ResourcePoliciesPatchCall) RequestId(requestId string) *ResourcePoliciesPatchCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *ResourcePoliciesPatchCall) UpdateMask(updateMask string) *ResourcePoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResourcePoliciesDeleteCall { +func (c *ResourcePoliciesPatchCall) Fields(s ...googleapi.Field) *ResourcePoliciesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesDeleteCall) Context(ctx context.Context) *ResourcePoliciesDeleteCall { +func (c *ResourcePoliciesPatchCall) Context(ctx context.Context) *ResourcePoliciesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesDeleteCall) Header() http.Header { +func (c *ResourcePoliciesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ResourcePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -38720,16 +38299,16 @@ func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, erro "region": c.region, "resourcePolicy": c.resourcePolicy, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.delete" call. +// Do executes the "compute.resourcePolicies.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ResourcePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38759,94 +38338,326 @@ func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesGetCall struct { - s *Service - project string - region string - resourcePolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ResourcePoliciesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves all information of the specified resource policy. +// SetIamPolicy: Sets the access control policy on the specified +// resource. +// Replaces any existing policy. // // - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to retrieve. -func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { - c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { + c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resourcePolicy = resourcePolicy + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesGetCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetCall { +func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResourcePoliciesGetCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. +func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ResourcePoliciesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { + c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ResourcePoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ResourcePoliciesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetCall) Context(ctx context.Context) *ResourcePoliciesGetCall { +func (c *ResourcePoliciesTestIamPermissionsCall) Context(ctx context.Context) *ResourcePoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesGetCall) Header() http.Header { +func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + 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, - "resourcePolicy": c.resourcePolicy, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.get" call. +// Do executes the "compute.resourcePolicies.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RolloutPlansDeleteCall struct { + s *Service + project string + rolloutPlan string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a RolloutPlan. +// +// - project: Project ID for this request. +// - rolloutPlan: Name of the RolloutPlan resource to delete. +func (r *RolloutPlansService) Delete(project string, rolloutPlan string) *RolloutPlansDeleteCall { + c := &RolloutPlansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.rolloutPlan = rolloutPlan + 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 *RolloutPlansDeleteCall) RequestId(requestId string) *RolloutPlansDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RolloutPlansDeleteCall) Fields(s ...googleapi.Field) *RolloutPlansDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RolloutPlansDeleteCall) Context(ctx context.Context) *RolloutPlansDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RolloutPlansDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolloutPlansDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "rolloutPlan": c.rolloutPlan, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.rolloutPlans.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePolicy, error) { +func (c *RolloutPlansDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38865,7 +38676,7 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ResourcePolicy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38876,47 +38687,35 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesGetIamPolicyCall struct { +type RolloutPlansGetCall struct { s *Service project string - region string - resource string + rolloutPlan string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. +// Get: Gets details of a single project-scoped RolloutPlan. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { - c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - rolloutPlan: Name of the persistent rollout plan to return. +func (r *RolloutPlansService) Get(project string, rolloutPlan string) *RolloutPlansGetCall { + c := &RolloutPlansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.rolloutPlan = rolloutPlan return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { +func (c *RolloutPlansGetCall) Fields(s ...googleapi.Field) *RolloutPlansGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38924,34 +38723,34 @@ func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *Resourc // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { +func (c *RolloutPlansGetCall) IfNoneMatch(entityTag string) *RolloutPlansGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { +func (c *RolloutPlansGetCall) Context(ctx context.Context) *RolloutPlansGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { +func (c *RolloutPlansGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RolloutPlansGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -38959,20 +38758,19 @@ func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "rolloutPlan": c.rolloutPlan, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.getIamPolicy" call. +// Do executes the "compute.rolloutPlans.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *RolloutPlan.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RolloutPlansGetCall) Do(opts ...googleapi.CallOption) (*RolloutPlan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38991,7 +38789,7 @@ func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &RolloutPlan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39002,29 +38800,26 @@ func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesInsertCall struct { - s *Service - project string - region string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RolloutPlansInsertCall struct { + s *Service + project string + rolloutplan *RolloutPlan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a new resource policy. +// Insert: Creates a new RolloutPlan in a given project and location. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { - c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RolloutPlansService) Insert(project string, rolloutplan *RolloutPlan) *RolloutPlansInsertCall { + c := &RolloutPlansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resourcepolicy = resourcepolicy + c.rolloutplan = rolloutplan return c } @@ -39045,7 +38840,7 @@ func (r *ResourcePoliciesService) Insert(project string, region string, resource // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePoliciesInsertCall { +func (c *RolloutPlansInsertCall) RequestId(requestId string) *RolloutPlansInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -39053,35 +38848,35 @@ func (c *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePolici // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesInsertCall) Fields(s ...googleapi.Field) *ResourcePoliciesInsertCall { +func (c *RolloutPlansInsertCall) Fields(s ...googleapi.Field) *RolloutPlansInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesInsertCall) Context(ctx context.Context) *ResourcePoliciesInsertCall { +func (c *RolloutPlansInsertCall) Context(ctx context.Context) *RolloutPlansInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesInsertCall) Header() http.Header { +func (c *RolloutPlansInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RolloutPlansInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutplan) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39090,18 +38885,17 @@ func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, erro req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.insert" call. +// Do executes the "compute.rolloutPlans.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RolloutPlansInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39131,30 +38925,25 @@ func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesListCall struct { +type RolloutPlansListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: A list all the resource policies that have been configured for -// the -// specified project in specified region. +// List: Lists RolloutPlans in a given project and location. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { - c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RolloutPlansService) List(project string) *RolloutPlansListCall { + c := &RolloutPlansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -39225,7 +39014,7 @@ func (r *ResourcePoliciesService) List(project string, region string) *ResourceP // // You cannot combine constraints on multiple fields using regular // expressions. -func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) Filter(filter string) *RolloutPlansListCall { c.urlParams_.Set("filter", filter) return c } @@ -39237,7 +39026,7 @@ func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCa // the next page of results in subsequent list requests. Acceptable values // are // `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) MaxResults(maxResults int64) *RolloutPlansListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -39257,7 +39046,7 @@ func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePolicie // // Currently, only sorting by `name` or // `creationTimestamp desc` is supported. -func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) OrderBy(orderBy string) *RolloutPlansListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -39266,7 +39055,7 @@ func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesList // use. Set `pageToken` to the // `nextPageToken` returned by a previous list request to get // the next page of results. -func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) PageToken(pageToken string) *RolloutPlansListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -39281,7 +39070,7 @@ func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePolicies // single zone scope either returns all resources in the zone or no // resources, // with an error code. -func (c *ResourcePoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutPlansListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -39289,7 +39078,7 @@ func (c *ResourcePoliciesListCall) ReturnPartialSuccess(returnPartialSuccess boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) Fields(s ...googleapi.Field) *RolloutPlansListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39297,34 +39086,34 @@ func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePolicie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ResourcePoliciesListCall) IfNoneMatch(entityTag string) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) IfNoneMatch(entityTag string) *RolloutPlansListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesListCall) Context(ctx context.Context) *ResourcePoliciesListCall { +func (c *RolloutPlansListCall) Context(ctx context.Context) *RolloutPlansListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesListCall) Header() http.Header { +func (c *RolloutPlansListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RolloutPlansListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -39333,19 +39122,18 @@ func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.list" call. +// Do executes the "compute.rolloutPlans.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, error) { +// *RolloutPlansListResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RolloutPlansListCall) Do(opts ...googleapi.CallOption) (*RolloutPlansListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39364,7 +39152,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ResourcePolicyList{ + ret := &RolloutPlansListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39375,14 +39163,14 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { +func (c *RolloutPlansListCall) Pages(ctx context.Context, f func(*RolloutPlansListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -39400,28 +39188,23 @@ func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePo } } -type ResourcePoliciesPatchCall struct { - s *Service - project string - region string - resourcePolicy string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RolloutsCancelCall struct { + s *Service + project string + rollout string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Modify the specified resource policy. +// Cancel: Cancels a Rollout. // // - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Id of the resource policy to patch. -func (r *ResourcePoliciesService) Patch(project string, region string, resourcePolicy string, resourcepolicy *ResourcePolicy) *ResourcePoliciesPatchCall { - c := &ResourcePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - rollout: Name of the Rollout resource to cancel. +func (r *RolloutsService) Cancel(project string, rollout string) *RolloutsCancelCall { + c := &RolloutsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - c.resourcepolicy = resourcepolicy + c.rollout = rollout return c } @@ -39442,71 +39225,194 @@ func (r *ResourcePoliciesService) Patch(project string, region string, resourceP // a valid UUID with the exception that zero UUID is not // supported // (00000000-0000-0000-0000-000000000000). -func (c *ResourcePoliciesPatchCall) RequestId(requestId string) *ResourcePoliciesPatchCall { +func (c *RolloutsCancelCall) RequestId(requestId string) *RolloutsCancelCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *ResourcePoliciesPatchCall) UpdateMask(updateMask string) *ResourcePoliciesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Rollback sets the optional parameter "rollback": If true, then the ongoing +// rollout must be rolled back. Else, just cancel +// the rollout without taking any further actions. Note that products +// must +// support at least one of these options, however, it does not need to +// support +// both. +func (c *RolloutsCancelCall) Rollback(rollback bool) *RolloutsCancelCall { + c.urlParams_.Set("rollback", fmt.Sprint(rollback)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesPatchCall) Fields(s ...googleapi.Field) *ResourcePoliciesPatchCall { +func (c *RolloutsCancelCall) Fields(s ...googleapi.Field) *RolloutsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesPatchCall) Context(ctx context.Context) *ResourcePoliciesPatchCall { +func (c *RolloutsCancelCall) Context(ctx context.Context) *RolloutsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesPatchCall) Header() http.Header { +func (c *RolloutsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) +func (c *RolloutsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "rollout": c.rollout, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.rollouts.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RolloutsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) if err != nil { return nil, err } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RolloutsDeleteCall struct { + s *Service + project string + rollout string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Rollout. +// +// - project: Project ID for this request. +// - rollout: Name of the Rollout resource to delete. +func (r *RolloutsService) Delete(project string, rollout string) *RolloutsDeleteCall { + c := &RolloutsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.rollout = rollout + 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 *RolloutsDeleteCall) RequestId(requestId string) *RolloutsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RolloutsDeleteCall) Fields(s ...googleapi.Field) *RolloutsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RolloutsDeleteCall) Context(ctx context.Context) *RolloutsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RolloutsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolloutsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, + "project": c.project, + "rollout": c.rollout, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.patch" call. +// Do executes the "compute.rollouts.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RolloutsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39536,90 +39442,90 @@ func (c *ResourcePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RolloutsGetCall struct { + s *Service + project string + rollout 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. +// Get: Gets details of a single project-scoped Rollout. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { - c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - rollout: Name of the persistent rollout to return. +func (r *RolloutsService) Get(project string, rollout string) *RolloutsGetCall { + c := &RolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + c.rollout = rollout return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { +func (c *RolloutsGetCall) Fields(s ...googleapi.Field) *RolloutsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RolloutsGetCall) IfNoneMatch(entityTag string) *RolloutsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { +func (c *RolloutsGetCall) Context(ctx context.Context) *RolloutsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { +func (c *RolloutsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err +func (c *RolloutsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "rollout": c.rollout, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.setIamPolicy" call. +// Do executes the "compute.rollouts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *Rollout.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39638,7 +39544,7 @@ func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Rollout{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39649,90 +39555,215 @@ func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type ResourcePoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RolloutsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// List: Lists Rollouts in a given project and location. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { - c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RolloutsService) List(project string) *RolloutsListCall { + c := &RolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most +// Compute resources support two types of filter expressions: +// expressions that support regular expressions and expressions that follow +// API improvement proposal AIP-160. +// These two types of filter expressions cannot be mixed in one request. +// +// If you want to use AIP-160, your expression must specify the field name, +// an +// operator, and the value that you want to use for filtering. The value +// must be a string, a number, or a boolean. The operator +// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named `example-instance` by specifying +// `name != example-instance`. +// +// The `:*` comparison can be used to test whether a key has been defined. +// For example, to find all objects with `owner` label +// use: +// ``` +// labels.owner:* +// ``` +// +// You can also filter nested fields. For example, you could +// specify +// `scheduling.automaticRestart = false` to include instances only +// if they are not scheduled for automatic restarts. You can use filtering +// on nested fields to filter based onresource labels. +// +// To filter on multiple expressions, provide each separate expression +// within +// parentheses. For example: +// ``` +// (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake") +// ``` +// By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. +// For example: +// ``` +// (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) +// ``` +// +// If you want to use a regular expression, use the `eq` (equal) or `ne` +// (not equal) operator against a single un-parenthesized expression with +// or +// without quotes or against multiple parenthesized expressions. +// Examples: +// +// `fieldname eq unquoted literal` +// `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" +// `(fieldname1 eq literal) (fieldname2 ne "literal")` +// +// The literal value is interpreted as a regular expression using GoogleRE2 +// library syntax. +// The literal value must match the entire field. +// +// For example, to filter for instances that do not end with name +// "instance", +// you would use `name ne .*instance`. +// +// You cannot combine constraints on multiple fields using regular +// expressions. +func (c *RolloutsListCall) Filter(filter string) *RolloutsListCall { + 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 *RolloutsListCall) MaxResults(maxResults int64) *RolloutsListCall { + 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 *RolloutsListCall) OrderBy(orderBy string) *RolloutsListCall { + 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 *RolloutsListCall) PageToken(pageToken string) *RolloutsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in +// case +// of failure. The default value is false. +// +// For example, when partial success behavior is enabled, aggregatedList for +// a +// single zone scope either returns all resources in the zone or no +// resources, +// with an error code. +func (c *RolloutsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ResourcePoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ResourcePoliciesTestIamPermissionsCall { +func (c *RolloutsListCall) Fields(s ...googleapi.Field) *RolloutsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RolloutsListCall) IfNoneMatch(entityTag string) *RolloutsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesTestIamPermissionsCall) Context(ctx context.Context) *ResourcePoliciesTestIamPermissionsCall { +func (c *RolloutsListCall) Context(ctx context.Context) *RolloutsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { +func (c *RolloutsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *RolloutsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.resourcePolicies.testIamPermissions" call. +// Do executes the "compute.rollouts.list" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *RolloutsListResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RolloutsListCall) Do(opts ...googleapi.CallOption) (*RolloutsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39751,7 +39782,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &RolloutsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39762,10 +39793,31 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RolloutsListCall) Pages(ctx context.Context, f func(*RolloutsListResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type RoutersAggregatedListCall struct { s *Service project string diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 88255867183..5903ffad66d 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -4570,7 +4570,7 @@ } } }, - "revision": "20250921", + "revision": "20251104", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -5358,15 +5358,18 @@ "type": "string" }, "orderManager": { - "description": "Whether user is an order manager.", + "deprecated": true, + "description": "This role is deprecated and can no longer be assigned. Any value set will be ignored.", "type": "boolean" }, "paymentsAnalyst": { - "description": "Whether user can access payment statements.", + "deprecated": true, + "description": "This role is deprecated and can no longer be assigned. Any value set will be ignored.", "type": "boolean" }, "paymentsManager": { - "description": "Whether user can manage payment settings.", + "deprecated": true, + "description": "This role is deprecated and can no longer be assigned. Any value set will be ignored.", "type": "boolean" }, "readOnly": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 7d84d4e4cdd..a871892f701 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -1672,11 +1672,14 @@ type AccountUser struct { Admin bool `json:"admin,omitempty"` // EmailAddress: User's email address. EmailAddress string `json:"emailAddress,omitempty"` - // OrderManager: Whether user is an order manager. + // OrderManager: This role is deprecated and can no longer be assigned. Any + // value set will be ignored. OrderManager bool `json:"orderManager,omitempty"` - // PaymentsAnalyst: Whether user can access payment statements. + // PaymentsAnalyst: This role is deprecated and can no longer be assigned. Any + // value set will be ignored. PaymentsAnalyst bool `json:"paymentsAnalyst,omitempty"` - // PaymentsManager: Whether user can manage payment settings. + // PaymentsManager: This role is deprecated and can no longer be assigned. Any + // value set will be ignored. PaymentsManager bool `json:"paymentsManager,omitempty"` // ReadOnly: Optional. Whether user has standard read-only access. ReadOnly bool `json:"readOnly,omitempty"` diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 747f5e1eb55..99ecbd446d8 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -198,7 +198,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -1392,11 +1392,11 @@ } } }, - "revision": "20251020", + "revision": "20251030", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "CloudAiDocumentaiLabHifiaToolsValidationValidatorInput": { - "description": "Definition of the validation rules. Those are the input to the validator logic and they are used to validate a document.", + "description": "Definition of the validation rules. Those are the input to the validator logic and they are used to validate a document. Next ID: 3", "id": "CloudAiDocumentaiLabHifiaToolsValidationValidatorInput", "properties": { "validationRules": { @@ -1409,6 +1409,7 @@ "type": "object" }, "CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule": { + "description": "Next ID: 9", "id": "CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule", "properties": { "childAlignmentRule": { @@ -1433,6 +1434,10 @@ "name": { "description": "Name of the validation rule.", "type": "string" + }, + "ruleId": { + "description": "Unique identifier of the rule. Optional.", + "type": "string" } }, "type": "object" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 588e78f9036..0889ce74361 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -297,7 +297,7 @@ type ProjectsOperationsService struct { // CloudAiDocumentaiLabHifiaToolsValidationValidatorInput: Definition of the // validation rules. Those are the input to the validator logic and they are -// used to validate a document. +// used to validate a document. Next ID: 3 type CloudAiDocumentaiLabHifiaToolsValidationValidatorInput struct { ValidationRules []*CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule `json:"validationRules,omitempty"` // ForceSendFields is a list of field names (e.g. "ValidationRules") to @@ -318,6 +318,8 @@ func (s CloudAiDocumentaiLabHifiaToolsValidationValidatorInput) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule: Next +// ID: 9 type CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule struct { ChildAlignmentRule *CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleChildAlignmentRule `json:"childAlignmentRule,omitempty"` // Description: Description of the validation rule. This has no use but for @@ -329,6 +331,8 @@ type CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule struct FormValidation *CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidation `json:"formValidation,omitempty"` // Name: Name of the validation rule. Name string `json:"name,omitempty"` + // RuleId: Unique identifier of the rule. Optional. + RuleId string `json:"ruleId,omitempty"` // ForceSendFields is a list of field names (e.g. "ChildAlignmentRule") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -10203,9 +10207,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/firebaseappdistribution/v1/firebaseappdistribution-api.json b/firebaseappdistribution/v1/firebaseappdistribution-api.json index 30c2ce05581..06e9147f5b6 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1/firebaseappdistribution-api.json @@ -128,7 +128,7 @@ ], "parameters": { "app": { - "description": "Required. The name of the app resource. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The name of the app resource. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -163,7 +163,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the `AabInfo` resource to retrieve. Format: `projects/{project_number}/apps/{app_id}/aabInfo`", + "description": "Required. The name of the `AabInfo` resource to retrieve. Format: `projects/{project_number}/apps/{app}/aabInfo`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/aabInfo$", "required": true, @@ -192,7 +192,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -220,7 +220,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the release resource to distribute. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "Required. The name of the release resource to distribute. Format: `projects/{project_number}/apps/{app}/releases/{release}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+$", "required": true, @@ -248,7 +248,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the release resource to retrieve. Format: projects/{project_number}/apps/{app_id}/releases/{release_id}", + "description": "Required. The name of the release resource to retrieve. Format: projects/{project_number}/apps/{app}/releases/{release}", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+$", "required": true, @@ -294,7 +294,7 @@ "type": "string" }, "parent": { - "description": "Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -319,7 +319,7 @@ ], "parameters": { "name": { - "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+$", "required": true, @@ -946,7 +946,7 @@ } } }, - "revision": "20250924", + "revision": "20251104", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -1449,7 +1449,7 @@ "id": "GoogleFirebaseAppdistroV1BatchDeleteReleasesRequest", "properties": { "names": { - "description": "Required. The names of the release resources to delete. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}` A maximum of 100 releases can be deleted per request.", + "description": "Required. The names of the release resources to delete. Format: `projects/{project_number}/apps/{app}/releases/{release}` A maximum of 100 releases can be deleted per request.", "items": { "type": "string" }, @@ -1724,7 +1724,7 @@ "type": "string" }, "name": { - "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}`", "type": "string" }, "releaseNotes": { diff --git a/firebaseappdistribution/v1/firebaseappdistribution-gen.go b/firebaseappdistribution/v1/firebaseappdistribution-gen.go index 2a1b48cc902..23e195851e4 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1/firebaseappdistribution-gen.go @@ -838,8 +838,8 @@ func (s GoogleFirebaseAppdistroV1BatchAddTestersResponse) MarshalJSON() ([]byte, // `BatchDeleteReleases`. type GoogleFirebaseAppdistroV1BatchDeleteReleasesRequest struct { // Names: Required. The names of the release resources to delete. Format: - // `projects/{project_number}/apps/{app_id}/releases/{release_id}` A maximum of - // 100 releases can be deleted per request. + // `projects/{project_number}/apps/{app}/releases/{release}` A maximum of 100 + // releases can be deleted per request. Names []string `json:"names,omitempty"` // ForceSendFields is a list of field names (e.g. "Names") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1216,7 +1216,7 @@ type GoogleFirebaseAppdistroV1Release struct { // single release. FirebaseConsoleUri string `json:"firebaseConsoleUri,omitempty"` // Name: The name of the release resource. Format: - // `projects/{project_number}/apps/{app_id}/releases/{release_id}` + // `projects/{project_number}/apps/{app}/releases/{release}` Name string `json:"name,omitempty"` // ReleaseNotes: Notes of the release. ReleaseNotes *GoogleFirebaseAppdistroV1ReleaseNotes `json:"releaseNotes,omitempty"` @@ -1565,7 +1565,7 @@ type MediaUploadCall struct { // with the same binary already exists. // // - app: The name of the app resource. Format: -// `projects/{project_number}/apps/{app_id}`. +// `projects/{project_number}/apps/{app}`. func (r *MediaService) Upload(app string, googlefirebaseappdistrov1uploadreleaserequest *GoogleFirebaseAppdistroV1UploadReleaseRequest) *MediaUploadCall { c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.app = app @@ -1732,7 +1732,7 @@ type ProjectsAppsGetAabInfoCall struct { // GetAabInfo: Gets Android App Bundle (AAB) information for a Firebase app. // // - name: The name of the `AabInfo` resource to retrieve. Format: -// `projects/{project_number}/apps/{app_id}/aabInfo`. +// `projects/{project_number}/apps/{app}/aabInfo`. func (r *ProjectsAppsService) GetAabInfo(name string) *ProjectsAppsGetAabInfoCall { c := &ProjectsAppsGetAabInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1844,7 +1844,7 @@ type ProjectsAppsReleasesBatchDeleteCall struct { // request. // // - parent: The name of the app resource, which is the parent of the release -// resources. Format: `projects/{project_number}/apps/{app_id}`. +// resources. Format: `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsReleasesService) BatchDelete(parent string, googlefirebaseappdistrov1batchdeletereleasesrequest *GoogleFirebaseAppdistroV1BatchDeleteReleasesRequest) *ProjectsAppsReleasesBatchDeleteCall { c := &ProjectsAppsReleasesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1953,7 +1953,7 @@ type ProjectsAppsReleasesDistributeCall struct { // `INVALID_ARGUMENT` if it contains a group that doesn't exist. // // - name: The name of the release resource to distribute. Format: -// `projects/{project_number}/apps/{app_id}/releases/{release_id}`. +// `projects/{project_number}/apps/{app}/releases/{release}`. func (r *ProjectsAppsReleasesService) Distribute(name string, googlefirebaseappdistrov1distributereleaserequest *GoogleFirebaseAppdistroV1DistributeReleaseRequest) *ProjectsAppsReleasesDistributeCall { c := &ProjectsAppsReleasesDistributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2058,7 +2058,7 @@ type ProjectsAppsReleasesGetCall struct { // Get: Gets a release. // // - name: The name of the release resource to retrieve. Format: -// projects/{project_number}/apps/{app_id}/releases/{release_id}. +// projects/{project_number}/apps/{app}/releases/{release}. func (r *ProjectsAppsReleasesService) Get(name string) *ProjectsAppsReleasesGetCall { c := &ProjectsAppsReleasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2169,7 +2169,7 @@ type ProjectsAppsReleasesListCall struct { // List: Lists releases. By default, sorts by `createTime` in descending order. // // - parent: The name of the app resource, which is the parent of the release -// resources. Format: `projects/{project_number}/apps/{app_id}`. +// resources. Format: `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsReleasesService) List(parent string) *ProjectsAppsReleasesListCall { c := &ProjectsAppsReleasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2342,7 +2342,7 @@ type ProjectsAppsReleasesPatchCall struct { // Patch: Updates a release. // // - name: The name of the release resource. Format: -// `projects/{project_number}/apps/{app_id}/releases/{release_id}`. +// `projects/{project_number}/apps/{app}/releases/{release}`. func (r *ProjectsAppsReleasesService) Patch(name string, googlefirebaseappdistrov1release *GoogleFirebaseAppdistroV1Release) *ProjectsAppsReleasesPatchCall { c := &ProjectsAppsReleasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json index d9c4e41aafb..c2ff81ab4d6 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json @@ -396,7 +396,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the `TestConfig` resource to retrieve. Format: `projects/{project_number}/apps/{app_id}/testConfig`", + "description": "Required. The name of the `TestConfig` resource to retrieve. Format: `projects/{project_number}/apps/{app}/testConfig`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testConfig$", "required": true, @@ -421,7 +421,7 @@ ], "parameters": { "name": { - "description": "Identifier. The name of the test configuration resource. Format: `projects/{project_number}/apps/{app_id}/testConfig`", + "description": "Identifier. The name of the test configuration resource. Format: `projects/{project_number}/apps/{app}/testConfig`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testConfig$", "required": true, @@ -461,7 +461,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", + "description": "Required. The name of the release test resource. Format: `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+/tests/[^/]+$", "required": true, @@ -486,7 +486,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the release resource, which is the parent of the test Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "Required. The name of the release resource, which is the parent of the test Format: `projects/{project_number}/apps/{app}/releases/{release}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+$", "required": true, @@ -519,7 +519,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", + "description": "Required. The name of the release test resource. Format: `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+/tests/[^/]+$", "required": true, @@ -555,7 +555,7 @@ "type": "string" }, "parent": { - "description": "Required. The name of the release resource, which is the parent of the tests Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "Required. The name of the release resource, which is the parent of the tests Format: `projects/{project_number}/apps/{app}/releases/{release}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+$", "required": true, @@ -601,7 +601,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource of the test cases being deleted. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The parent resource of the test cases being deleted. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -629,7 +629,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource of the test cases being updated. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The parent resource of the test cases being updated. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -657,7 +657,7 @@ ], "parameters": { "testCase": { - "description": "Required. The name of the test case resource for which to clear the cache. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Required. The name of the test case resource for which to clear the cache. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testCases/[^/]+$", "required": true, @@ -685,7 +685,7 @@ ], "parameters": { "parent": { - "description": "Required. The parent resource where this test case will be created. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The parent resource where this test case will be created. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -718,7 +718,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the test case resource to delete. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Required. The name of the test case resource to delete. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testCases/[^/]+$", "required": true, @@ -743,7 +743,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the test case resource to retrieve. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Required. The name of the test case resource to retrieve. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testCases/[^/]+$", "required": true, @@ -779,7 +779,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource from which to list test cases. Format: `projects/{project_number}/apps/{app_id}`", + "description": "Required. The parent resource from which to list test cases. Format: `projects/{project_number}/apps/{app}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+$", "required": true, @@ -809,7 +809,7 @@ "type": "boolean" }, "name": { - "description": "Identifier. The name of the test case resource. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Identifier. The name of the test case resource. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "location": "path", "pattern": "^projects/[^/]+/apps/[^/]+/testCases/[^/]+$", "required": true, @@ -868,7 +868,7 @@ } } }, - "revision": "20251103", + "revision": "20251104", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "AndroidxCrawlerOutputPoint": { @@ -946,7 +946,7 @@ "type": "string" }, "name": { - "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`", + "description": "The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}`", "type": "string" }, "releaseNotes": { @@ -1210,7 +1210,7 @@ "id": "GoogleFirebaseAppdistroV1alphaBatchDeleteTestCasesRequest", "properties": { "names": { - "description": "Required. The name of the test cases to delete. A maximum number of 1000 test cases can be deleted in one batch Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Required. The name of the test cases to delete. A maximum number of 1000 test cases can be deleted in one batch Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "items": { "type": "string" }, @@ -1406,7 +1406,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the device execution resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}/deviceExecutions/{device_execution}`", + "description": "Identifier. The name of the device execution resource. Format: `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}/deviceExecutions/{device_execution}`", "type": "string" }, "resultsStoragePath": { @@ -2002,7 +2002,7 @@ "description": "Optional. Input only. Login credentials for the test. Input only." }, "name": { - "description": "The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", + "description": "The name of the release test resource. Format: `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}`", "type": "string" }, "testCase": { @@ -2154,7 +2154,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the test case resource. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`", + "description": "Identifier. The name of the test case resource. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", "type": "string" }, "prerequisiteTestCase": { @@ -2173,7 +2173,7 @@ "type": "string" }, "name": { - "description": "Identifier. The name of the test configuration resource. Format: `projects/{project_number}/apps/{app_id}/testConfig`", + "description": "Identifier. The name of the test configuration resource. Format: `projects/{project_number}/apps/{app}/testConfig`", "type": "string" }, "roboCrawler": { @@ -2265,7 +2265,7 @@ }, "testCase": { "$ref": "GoogleFirebaseAppdistroV1alphaTestCase", - "description": "Required. The test case to update. The test case's `name` field is used to identify the test case to update. Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`" + "description": "Required. The test case to update. The test case's `name` field is used to identify the test case to update. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`" } }, "type": "object" diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go index b4d5321b7c8..67295a4d25f 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go @@ -363,7 +363,7 @@ type GoogleFirebaseAppdistroV1Release struct { // single release. FirebaseConsoleUri string `json:"firebaseConsoleUri,omitempty"` // Name: The name of the release resource. Format: - // `projects/{project_number}/apps/{app_id}/releases/{release_id}` + // `projects/{project_number}/apps/{app}/releases/{release}` Name string `json:"name,omitempty"` // ReleaseNotes: Notes of the release. ReleaseNotes *GoogleFirebaseAppdistroV1ReleaseNotes `json:"releaseNotes,omitempty"` @@ -679,7 +679,7 @@ func (s GoogleFirebaseAppdistroV1alphaAssertionDetails) MarshalJSON() ([]byte, e type GoogleFirebaseAppdistroV1alphaBatchDeleteTestCasesRequest struct { // Names: Required. The name of the test cases to delete. A maximum number of // 1000 test cases can be deleted in one batch Format: - // `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}` + // `projects/{project_number}/apps/{app}/testCases/{test_case}` Names []string `json:"names,omitempty"` // ForceSendFields is a list of field names (e.g. "Names") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -901,8 +901,8 @@ type GoogleFirebaseAppdistroV1alphaDeviceExecution struct { // unsupported. InconclusiveReason string `json:"inconclusiveReason,omitempty"` // Name: Identifier. The name of the device execution resource. Format: - // `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id - // }/deviceExecutions/{device_execution}` + // `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}/deviceE + // xecutions/{device_execution}` Name string `json:"name,omitempty"` // ResultsStoragePath: Output only. The path to a directory in Cloud Storage // that will eventually contain the results for this execution. For example, @@ -1574,8 +1574,7 @@ type GoogleFirebaseAppdistroV1alphaReleaseTest struct { // only. LoginCredential *GoogleFirebaseAppdistroV1alphaLoginCredential `json:"loginCredential,omitempty"` // Name: The name of the release test resource. Format: - // `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id - // }` + // `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}` Name string `json:"name,omitempty"` // TestCase: Optional. The test case that was used to generate this release // test. Note: The test case may have changed or been deleted since the release @@ -1738,7 +1737,7 @@ type GoogleFirebaseAppdistroV1alphaTestCase struct { // DisplayName: Required. Display name of the test case. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The name of the test case resource. Format: - // `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}` + // `projects/{project_number}/apps/{app}/testCases/{test_case}` Name string `json:"name,omitempty"` // PrerequisiteTestCase: Optional. Test case that must be run before this test // case. @@ -1770,7 +1769,7 @@ type GoogleFirebaseAppdistroV1alphaTestConfig struct { // release test is created with multiple goals. DisplayName string `json:"displayName,omitempty"` // Name: Identifier. The name of the test configuration resource. Format: - // `projects/{project_number}/apps/{app_id}/testConfig` + // `projects/{project_number}/apps/{app}/testConfig` Name string `json:"name,omitempty"` // RoboCrawler: Optional. Configuration for Robo crawler RoboCrawler *GoogleFirebaseAppdistroV1alphaRoboCrawler `json:"roboCrawler,omitempty"` @@ -1895,7 +1894,7 @@ type GoogleFirebaseAppdistroV1alphaUpdateTestCaseRequest struct { AllowMissing bool `json:"allowMissing,omitempty"` // TestCase: Required. The test case to update. The test case's `name` field is // used to identify the test case to update. Format: - // `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}` + // `projects/{project_number}/apps/{app}/testCases/{test_case}` TestCase *GoogleFirebaseAppdistroV1alphaTestCase `json:"testCase,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowMissing") to // unconditionally include in API requests. By default, fields with empty or @@ -2860,7 +2859,7 @@ type ProjectsAppsGetTestConfigCall struct { // GetTestConfig: Gets configuration for automated tests. // // - name: The name of the `TestConfig` resource to retrieve. Format: -// `projects/{project_number}/apps/{app_id}/testConfig`. +// `projects/{project_number}/apps/{app}/testConfig`. func (r *ProjectsAppsService) GetTestConfig(name string) *ProjectsAppsGetTestConfigCall { c := &ProjectsAppsGetTestConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2971,7 +2970,7 @@ type ProjectsAppsUpdateTestConfigCall struct { // UpdateTestConfig: Updates automated test configuration. // // - name: Identifier. The name of the test configuration resource. Format: -// `projects/{project_number}/apps/{app_id}/testConfig`. +// `projects/{project_number}/apps/{app}/testConfig`. func (r *ProjectsAppsService) UpdateTestConfig(name string, googlefirebaseappdistrov1alphatestconfig *GoogleFirebaseAppdistroV1alphaTestConfig) *ProjectsAppsUpdateTestConfigCall { c := &ProjectsAppsUpdateTestConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3083,8 +3082,7 @@ type ProjectsAppsReleasesTestsCancelCall struct { // Cancel: Abort automated test run on release. // // - name: The name of the release test resource. Format: -// `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_ -// id}`. +// `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}`. func (r *ProjectsAppsReleasesTestsService) Cancel(name string) *ProjectsAppsReleasesTestsCancelCall { c := &ProjectsAppsReleasesTestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3195,7 +3193,7 @@ type ProjectsAppsReleasesTestsCreateCall struct { // Create: Run automated test(s) on release. // // - parent: The name of the release resource, which is the parent of the test -// Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`. +// Format: `projects/{project_number}/apps/{app}/releases/{release}`. func (r *ProjectsAppsReleasesTestsService) Create(parent string, googlefirebaseappdistrov1alphareleasetest *GoogleFirebaseAppdistroV1alphaReleaseTest) *ProjectsAppsReleasesTestsCreateCall { c := &ProjectsAppsReleasesTestsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3309,8 +3307,7 @@ type ProjectsAppsReleasesTestsGetCall struct { // Get: Get results for automated test run on release. // // - name: The name of the release test resource. Format: -// `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_ -// id}`. +// `projects/{project_number}/apps/{app}/releases/{release}/tests/{test}`. func (r *ProjectsAppsReleasesTestsService) Get(name string) *ProjectsAppsReleasesTestsGetCall { c := &ProjectsAppsReleasesTestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3421,7 +3418,7 @@ type ProjectsAppsReleasesTestsListCall struct { // List: List results for automated tests run on release. // // - parent: The name of the release resource, which is the parent of the tests -// Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}`. +// Format: `projects/{project_number}/apps/{app}/releases/{release}`. func (r *ProjectsAppsReleasesTestsService) List(parent string) *ProjectsAppsReleasesTestsListCall { c := &ProjectsAppsReleasesTestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3590,7 +3587,7 @@ type ProjectsAppsTestCasesBatchDeleteCall struct { // BatchDelete: Deletes multiple test cases. // // - parent: The parent resource of the test cases being deleted. Format: -// `projects/{project_number}/apps/{app_id}`. +// `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsTestCasesService) BatchDelete(parent string, googlefirebaseappdistrov1alphabatchdeletetestcasesrequest *GoogleFirebaseAppdistroV1alphaBatchDeleteTestCasesRequest) *ProjectsAppsTestCasesBatchDeleteCall { c := &ProjectsAppsTestCasesBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3695,7 +3692,7 @@ type ProjectsAppsTestCasesBatchUpdateCall struct { // BatchUpdate: Updates multiple test cases. // // - parent: The parent resource of the test cases being updated. Format: -// `projects/{project_number}/apps/{app_id}`. +// `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsTestCasesService) BatchUpdate(parent string, googlefirebaseappdistrov1alphabatchupdatetestcasesrequest *GoogleFirebaseAppdistroV1alphaBatchUpdateTestCasesRequest) *ProjectsAppsTestCasesBatchUpdateCall { c := &ProjectsAppsTestCasesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3801,7 +3798,7 @@ type ProjectsAppsTestCasesClearTestCaseCacheCall struct { // device(s). // // - testCase: The name of the test case resource for which to clear the cache. -// Format: `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`. +// Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`. func (r *ProjectsAppsTestCasesService) ClearTestCaseCache(testCase string, googlefirebaseappdistrov1alphacleartestcasecacherequest *GoogleFirebaseAppdistroV1alphaClearTestCaseCacheRequest) *ProjectsAppsTestCasesClearTestCaseCacheCall { c := &ProjectsAppsTestCasesClearTestCaseCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.testCase = testCase @@ -3906,7 +3903,7 @@ type ProjectsAppsTestCasesCreateCall struct { // Create: Create a new test case. // // - parent: The parent resource where this test case will be created. Format: -// `projects/{project_number}/apps/{app_id}`. +// `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsTestCasesService) Create(parent string, googlefirebaseappdistrov1alphatestcase *GoogleFirebaseAppdistroV1alphaTestCase) *ProjectsAppsTestCasesCreateCall { c := &ProjectsAppsTestCasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4018,7 +4015,7 @@ type ProjectsAppsTestCasesDeleteCall struct { // Delete: Delete a test case. // // - name: The name of the test case resource to delete. Format: -// `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`. +// `projects/{project_number}/apps/{app}/testCases/{test_case}`. func (r *ProjectsAppsTestCasesService) Delete(name string) *ProjectsAppsTestCasesDeleteCall { c := &ProjectsAppsTestCasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4118,7 +4115,7 @@ type ProjectsAppsTestCasesGetCall struct { // Get: Get a test case. // // - name: The name of the test case resource to retrieve. Format: -// `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`. +// `projects/{project_number}/apps/{app}/testCases/{test_case}`. func (r *ProjectsAppsTestCasesService) Get(name string) *ProjectsAppsTestCasesGetCall { c := &ProjectsAppsTestCasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4229,7 +4226,7 @@ type ProjectsAppsTestCasesListCall struct { // List: List test cases. // // - parent: The parent resource from which to list test cases. Format: -// `projects/{project_number}/apps/{app_id}`. +// `projects/{project_number}/apps/{app}`. func (r *ProjectsAppsTestCasesService) List(parent string) *ProjectsAppsTestCasesListCall { c := &ProjectsAppsTestCasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4379,7 +4376,7 @@ type ProjectsAppsTestCasesPatchCall struct { // Patch: Update a test case. // // - name: Identifier. The name of the test case resource. Format: -// `projects/{project_number}/apps/{app_id}/testCases/{test_case_id}`. +// `projects/{project_number}/apps/{app}/testCases/{test_case}`. func (r *ProjectsAppsTestCasesService) Patch(name string, googlefirebaseappdistrov1alphatestcase *GoogleFirebaseAppdistroV1alphaTestCase) *ProjectsAppsTestCasesPatchCall { c := &ProjectsAppsTestCasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name diff --git a/firebaseapphosting/v1beta/firebaseapphosting-api.json b/firebaseapphosting/v1beta/firebaseapphosting-api.json index 9beb1a36442..0782ddce927 100644 --- a/firebaseapphosting/v1beta/firebaseapphosting-api.json +++ b/firebaseapphosting/v1beta/firebaseapphosting-api.json @@ -1103,7 +1103,7 @@ } } }, - "revision": "20251023", + "revision": "20251030", "rootUrl": "https://firebaseapphosting.googleapis.com/", "schemas": { "ArchiveSource": { @@ -1475,7 +1475,7 @@ "id": "Config", "properties": { "env": { - "description": "Optional. Environment variables for this build.", + "description": "Optional. Supplied environment variables for a specific build. Provided at Build creation time and immutable afterwards. This field is only applicable for Builds using a build image - (e.g., ContainerSource or ArchiveSource with locally_build_source) Attempts to set this for other build types will result in an error", "items": { "$ref": "EnvironmentVariable" }, diff --git a/firebaseapphosting/v1beta/firebaseapphosting-gen.go b/firebaseapphosting/v1beta/firebaseapphosting-gen.go index 061f965c3a4..eb5aa0daa7c 100644 --- a/firebaseapphosting/v1beta/firebaseapphosting-gen.go +++ b/firebaseapphosting/v1beta/firebaseapphosting-gen.go @@ -581,7 +581,11 @@ func (s CodebaseSource) MarshalJSON() ([]byte, error) { // Config: Additional configuration of the backend for this build. type Config struct { - // Env: Optional. Environment variables for this build. + // Env: Optional. Supplied environment variables for a specific build. Provided + // at Build creation time and immutable afterwards. This field is only + // applicable for Builds using a build image - (e.g., ContainerSource or + // ArchiveSource with locally_build_source) Attempts to set this for other + // build types will result in an error Env []*EnvironmentVariable `json:"env,omitempty"` // RunConfig: Optional. Additional configuration of the Cloud Run `service` // (https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#resource:-service). diff --git a/managedkafka/v1/managedkafka-api.json b/managedkafka/v1/managedkafka-api.json index bb3101c5799..9af60e1a962 100644 --- a/managedkafka/v1/managedkafka-api.json +++ b/managedkafka/v1/managedkafka-api.json @@ -16,10 +16,215 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/managed-service-for-apache-kafka/docs", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.africa-south1.rep.googleapis.com/", + "location": "africa-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-northeast2.rep.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.australia-southeast2.rep.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-north2.rep.googleapis.com/", + "location": "europe-north2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west10.rep.googleapis.com/", + "location": "europe-west10" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.europe-west12.rep.googleapis.com/", + "location": "europe-west12" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.me-central2.rep.googleapis.com/", + "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, { "description": "Regional Endpoint", "endpointUrl": "https://managedkafka.us-east7.rep.googleapis.com/", "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://managedkafka.us-west4.rep.googleapis.com/", + "location": "us-west4" } ], "fullyEncodeReservedExpansion": true, @@ -2946,7 +3151,7 @@ } } }, - "revision": "20251023", + "revision": "20251030", "rootUrl": "https://managedkafka.googleapis.com/", "schemas": { "AccessConfig": { diff --git a/merchantapi/products/v1/merchantapi-api.json b/merchantapi/products/v1/merchantapi-api.json index c0e3f7a2c18..9e9d85976b3 100644 --- a/merchantapi/products/v1/merchantapi-api.json +++ b/merchantapi/products/v1/merchantapi-api.json @@ -281,7 +281,7 @@ } } }, - "revision": "20251007", + "revision": "20251104", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AutomatedDiscounts": { @@ -1696,6 +1696,13 @@ }, "type": "array" }, + "shippingHandlingBusinessDays": { + "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed.", + "items": { + "$ref": "ShippingBusinessDaysConfig" + }, + "type": "array" + }, "shippingHeight": { "$ref": "ShippingDimension", "description": "Height of the item for shipping." @@ -1708,6 +1715,13 @@ "$ref": "ShippingDimension", "description": "Length of the item for shipping." }, + "shippingTransitBusinessDays": { + "description": "The business days during which orders are in transit. If not provided, Monday to Friday business days will be assumed.", + "items": { + "$ref": "ShippingBusinessDaysConfig" + }, + "type": "array" + }, "shippingWeight": { "$ref": "ShippingWeight", "description": "Weight of the item for shipping." @@ -2294,6 +2308,21 @@ }, "type": "object" }, + "ShippingBusinessDaysConfig": { + "description": "The business days during which orders are on their path to fulfillment. If not provided, Monday to Friday business days will be assumed.", + "id": "ShippingBusinessDaysConfig", + "properties": { + "businessDays": { + "description": "Effective days of the week considered for the delivery time calculation. May not be empty. The more business days included the faster the delivery. Can be set through individual days (e.g. `MTWRF`), or day ranges (e.g. `Mon-Fri`). For more information about accepted formats, see [Shipping handling business days](https://support.google.com/merchants/answer/16072859).", + "type": "string" + }, + "country": { + "description": "The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the country to which an item will ship.", + "type": "string" + } + }, + "type": "object" + }, "ShippingDimension": { "description": "The ShippingDimension of the product.", "id": "ShippingDimension", diff --git a/merchantapi/products/v1/merchantapi-gen.go b/merchantapi/products/v1/merchantapi-gen.go index 478f6fe2fee..23cf27c5ca4 100644 --- a/merchantapi/products/v1/merchantapi-gen.go +++ b/merchantapi/products/v1/merchantapi-gen.go @@ -1448,6 +1448,9 @@ type ProductAttributes struct { SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` // Shipping: Shipping rules. Shipping []*Shipping `json:"shipping,omitempty"` + // ShippingHandlingBusinessDays: The business days during which orders can be + // handled. If not provided, Monday to Friday business days will be assumed. + ShippingHandlingBusinessDays []*ShippingBusinessDaysConfig `json:"shippingHandlingBusinessDays,omitempty"` // ShippingHeight: Height of the item for shipping. ShippingHeight *ShippingDimension `json:"shippingHeight,omitempty"` // ShippingLabel: The shipping label of the product, used to group product in @@ -1455,6 +1458,9 @@ type ProductAttributes struct { ShippingLabel string `json:"shippingLabel,omitempty"` // ShippingLength: Length of the item for shipping. ShippingLength *ShippingDimension `json:"shippingLength,omitempty"` + // ShippingTransitBusinessDays: The business days during which orders are in + // transit. If not provided, Monday to Friday business days will be assumed. + ShippingTransitBusinessDays []*ShippingBusinessDaysConfig `json:"shippingTransitBusinessDays,omitempty"` // ShippingWeight: Weight of the item for shipping. ShippingWeight *ShippingWeight `json:"shippingWeight,omitempty"` // ShippingWidth: Width of the item for shipping. @@ -2138,6 +2144,39 @@ func (s Shipping) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ShippingBusinessDaysConfig: The business days during which orders are on +// their path to fulfillment. If not provided, Monday to Friday business days +// will be assumed. +type ShippingBusinessDaysConfig struct { + // BusinessDays: Effective days of the week considered for the delivery time + // calculation. May not be empty. The more business days included the faster + // the delivery. Can be set through individual days (e.g. `MTWRF`), or day + // ranges (e.g. `Mon-Fri`). For more information about accepted formats, see + // Shipping handling business days + // (https://support.google.com/merchants/answer/16072859). + BusinessDays string `json:"businessDays,omitempty"` + // Country: The CLDR territory code + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the + // country to which an item will ship. + Country string `json:"country,omitempty"` + // ForceSendFields is a list of field names (e.g. "BusinessDays") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BusinessDays") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ShippingBusinessDaysConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShippingBusinessDaysConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ShippingDimension: The ShippingDimension of the product. type ShippingDimension struct { // Unit: The unit of value. diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index 70d6b33b772..dc3c6a77587 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20250727", + "revision": "20251030", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -3061,6 +3061,10 @@ ], "type": "string" }, + "skipUnpatchableVms": { + "description": "Optional. Enables enhanced reporting for the patch job: 1. Allows the patch job to skip unpatchable instances, reporting them as SKIPPED. An instance can be unpatchable for two reasons: a. The instance runs Container-Optimized OS (COS), which cannot be patched. b. The patch job's configuration prohibits patching on Managed Instance Groups (MIGs) through the PatchConfig.migInstancesAllowed field, and the instance is part of one. 2. The system reports the patch job as SUCCEEDED if it completes without errors, regardless of whether any instances were SKIPPED. 3. The system reports the patch job as COMPLETED_WITH_INACTIVE_VMS if it completes without errors, but some instances were INACTIVE and therefore not patched.", + "type": "boolean" + }, "windowsUpdate": { "$ref": "WindowsUpdateSettings", "description": "Windows update settings. Use this override the default windows patch rules." @@ -3270,6 +3274,7 @@ "INSTANCE_LOOKUP", "PATCHING", "SUCCEEDED", + "COMPLETED_WITH_INACTIVE_VMS", "COMPLETED_WITH_ERRORS", "CANCELED", "TIMED_OUT" @@ -3280,6 +3285,7 @@ "The patch job is looking up instances to run the patch on.", "Instances are being patched.", "Patch job completed successfully.", + "The patch job completed without errors, but some instances were inactive and therefore not patched.", "Patch job completed but there were errors.", "The patch job was canceled.", "The patch job timed out." @@ -3333,7 +3339,8 @@ "TIMED_OUT", "RUNNING_PRE_PATCH_STEP", "RUNNING_POST_PATCH_STEP", - "NO_AGENT_DETECTED" + "NO_AGENT_DETECTED", + "SKIPPED" ], "enumDescriptions": [ "Unspecified.", @@ -3351,7 +3358,8 @@ "The instance exceeded the time out while applying the patch.", "The instance is running the pre-patch step.", "The instance is running the post-patch step.", - "The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service." + "The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.", + "The instance was skipped during patching due to one of two reasons: 1. The instance runs Container-Optimized OS (COS), which cannot be patched. 2. The patch job's configuration prohibits patching on Managed Instance Groups (MIGs), and the instance is part of one." ], "type": "string" } @@ -3417,6 +3425,11 @@ "format": "int64", "type": "string" }, + "skippedInstanceCount": { + "description": "Number of instances that were skipped during patching.", + "format": "int64", + "type": "string" + }, "startedInstanceCount": { "description": "Number of instances that have started.", "format": "int64", diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 80072dea9e3..57eeee6e807 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -2796,6 +2796,17 @@ type PatchConfig struct { // "ALWAYS" - Always reboot the machine after the update completes. // "NEVER" - Never reboot the machine after the update completes. RebootConfig string `json:"rebootConfig,omitempty"` + // SkipUnpatchableVms: Optional. Enables enhanced reporting for the patch job: + // 1. Allows the patch job to skip unpatchable instances, reporting them as + // SKIPPED. An instance can be unpatchable for two reasons: a. The instance + // runs Container-Optimized OS (COS), which cannot be patched. b. The patch + // job's configuration prohibits patching on Managed Instance Groups (MIGs) + // through the PatchConfig.migInstancesAllowed field, and the instance is part + // of one. 2. The system reports the patch job as SUCCEEDED if it completes + // without errors, regardless of whether any instances were SKIPPED. 3. The + // system reports the patch job as COMPLETED_WITH_INACTIVE_VMS if it completes + // without errors, but some instances were INACTIVE and therefore not patched. + SkipUnpatchableVms bool `json:"skipUnpatchableVms,omitempty"` // WindowsUpdate: Windows update settings. Use this override the default // windows patch rules. WindowsUpdate *WindowsUpdateSettings `json:"windowsUpdate,omitempty"` @@ -3011,6 +3022,8 @@ type PatchJob struct { // on. // "PATCHING" - Instances are being patched. // "SUCCEEDED" - Patch job completed successfully. + // "COMPLETED_WITH_INACTIVE_VMS" - The patch job completed without errors, + // but some instances were inactive and therefore not patched. // "COMPLETED_WITH_ERRORS" - Patch job completed but there were errors. // "CANCELED" - The patch job was canceled. // "TIMED_OUT" - The patch job timed out. @@ -3089,6 +3102,10 @@ type PatchJobInstanceDetails struct { // "NO_AGENT_DETECTED" - The service could not detect the presence of the // agent. Check to ensure that the agent is installed, running, and able to // communicate with the service. + // "SKIPPED" - The instance was skipped during patching due to one of two + // reasons: 1. The instance runs Container-Optimized OS (COS), which cannot be + // patched. 2. The patch job's configuration prohibits patching on Managed + // Instance Groups (MIGs), and the instance is part of one. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "AttemptCount") to // unconditionally include in API requests. By default, fields with empty or @@ -3141,6 +3158,8 @@ type PatchJobInstanceDetailsSummary struct { PrePatchStepInstanceCount int64 `json:"prePatchStepInstanceCount,omitempty,string"` // RebootingInstanceCount: Number of instances rebooting. RebootingInstanceCount int64 `json:"rebootingInstanceCount,omitempty,string"` + // SkippedInstanceCount: Number of instances that were skipped during patching. + SkippedInstanceCount int64 `json:"skippedInstanceCount,omitempty,string"` // StartedInstanceCount: Number of instances that have started. StartedInstanceCount int64 `json:"startedInstanceCount,omitempty,string"` // SucceededInstanceCount: Number of instances that have completed diff --git a/osconfig/v1beta/osconfig-api.json b/osconfig/v1beta/osconfig-api.json index c727db2654f..de120013331 100644 --- a/osconfig/v1beta/osconfig-api.json +++ b/osconfig/v1beta/osconfig-api.json @@ -689,7 +689,7 @@ } } }, - "revision": "20250511", + "revision": "20251030", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptRepository": { @@ -1565,6 +1565,10 @@ ], "type": "string" }, + "skipUnpatchableVms": { + "description": "Optional. Enables enhanced reporting for the patch job: 1. Allows the patch job to skip unpatchable instances, reporting them as SKIPPED. An instance can be unpatchable for two reasons: a. The instance runs Container-Optimized OS (COS), which cannot be patched. b. The patch job's configuration prohibits patching on Managed Instance Groups (MIGs) through the PatchConfig.migInstancesAllowed field, and the instance is part of one. 2. The system reports the patch job as SUCCEEDED if it completes without errors, regardless of whether any instances were SKIPPED. 3. The system reports the patch job as COMPLETED_WITH_INACTIVE_VMS if it completes without errors, but some instances were INACTIVE and therefore not patched.", + "type": "boolean" + }, "windowsUpdate": { "$ref": "WindowsUpdateSettings", "description": "Windows update settings. Use this override the default windows patch rules." @@ -1774,6 +1778,7 @@ "INSTANCE_LOOKUP", "PATCHING", "SUCCEEDED", + "COMPLETED_WITH_INACTIVE_VMS", "COMPLETED_WITH_ERRORS", "CANCELED", "TIMED_OUT" @@ -1784,6 +1789,7 @@ "The patch job is looking up instances to run the patch on.", "Instances are being patched.", "Patch job completed successfully.", + "The patch job completed without errors, but some instances were inactive and therefore not patched.", "Patch job completed but there were errors.", "The patch job was canceled.", "The patch job timed out." @@ -1837,7 +1843,8 @@ "TIMED_OUT", "RUNNING_PRE_PATCH_STEP", "RUNNING_POST_PATCH_STEP", - "NO_AGENT_DETECTED" + "NO_AGENT_DETECTED", + "SKIPPED" ], "enumDescriptions": [ "Unspecified.", @@ -1855,7 +1862,8 @@ "The instance exceeded the time out while applying the patch.", "The instance is running the pre-patch step.", "The instance is running the post-patch step.", - "The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service." + "The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.", + "The instance was skipped during patching due to one of two reasons: 1. The instance runs Container-Optimized OS (COS), which cannot be patched. 2. The patch job's configuration prohibits patching on Managed Instance Groups (MIGs), and the instance is part of one." ], "type": "string" } @@ -1921,6 +1929,11 @@ "format": "int64", "type": "string" }, + "skippedInstanceCount": { + "description": "Number of instances that were skipped during patching.", + "format": "int64", + "type": "string" + }, "startedInstanceCount": { "description": "Number of instances that have started.", "format": "int64", diff --git a/osconfig/v1beta/osconfig-gen.go b/osconfig/v1beta/osconfig-gen.go index 3c485c93944..8aade02e79d 100644 --- a/osconfig/v1beta/osconfig-gen.go +++ b/osconfig/v1beta/osconfig-gen.go @@ -1291,6 +1291,17 @@ type PatchConfig struct { // "ALWAYS" - Always reboot the machine after the update completes. // "NEVER" - Never reboot the machine after the update completes. RebootConfig string `json:"rebootConfig,omitempty"` + // SkipUnpatchableVms: Optional. Enables enhanced reporting for the patch job: + // 1. Allows the patch job to skip unpatchable instances, reporting them as + // SKIPPED. An instance can be unpatchable for two reasons: a. The instance + // runs Container-Optimized OS (COS), which cannot be patched. b. The patch + // job's configuration prohibits patching on Managed Instance Groups (MIGs) + // through the PatchConfig.migInstancesAllowed field, and the instance is part + // of one. 2. The system reports the patch job as SUCCEEDED if it completes + // without errors, regardless of whether any instances were SKIPPED. 3. The + // system reports the patch job as COMPLETED_WITH_INACTIVE_VMS if it completes + // without errors, but some instances were INACTIVE and therefore not patched. + SkipUnpatchableVms bool `json:"skipUnpatchableVms,omitempty"` // WindowsUpdate: Windows update settings. Use this override the default // windows patch rules. WindowsUpdate *WindowsUpdateSettings `json:"windowsUpdate,omitempty"` @@ -1501,6 +1512,8 @@ type PatchJob struct { // on. // "PATCHING" - Instances are being patched. // "SUCCEEDED" - Patch job completed successfully. + // "COMPLETED_WITH_INACTIVE_VMS" - The patch job completed without errors, + // but some instances were inactive and therefore not patched. // "COMPLETED_WITH_ERRORS" - Patch job completed but there were errors. // "CANCELED" - The patch job was canceled. // "TIMED_OUT" - The patch job timed out. @@ -1579,6 +1592,10 @@ type PatchJobInstanceDetails struct { // "NO_AGENT_DETECTED" - The service could not detect the presence of the // agent. Check to ensure that the agent is installed, running, and able to // communicate with the service. + // "SKIPPED" - The instance was skipped during patching due to one of two + // reasons: 1. The instance runs Container-Optimized OS (COS), which cannot be + // patched. 2. The patch job's configuration prohibits patching on Managed + // Instance Groups (MIGs), and the instance is part of one. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "AttemptCount") to // unconditionally include in API requests. By default, fields with empty or @@ -1631,6 +1648,8 @@ type PatchJobInstanceDetailsSummary struct { PrePatchStepInstanceCount int64 `json:"prePatchStepInstanceCount,omitempty,string"` // RebootingInstanceCount: Number of instances rebooting. RebootingInstanceCount int64 `json:"rebootingInstanceCount,omitempty,string"` + // SkippedInstanceCount: Number of instances that were skipped during patching. + SkippedInstanceCount int64 `json:"skippedInstanceCount,omitempty,string"` // StartedInstanceCount: Number of instances that have started. StartedInstanceCount int64 `json:"startedInstanceCount,omitempty,string"` // SucceededInstanceCount: Number of instances that have completed diff --git a/tasks/v1/tasks-api.json b/tasks/v1/tasks-api.json index ac76005f086..b36f47709f2 100644 --- a/tasks/v1/tasks-api.json +++ b/tasks/v1/tasks-api.json @@ -576,7 +576,7 @@ } } }, - "revision": "20250518", + "revision": "20251102", "rootUrl": "https://tasks.googleapis.com/", "schemas": { "AssignmentInfo": { @@ -664,7 +664,7 @@ "type": "boolean" }, "due": { - "description": "Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API.", + "description": "Scheduled date for the task (as an RFC 3339 timestamp). Optional. This represents the day that the task should be done, or that the task is visible on the calendar grid. It doesn't represent the deadline of the task. Only date information is recorded; the time portion of the timestamp is discarded when setting this field. It isn't possible to read or write the time that a task is scheduled for using the API.", "type": "string" }, "etag": { diff --git a/tasks/v1/tasks-gen.go b/tasks/v1/tasks-gen.go index 6b694f1cf42..95b85c04ca3 100644 --- a/tasks/v1/tasks-gen.go +++ b/tasks/v1/tasks-gen.go @@ -289,10 +289,12 @@ type Task struct { // to the assignment surface and unassign the task from there. The default is // False. Deleted bool `json:"deleted,omitempty"` - // Due: Due date of the task (as a RFC 3339 timestamp). Optional. The due date - // only records date information; the time portion of the timestamp is - // discarded when setting the due date. It isn't possible to read or write the - // time that a task is due via the API. + // Due: Scheduled date for the task (as an RFC 3339 timestamp). Optional. This + // represents the day that the task should be done, or that the task is visible + // on the calendar grid. It doesn't represent the deadline of the task. Only + // date information is recorded; the time portion of the timestamp is discarded + // when setting this field. It isn't possible to read or write the time that a + // task is scheduled for using the API. Due string `json:"due,omitempty"` // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index a250a762f77..beb38cec314 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2548,7 +2548,7 @@ } } }, - "revision": "20251023", + "revision": "20251030", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -3748,6 +3748,10 @@ "description": "Optional. The service account to associate the VM with.", "type": "string" }, + "storagePool": { + "description": "Optional. If specified this will be the storage pool in which the disk is created. This is the full path of the storage pool resource, for example: \"projects/my-project/zones/us-central1-a/storagePools/my-storage-pool\". The storage pool must be in the same project and zone as the target disks. The storage pool's type must match the disk type.", + "type": "string" + }, "targetProject": { "description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.", "type": "string" @@ -3920,6 +3924,10 @@ "description": "The service account to associate the VM with.", "type": "string" }, + "storagePool": { + "description": "Optional. The storage pool used for the VM disks. If specified this will be the storage pool in which the disk is created. This is the full path of the storage pool resource, for example: \"projects/my-project/zones/us-central1-a/storagePools/my-storage-pool\". The storage pool must be in the same project and zone as the target disks. The storage pool's type must match the disk type.", + "type": "string" + }, "vmName": { "description": "The name of the VM to create.", "type": "string" @@ -4188,7 +4196,7 @@ "type": "object" }, "DataDiskImageImport": { - "description": "Mentions that the image import is not using OS adaptation process.", + "description": "Used when the image import is not using OS adaptation process.", "id": "DataDiskImageImport", "properties": {}, "type": "object" diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 05e0185b6f0..06e9a37300f 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -1394,6 +1394,13 @@ type ComputeEngineTargetDefaults struct { SecureBoot bool `json:"secureBoot,omitempty"` // ServiceAccount: Optional. The service account to associate the VM with. ServiceAccount string `json:"serviceAccount,omitempty"` + // StoragePool: Optional. If specified this will be the storage pool in which + // the disk is created. This is the full path of the storage pool resource, for + // example: + // "projects/my-project/zones/us-central1-a/storagePools/my-storage-pool". The + // storage pool must be in the same project and zone as the target disks. The + // storage pool's type must match the disk type. + StoragePool string `json:"storagePool,omitempty"` // TargetProject: The full path of the resource of type TargetProject which // represents the Compute Engine project in which to create this VM. TargetProject string `json:"targetProject,omitempty"` @@ -1507,6 +1514,13 @@ type ComputeEngineTargetDetails struct { SecureBoot bool `json:"secureBoot,omitempty"` // ServiceAccount: The service account to associate the VM with. ServiceAccount string `json:"serviceAccount,omitempty"` + // StoragePool: Optional. The storage pool used for the VM disks. If specified + // this will be the storage pool in which the disk is created. This is the full + // path of the storage pool resource, for example: + // "projects/my-project/zones/us-central1-a/storagePools/my-storage-pool". The + // storage pool must be in the same project and zone as the target disks. The + // storage pool's type must match the disk type. + StoragePool string `json:"storagePool,omitempty"` // VmName: The name of the VM to create. VmName string `json:"vmName,omitempty"` // Zone: The zone in which to create the VM. @@ -1762,8 +1776,8 @@ func (s CycleStep) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DataDiskImageImport: Mentions that the image import is not using OS -// adaptation process. +// DataDiskImageImport: Used when the image import is not using OS adaptation +// process. type DataDiskImageImport struct { } diff --git a/workflows/v1beta/workflows-api.json b/workflows/v1beta/workflows-api.json index 5e5fee7a04a..da827828814 100644 --- a/workflows/v1beta/workflows-api.json +++ b/workflows/v1beta/workflows-api.json @@ -144,7 +144,7 @@ ], "parameters": { "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", + "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", "location": "query", "repeated": true, "type": "string" @@ -455,7 +455,7 @@ } } }, - "revision": "20251013", + "revision": "20251026", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { diff --git a/workflows/v1beta/workflows-gen.go b/workflows/v1beta/workflows-gen.go index 18591ef5dc0..6d6ea843193 100644 --- a/workflows/v1beta/workflows-gen.go +++ b/workflows/v1beta/workflows-gen.go @@ -641,9 +641,9 @@ func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall return c } -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. +// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not +// use this field. It is unsupported and is ignored unless explicitly +// documented otherwise. This is primarily for internal usage. func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) return c diff --git a/workspaceevents/v1/workspaceevents-api.json b/workspaceevents/v1/workspaceevents-api.json index abfc5544fad..539ba2a4edb 100644 --- a/workspaceevents/v1/workspaceevents-api.json +++ b/workspaceevents/v1/workspaceevents-api.json @@ -159,6 +159,25 @@ }, "protocol": "rest", "resources": { + "message": { + "methods": { + "stream": { + "description": "SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.", + "flatPath": "v1/message:stream", + "httpMethod": "POST", + "id": "workspaceevents.message.stream", + "parameterOrder": [], + "parameters": {}, + "path": "v1/message:stream", + "request": { + "$ref": "SendMessageRequest" + }, + "response": { + "$ref": "StreamResponse" + } + } + } + }, "operations": { "methods": { "get": { @@ -490,170 +509,1156 @@ ] } } + }, + "tasks": { + "methods": { + "cancel": { + "description": "Cancel a task from the agent. If supported one should expect no more task updates for the task.", + "flatPath": "v1/tasks/{tasksId}:cancel", + "httpMethod": "POST", + "id": "workspaceevents.tasks.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the task to cancel. Format: tasks/{task_id}", + "location": "path", + "pattern": "^tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelTaskRequest" + }, + "response": { + "$ref": "Task" + } + }, + "get": { + "description": "Get the current state of a task from the agent.", + "flatPath": "v1/tasks/{tasksId}", + "httpMethod": "GET", + "id": "workspaceevents.tasks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "historyLength": { + "description": "The number of most recent messages from the task's history to retrieve.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "name": { + "description": "Required. The resource name of the task. Format: tasks/{task_id}", + "location": "path", + "pattern": "^tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Task" + } + }, + "subscribe": { + "description": "TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.", + "flatPath": "v1/tasks/{tasksId}:subscribe", + "httpMethod": "GET", + "id": "workspaceevents.tasks.subscribe", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the task to subscribe to. Format: tasks/{task_id}", + "location": "path", + "pattern": "^tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:subscribe", + "response": { + "$ref": "StreamResponse" + } + } + }, + "resources": { + "pushNotificationConfigs": { + "methods": { + "create": { + "description": "Set a push notification config for a task.", + "flatPath": "v1/tasks/{tasksId}/pushNotificationConfigs", + "httpMethod": "POST", + "id": "workspaceevents.tasks.pushNotificationConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "configId": { + "description": "Required. The ID for the new config.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent task resource for this config. Format: tasks/{task_id}", + "location": "path", + "pattern": "^tasks/[^/]+/pushNotificationConfigs$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}", + "request": { + "$ref": "TaskPushNotificationConfig" + }, + "response": { + "$ref": "TaskPushNotificationConfig" + } + }, + "delete": { + "description": "Delete a push notification config for a task.", + "flatPath": "v1/tasks/{tasksId}/pushNotificationConfigs/{pushNotificationConfigsId}", + "httpMethod": "DELETE", + "id": "workspaceevents.tasks.pushNotificationConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the config to delete. Format: tasks/{task_id}/pushNotificationConfigs/{config_id}", + "location": "path", + "pattern": "^tasks/[^/]+/pushNotificationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + } + }, + "get": { + "description": "Get a push notification config for a task.", + "flatPath": "v1/tasks/{tasksId}/pushNotificationConfigs/{pushNotificationConfigsId}", + "httpMethod": "GET", + "id": "workspaceevents.tasks.pushNotificationConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the config to retrieve. Format: tasks/{task_id}/pushNotificationConfigs/{config_id}", + "location": "path", + "pattern": "^tasks/[^/]+/pushNotificationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TaskPushNotificationConfig" + } + }, + "list": { + "description": "Get a list of push notifications configured for a task.", + "flatPath": "v1/tasks/{tasksId}/pushNotificationConfigs", + "httpMethod": "GET", + "id": "workspaceevents.tasks.pushNotificationConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "For AIP-158 these fields are present. Usually not used/needed. The maximum number of configurations to return. If unspecified, all configs will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous ListTaskPushNotificationConfigRequest call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTaskPushNotificationConfigRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "The parent task resource. Format: tasks/{task_id}", + "location": "path", + "pattern": "^tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/pushNotificationConfigs", + "response": { + "$ref": "ListTaskPushNotificationConfigResponse" + } + } + } + } + } + }, + "v1": { + "methods": { + "getCard": { + "description": "GetAgentCard returns the agent card for the agent.", + "flatPath": "v1/card", + "httpMethod": "GET", + "id": "workspaceevents.getCard", + "parameterOrder": [], + "parameters": {}, + "path": "v1/card", + "response": { + "$ref": "AgentCard" + } + } + } } }, - "revision": "20250930", + "revision": "20251102", "rootUrl": "https://workspaceevents.googleapis.com/", "schemas": { - "ListSubscriptionsResponse": { - "description": "The response message for SubscriptionsService.ListSubscriptions.", - "id": "ListSubscriptionsResponse", + "APIKeySecurityScheme": { + "id": "APIKeySecurityScheme", "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "description": { + "description": "Description of this security scheme.", "type": "string" }, - "subscriptions": { - "description": "List of subscriptions.", - "items": { - "$ref": "Subscription" - }, - "type": "array" + "location": { + "description": "Location of the API key, valid values are \"query\", \"header\", or \"cookie\"", + "type": "string" + }, + "name": { + "description": "Name of the header, query or cookie parameter to be used.", + "type": "string" } }, "type": "object" }, - "NotificationEndpoint": { - "description": "The endpoint where the subscription delivers events.", - "id": "NotificationEndpoint", + "AgentCapabilities": { + "description": "Defines the A2A feature set supported by the agent", + "id": "AgentCapabilities", "properties": { - "pubsubTopic": { - "description": "Immutable. The Pub/Sub topic that receives events for the subscription. Format: `projects/{project}/topics/{topic}` You must create the topic in the same Google Cloud project where you create this subscription. Note: The Google Workspace Events API uses [ordering keys](https://cloud.google.com/pubsub/docs/ordering) for the benefit of sequential events. If the Cloud Pub/Sub topic has a [message storage policy](https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions) configured to exclude the nearest Google Cloud region, publishing events with ordering keys will fail. When the topic receives events, the events are encoded as Pub/Sub messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).", - "type": "string" + "extensions": { + "description": "Extensions supported by this agent.", + "items": { + "$ref": "AgentExtension" + }, + "type": "array" + }, + "pushNotifications": { + "description": "If the agent can send push notifications to the clients webhook", + "type": "boolean" + }, + "streaming": { + "description": "If the agent will support streaming responses", + "type": "boolean" } }, "type": "object" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "id": "Operation", + "AgentCard": { + "description": "AgentCard conveys key information: - Overall details (version, name, description, uses) - Skills; a set of actions/solutions the agent can perform - Default modalities/content types supported by the agent. - Authentication requirements Next ID: 19", + "id": "AgentCard", "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", - "type": "boolean" + "additionalInterfaces": { + "description": "Announcement of additional supported transports. Client can use any of the supported transports.", + "items": { + "$ref": "AgentInterface" + }, + "type": "array" }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "capabilities": { + "$ref": "AgentCapabilities", + "description": "A2A Capability set supported by the agent." }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "defaultInputModes": { + "description": "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED The set of interaction modes that the agent supports across all skills. This can be overridden per skill. Defined as mime types.", + "items": { + "type": "string" }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" + "type": "array" + }, + "defaultOutputModes": { + "description": "The mime types supported as outputs from this agent.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "A description of the agent's domain of action/solution space. Example: \"Agent that helps users with recipes and cooking.\"", + "type": "string" + }, + "documentationUrl": { + "description": "A url to provide additional documentation about the agent.", + "type": "string" + }, + "iconUrl": { + "description": "An optional URL to an icon for the agent.", + "type": "string" }, "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "description": "A human readable name for the agent. Example: \"Recipe Agent\"", "type": "string" }, - "response": { + "preferredTransport": { + "description": "The transport of the preferred endpoint. If empty, defaults to JSONRPC.", + "type": "string" + }, + "protocolVersion": { + "description": "The version of the A2A protocol this agent supports.", + "type": "string" + }, + "provider": { + "$ref": "AgentProvider", + "description": "The service provider of the agent." + }, + "security": { + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Security requirements for contacting the agent. This list can be seen as an OR of ANDs. Each object in the list describes one possible set of security requirements that must be present on a request. This allows specifying, for example, \"callers must either use OAuth OR an API Key AND mTLS.\" Example: security { schemes { key: \"oauth\" value { list: [\"read\"] } } } security { schemes { key: \"api-key\" } schemes { key: \"mtls\" } }", + "items": { + "$ref": "Security" + }, + "type": "array" + }, + "securitySchemes": { "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "$ref": "SecurityScheme" }, - "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The security scheme details used for authenticating with this agent.", "type": "object" + }, + "signatures": { + "description": "JSON Web Signatures computed for this AgentCard.", + "items": { + "$ref": "AgentCardSignature" + }, + "type": "array" + }, + "skills": { + "description": "Skills represent a unit of ability an agent can perform. This may somewhat abstract but represents a more focused set of actions that the agent is highly likely to succeed at.", + "items": { + "$ref": "AgentSkill" + }, + "type": "array" + }, + "supportsAuthenticatedExtendedCard": { + "description": "Whether the agent supports providing an extended agent card when the user is authenticated, i.e. is the card from .well-known different than the card from GetAgentCard.", + "type": "boolean" + }, + "url": { + "description": "A URL to the address the agent is hosted at. This represents the preferred endpoint as declared by the agent.", + "type": "string" + }, + "version": { + "description": "The version of the agent. Example: \"1.0.0\"", + "type": "string" } }, "type": "object" }, - "PayloadOptions": { - "description": "Options about what data to include in the event payload. Only supported for Google Chat and Google Drive events.", - "id": "PayloadOptions", + "AgentCardSignature": { + "description": "AgentCardSignature represents a JWS signature of an AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).", + "id": "AgentCardSignature", "properties": { - "fieldMask": { - "description": "Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field.", - "format": "google-fieldmask", + "header": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The unprotected JWS header values.", + "type": "object" + }, + "protected": { + "description": "Required. The protected JWS header for the signature. This is always a base64url-encoded JSON object. Required.", "type": "string" }, - "includeResource": { - "description": "Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource.", - "type": "boolean" + "signature": { + "description": "Required. The computed signature, base64url-encoded. Required.", + "type": "string" } }, "type": "object" }, - "ReactivateSubscriptionRequest": { - "description": "The request message for SubscriptionsService.ReactivateSubscription.", - "id": "ReactivateSubscriptionRequest", - "properties": {}, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", - "id": "Status", + "AgentExtension": { + "description": "A declaration of an extension supported by an Agent.", + "id": "AgentExtension", "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" + "description": { + "description": "A description of how this agent uses this extension. Example: \"Google OAuth 2.0 authentication\"", + "type": "string" }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" }, - "type": "array" + "description": "Optional configuration for the extension.", + "type": "object" }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "required": { + "description": "Whether the client must follow specific requirements of the extension. Example: false", + "type": "boolean" + }, + "uri": { + "description": "The URI of the extension. Example: \"https://developers.google.com/identity/protocols/oauth2\"", "type": "string" } }, "type": "object" }, - "Subscription": { - "description": "A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).", - "id": "Subscription", + "AgentInterface": { + "description": "Defines additional transport information for the agent.", + "id": "AgentInterface", "properties": { - "authority": { - "description": "Output only. The user who authorized the creation of the subscription. When a user authorizes the subscription, this field and the `user_authority` field have the same value and the format is: Format: `users/{user}` For Google Workspace users, the `{user}` value is the [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field from the Directory API. When a Chat app authorizes the subscription, only `service_account_authority` field populates and this field is empty.", - "readOnly": true, + "transport": { + "description": "The transport supported this url. This is an open form string, to be easily extended for many transport protocols. The core ones officially supported are JSONRPC, GRPC and HTTP+JSON.", "type": "string" }, - "createTime": { - "description": "Output only. The time when the subscription is created.", - "format": "google-datetime", - "readOnly": true, + "url": { + "description": "The url this interface is found at.", + "type": "string" + } + }, + "type": "object" + }, + "AgentProvider": { + "description": "Represents information about the service provider of an agent.", + "id": "AgentProvider", + "properties": { + "organization": { + "description": "The providers organization name Example: \"Google\"", "type": "string" }, - "etag": { - "description": "Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.", + "url": { + "description": "The providers reference url Example: \"https://ai.google.dev\"", + "type": "string" + } + }, + "type": "object" + }, + "AgentSkill": { + "description": "AgentSkill represents a unit of action/solution that the agent can perform. One can think of this as a type of highly reliable solution that an agent can be tasked to provide. Agents have the autonomy to choose how and when to use specific skills, but clients should have confidence that if the skill is defined that unit of action can be reliably performed.", + "id": "AgentSkill", + "properties": { + "description": { + "description": "A human (or llm) readable description of the skill details and behaviors.", "type": "string" }, - "eventTypes": { - "description": "Required. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. The supported event types depend on the target resource of your subscription. For details, see [Supported Google Workspace events](https://developers.google.com/workspace/events/guides#supported-events). By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", + "examples": { + "description": "A set of example queries that this skill is designed to address. These examples should help the caller to understand how to craft requests to the agent to achieve specific goals. Example: [\"I need a recipe for bread\"]", "items": { "type": "string" }, "type": "array" }, - "expireTime": { - "description": "Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.", - "format": "google-datetime", + "id": { + "description": "Unique identifier of the skill within this agent.", "type": "string" }, + "inputModes": { + "description": "Possible input modalities supported.", + "items": { + "type": "string" + }, + "type": "array" + }, "name": { - "description": "Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "description": "A human readable name for the skill.", "type": "string" }, - "notificationEndpoint": { - "$ref": "NotificationEndpoint", - "description": "Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic." + "outputModes": { + "description": "Possible output modalities produced", + "items": { + "type": "string" + }, + "type": "array" }, - "payloadOptions": { - "$ref": "PayloadOptions", - "description": "Optional. Options about what data to include in the event payload. Only supported for Google Chat and Google Drive events." + "security": { + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Security schemes necessary for the agent to leverage this skill. As in the overall AgentCard.security, this list represents a logical OR of security requirement objects. Each object is a set of security schemes that must be used together (a logical AND). protolint:enable REPEATED_FIELD_NAMES_PLURALIZED", + "items": { + "$ref": "Security" + }, + "type": "array" }, - "reconciling": { - "description": "Output only. If `true`, the subscription is in the process of being updated.", - "readOnly": true, + "tags": { + "description": "A set of tags for the skill to enhance categorization/utilization. Example: [\"cooking\", \"customer support\", \"billing\"]", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Artifact": { + "description": "Artifacts are the container for task completed results. These are similar to Messages but are intended to be the product of a task, as opposed to point-to-point communication.", + "id": "Artifact", + "properties": { + "artifactId": { + "description": "Unique identifier (e.g. UUID) for the artifact. It must be at least unique within a task.", + "type": "string" + }, + "description": { + "description": "A human readable description of the artifact, optional.", + "type": "string" + }, + "extensions": { + "description": "The URIs of extensions that are present or contributed to this Artifact.", + "items": { + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional metadata included with the artifact.", + "type": "object" + }, + "name": { + "description": "A human readable name for the artifact.", + "type": "string" + }, + "parts": { + "description": "The content of the artifact.", + "items": { + "$ref": "Part" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthenticationInfo": { + "description": "Defines authentication details, used for push notifications.", + "id": "AuthenticationInfo", + "properties": { + "credentials": { + "description": "Optional credentials", + "type": "string" + }, + "schemes": { + "description": "Supported authentication schemes - e.g. Basic, Bearer, etc", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthorizationCodeOAuthFlow": { + "id": "AuthorizationCodeOAuthFlow", + "properties": { + "authorizationUrl": { + "description": "The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS", + "type": "string" + }, + "refreshUrl": { + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.", + "type": "object" + }, + "tokenUrl": { + "description": "The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + } + }, + "type": "object" + }, + "CancelTaskRequest": { + "id": "CancelTaskRequest", + "properties": {}, + "type": "object" + }, + "ClientCredentialsOAuthFlow": { + "id": "ClientCredentialsOAuthFlow", + "properties": { + "refreshUrl": { + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.", + "type": "object" + }, + "tokenUrl": { + "description": "The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + } + }, + "type": "object" + }, + "DataPart": { + "description": "DataPart represents a structured blob. This is most commonly a JSON payload.", + "id": "DataPart", + "properties": { + "data": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "FilePart": { + "description": "FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source.", + "id": "FilePart", + "properties": { + "fileWithBytes": { + "format": "byte", + "type": "string" + }, + "fileWithUri": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "HTTPAuthSecurityScheme": { + "id": "HTTPAuthSecurityScheme", + "properties": { + "bearerFormat": { + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.", + "type": "string" + }, + "description": { + "description": "Description of this security scheme.", + "type": "string" + }, + "scheme": { + "description": "The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235.", + "type": "string" + } + }, + "type": "object" + }, + "ImplicitOAuthFlow": { + "id": "ImplicitOAuthFlow", + "properties": { + "authorizationUrl": { + "description": "The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS", + "type": "string" + }, + "refreshUrl": { + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.", + "type": "object" + } + }, + "type": "object" + }, + "ListSubscriptionsResponse": { + "description": "The response message for SubscriptionsService.ListSubscriptions.", + "id": "ListSubscriptionsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "subscriptions": { + "description": "List of subscriptions.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListTaskPushNotificationConfigResponse": { + "id": "ListTaskPushNotificationConfigResponse", + "properties": { + "configs": { + "description": "The list of push notification configurations.", + "items": { + "$ref": "TaskPushNotificationConfig" + }, + "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" + }, + "Message": { + "description": "Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id.", + "id": "Message", + "properties": { + "content": { + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.", + "items": { + "$ref": "Part" + }, + "type": "array" + }, + "contextId": { + "description": "The context id of the message. This is optional and if set, the message will be associated with the given context.", + "type": "string" + }, + "extensions": { + "description": "The URIs of extensions that are present or contributed to this Message.", + "items": { + "type": "string" + }, + "type": "array" + }, + "messageId": { + "description": "The unique identifier (e.g. UUID)of the message. This is required and created by the message creator.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.", + "type": "object" + }, + "role": { + "description": "A role for the message.", + "enum": [ + "ROLE_UNSPECIFIED", + "ROLE_USER", + "ROLE_AGENT" + ], + "enumDescriptions": [ + "", + "USER role refers to communication from the client to the server.", + "AGENT role refers to communication from the server to the client." + ], + "type": "string" + }, + "taskId": { + "description": "The task id of the message. This is optional and if set, the message will be associated with the given task.", + "type": "string" + } + }, + "type": "object" + }, + "MutualTlsSecurityScheme": { + "id": "MutualTlsSecurityScheme", + "properties": { + "description": { + "description": "Description of this security scheme.", + "type": "string" + } + }, + "type": "object" + }, + "NotificationEndpoint": { + "description": "The endpoint where the subscription delivers events.", + "id": "NotificationEndpoint", + "properties": { + "pubsubTopic": { + "description": "Immutable. The Pub/Sub topic that receives events for the subscription. Format: `projects/{project}/topics/{topic}` You must create the topic in the same Google Cloud project where you create this subscription. Note: The Google Workspace Events API uses [ordering keys](https://cloud.google.com/pubsub/docs/ordering) for the benefit of sequential events. If the Cloud Pub/Sub topic has a [message storage policy](https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions) configured to exclude the nearest Google Cloud region, publishing events with ordering keys will fail. When the topic receives events, the events are encoded as Pub/Sub messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).", + "type": "string" + } + }, + "type": "object" + }, + "OAuth2SecurityScheme": { + "id": "OAuth2SecurityScheme", + "properties": { + "description": { + "description": "Description of this security scheme.", + "type": "string" + }, + "flows": { + "$ref": "OAuthFlows", + "description": "An object containing configuration information for the flow types supported" + }, + "oauth2MetadataUrl": { + "description": "URL to the oauth2 authorization server metadata [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.", + "type": "string" + } + }, + "type": "object" + }, + "OAuthFlows": { + "id": "OAuthFlows", + "properties": { + "authorizationCode": { + "$ref": "AuthorizationCodeOAuthFlow" + }, + "clientCredentials": { + "$ref": "ClientCredentialsOAuthFlow" + }, + "implicit": { + "$ref": "ImplicitOAuthFlow" + }, + "password": { + "$ref": "PasswordOAuthFlow" + } + }, + "type": "object" + }, + "OpenIdConnectSecurityScheme": { + "id": "OpenIdConnectSecurityScheme", + "properties": { + "description": { + "description": "Description of this security scheme.", + "type": "string" + }, + "openIdConnectUrl": { + "description": "Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata.", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "Part": { + "description": "Part represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).", + "id": "Part", + "properties": { + "data": { + "$ref": "DataPart" + }, + "file": { + "$ref": "FilePart" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional metadata associated with this part.", + "type": "object" + }, + "text": { + "type": "string" + } + }, + "type": "object" + }, + "PasswordOAuthFlow": { + "id": "PasswordOAuthFlow", + "properties": { + "refreshUrl": { + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.", + "type": "object" + }, + "tokenUrl": { + "description": "The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.", + "type": "string" + } + }, + "type": "object" + }, + "PayloadOptions": { + "description": "Options about what data to include in the event payload. Only supported for Google Chat and Google Drive events.", + "id": "PayloadOptions", + "properties": { + "fieldMask": { + "description": "Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field.", + "format": "google-fieldmask", + "type": "string" + }, + "includeResource": { + "description": "Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource.", + "type": "boolean" + } + }, + "type": "object" + }, + "PushNotificationConfig": { + "description": "Configuration for setting up push notifications for task updates.", + "id": "PushNotificationConfig", + "properties": { + "authentication": { + "$ref": "AuthenticationInfo", + "description": "Information about the authentication to sent with the notification" + }, + "id": { + "description": "A unique identifier (e.g. UUID) for this push notification.", + "type": "string" + }, + "token": { + "description": "Token unique for this task/session", + "type": "string" + }, + "url": { + "description": "Url to send the notification too", + "type": "string" + } + }, + "type": "object" + }, + "ReactivateSubscriptionRequest": { + "description": "The request message for SubscriptionsService.ReactivateSubscription.", + "id": "ReactivateSubscriptionRequest", + "properties": {}, + "type": "object" + }, + "Security": { + "id": "Security", + "properties": { + "schemes": { + "additionalProperties": { + "$ref": "StringList" + }, + "type": "object" + } + }, + "type": "object" + }, + "SecurityScheme": { + "id": "SecurityScheme", + "properties": { + "apiKeySecurityScheme": { + "$ref": "APIKeySecurityScheme" + }, + "httpAuthSecurityScheme": { + "$ref": "HTTPAuthSecurityScheme" + }, + "mtlsSecurityScheme": { + "$ref": "MutualTlsSecurityScheme" + }, + "oauth2SecurityScheme": { + "$ref": "OAuth2SecurityScheme" + }, + "openIdConnectSecurityScheme": { + "$ref": "OpenIdConnectSecurityScheme" + } + }, + "type": "object" + }, + "SendMessageConfiguration": { + "description": "Configuration of a send message request.", + "id": "SendMessageConfiguration", + "properties": { + "acceptedOutputModes": { + "description": "The output modes that the agent is expected to respond with.", + "items": { + "type": "string" + }, + "type": "array" + }, + "blocking": { + "description": "If true, the message will be blocking until the task is completed. If false, the message will be non-blocking and the task will be returned immediately. It is the caller's responsibility to check for any task updates.", + "type": "boolean" + }, + "historyLength": { + "description": "The maximum number of messages to include in the history. if 0, the history will be unlimited.", + "format": "int32", + "type": "integer" + }, + "pushNotification": { + "$ref": "PushNotificationConfig", + "description": "A configuration of a webhook that can be used to receive updates" + } + }, + "type": "object" + }, + "SendMessageRequest": { + "description": "/////////// Request Messages ///////////", + "id": "SendMessageRequest", + "properties": { + "configuration": { + "$ref": "SendMessageConfiguration", + "description": "Configuration for the send request." + }, + "message": { + "$ref": "Message", + "description": "Required. The message to send to the agent." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional metadata for the request.", + "type": "object" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StreamResponse": { + "description": "The stream response for a message. The stream should be one of the following sequences: If the response is a message, the stream should contain one, and only one, message and then close If the response is a task lifecycle, the first response should be a Task object followed by zero or more TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should complete when the Task if in an interrupted or terminal state. A stream that ends before these conditions are met are", + "id": "StreamResponse", + "properties": { + "artifactUpdate": { + "$ref": "TaskArtifactUpdateEvent" + }, + "message": { + "$ref": "Message" + }, + "statusUpdate": { + "$ref": "TaskStatusUpdateEvent" + }, + "task": { + "$ref": "Task" + } + }, + "type": "object" + }, + "StringList": { + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED", + "id": "StringList", + "properties": { + "list": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Subscription": { + "description": "A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).", + "id": "Subscription", + "properties": { + "authority": { + "description": "Output only. The user who authorized the creation of the subscription. When a user authorizes the subscription, this field and the `user_authority` field have the same value and the format is: Format: `users/{user}` For Google Workspace users, the `{user}` value is the [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field from the Directory API. When a Chat app authorizes the subscription, only `service_account_authority` field populates and this field is empty.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the subscription is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "eventTypes": { + "description": "Required. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. The supported event types depend on the target resource of your subscription. For details, see [Supported Google Workspace events](https://developers.google.com/workspace/events/guides#supported-events). By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "description": "Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", + "type": "string" + }, + "notificationEndpoint": { + "$ref": "NotificationEndpoint", + "description": "Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic." + }, + "payloadOptions": { + "$ref": "PayloadOptions", + "description": "Optional. Options about what data to include in the event payload. Only supported for Google Chat and Google Drive events." + }, + "reconciling": { + "description": "Output only. If `true`, the subscription is in the process of being updated.", + "readOnly": true, "type": "boolean" }, "state": { @@ -720,6 +1725,169 @@ } }, "type": "object" + }, + "Task": { + "description": "Task is the core unit of action for A2A. It has a current status and when results are created for the task they are stored in the artifact. If there are multiple turns for a task, these are stored in history.", + "id": "Task", + "properties": { + "artifacts": { + "description": "A set of output artifacts for a Task.", + "items": { + "$ref": "Artifact" + }, + "type": "array" + }, + "contextId": { + "description": "Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages). Created by the A2A server.", + "type": "string" + }, + "history": { + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a task.", + "items": { + "$ref": "Message" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier (e.g. UUID) for the task, generated by the server for a new task.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.", + "type": "object" + }, + "status": { + "$ref": "TaskStatus", + "description": "The current status of a Task, including state and a message." + } + }, + "type": "object" + }, + "TaskArtifactUpdateEvent": { + "description": "TaskArtifactUpdateEvent represents a task delta where an artifact has been generated.", + "id": "TaskArtifactUpdateEvent", + "properties": { + "append": { + "description": "Whether this should be appended to a prior one produced", + "type": "boolean" + }, + "artifact": { + "$ref": "Artifact", + "description": "The artifact itself" + }, + "contextId": { + "description": "The id of the context that this task belongs too", + "type": "string" + }, + "lastChunk": { + "description": "Whether this represents the last part of an artifact", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional metadata associated with the artifact update.", + "type": "object" + }, + "taskId": { + "description": "The id of the task for this artifact", + "type": "string" + } + }, + "type": "object" + }, + "TaskPushNotificationConfig": { + "id": "TaskPushNotificationConfig", + "properties": { + "name": { + "description": "The resource name of the config. Format: tasks/{task_id}/pushNotificationConfigs/{config_id}", + "type": "string" + }, + "pushNotificationConfig": { + "$ref": "PushNotificationConfig", + "description": "The push notification configuration details." + } + }, + "type": "object" + }, + "TaskStatus": { + "description": "A container for the status of a task", + "id": "TaskStatus", + "properties": { + "message": { + "$ref": "Message", + "description": "A message associated with the status." + }, + "state": { + "description": "The current state of this task", + "enum": [ + "TASK_STATE_UNSPECIFIED", + "TASK_STATE_SUBMITTED", + "TASK_STATE_WORKING", + "TASK_STATE_COMPLETED", + "TASK_STATE_FAILED", + "TASK_STATE_CANCELLED", + "TASK_STATE_INPUT_REQUIRED", + "TASK_STATE_REJECTED", + "TASK_STATE_AUTH_REQUIRED" + ], + "enumDescriptions": [ + "", + "Represents the status that acknowledges a task is created", + "Represents the status that a task is actively being processed", + "Represents the status a task is finished. This is a terminal state", + "Represents the status a task is done but failed. This is a terminal state", + "Represents the status a task was cancelled before it finished. This is a terminal state.", + "Represents the status that the task requires information to complete. This is an interrupted state.", + "Represents the status that the agent has decided to not perform the task. This may be done during initial task creation or later once an agent has determined it can't or won't proceed. This is a terminal state.", + "Represents the state that some authentication is needed from the upstream client. Authentication is expected to come out-of-band thus this is not an interrupted or terminal state." + ], + "type": "string" + }, + "timestamp": { + "description": "Timestamp when the status was recorded. Example: \"2023-10-27T10:00:00Z\"", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "TaskStatusUpdateEvent": { + "description": "TaskStatusUpdateEvent is a delta even on a task indicating that a task has changed.", + "id": "TaskStatusUpdateEvent", + "properties": { + "contextId": { + "description": "The id of the context that the task belongs to", + "type": "string" + }, + "final": { + "description": "Whether this is the last status update expected for this task.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional metadata to associate with the task update.", + "type": "object" + }, + "status": { + "$ref": "TaskStatus", + "description": "The new status of the task." + }, + "taskId": { + "description": "The id of the task that is changed", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/workspaceevents/v1/workspaceevents-gen.go b/workspaceevents/v1/workspaceevents-gen.go index c20c6553d63..c8b52f65f44 100644 --- a/workspaceevents/v1/workspaceevents-gen.go +++ b/workspaceevents/v1/workspaceevents-gen.go @@ -205,8 +205,11 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err return nil, err } s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} + s.Message = NewMessageService(s) s.Operations = NewOperationsService(s) s.Subscriptions = NewSubscriptionsService(s) + s.Tasks = NewTasksService(s) + s.V1 = NewV1Service(s) if endpoint != "" { s.BasePath = endpoint } @@ -231,9 +234,15 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Message *MessageService + Operations *OperationsService Subscriptions *SubscriptionsService + + Tasks *TasksService + + V1 *V1Service } func (s *Service) userAgent() string { @@ -243,6 +252,15 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewMessageService(s *Service) *MessageService { + rs := &MessageService{s: s} + return rs +} + +type MessageService struct { + s *Service +} + func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -261,310 +279,2552 @@ type SubscriptionsService struct { s *Service } -// ListSubscriptionsResponse: The response message for -// SubscriptionsService.ListSubscriptions. -type ListSubscriptionsResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve the - // next page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Subscriptions: List of subscriptions. - Subscriptions []*Subscription `json:"subscriptions,omitempty"` +func NewTasksService(s *Service) *TasksService { + rs := &TasksService{s: s} + rs.PushNotificationConfigs = NewTasksPushNotificationConfigsService(s) + return rs +} - // 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 +type TasksService struct { + s *Service + + PushNotificationConfigs *TasksPushNotificationConfigsService +} + +func NewTasksPushNotificationConfigsService(s *Service) *TasksPushNotificationConfigsService { + rs := &TasksPushNotificationConfigsService{s: s} + return rs +} + +type TasksPushNotificationConfigsService struct { + s *Service +} + +func NewV1Service(s *Service) *V1Service { + rs := &V1Service{s: s} + return rs +} + +type V1Service struct { + s *Service +} + +type APIKeySecurityScheme struct { + // Description: Description of this security scheme. + Description string `json:"description,omitempty"` + // Location: Location of the API key, valid values are "query", "header", or + // "cookie" + Location string `json:"location,omitempty"` + // Name: Name of the header, query or cookie parameter to be used. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // NullFields is a list of field names (e.g. "Description") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListSubscriptionsResponse +func (s APIKeySecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod APIKeySecurityScheme return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// NotificationEndpoint: The endpoint where the subscription delivers events. -type NotificationEndpoint struct { - // PubsubTopic: Immutable. The Pub/Sub topic that receives events for the - // subscription. Format: `projects/{project}/topics/{topic}` You must create - // the topic in the same Google Cloud project where you create this - // subscription. Note: The Google Workspace Events API uses ordering keys - // (https://cloud.google.com/pubsub/docs/ordering) for the benefit of - // sequential events. If the Cloud Pub/Sub topic has a message storage policy - // (https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions) - // configured to exclude the nearest Google Cloud region, publishing events - // with ordering keys will fail. When the topic receives events, the events are - // encoded as Pub/Sub messages. For details, see the Google Cloud Pub/Sub - // Protocol Binding for CloudEvents - // (https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). - PubsubTopic string `json:"pubsubTopic,omitempty"` - // ForceSendFields is a list of field names (e.g. "PubsubTopic") to +// AgentCapabilities: Defines the A2A feature set supported by the agent +type AgentCapabilities struct { + // Extensions: Extensions supported by this agent. + Extensions []*AgentExtension `json:"extensions,omitempty"` + // PushNotifications: If the agent can send push notifications to the clients + // webhook + PushNotifications bool `json:"pushNotifications,omitempty"` + // Streaming: If the agent will support streaming responses + Streaming bool `json:"streaming,omitempty"` + // ForceSendFields is a list of field names (e.g. "Extensions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PubsubTopic") to include in API + // NullFields is a list of field names (e.g. "Extensions") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s NotificationEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpoint +func (s AgentCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod AgentCapabilities return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Operation: This resource represents a long-running operation that is the -// result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - Done bool `json:"done,omitempty"` - // Error: The error result of the operation in case of failure or cancellation. - Error *Status `json:"error,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as create - // time. Some services might not provide such metadata. Any method that returns - // a long-running operation should document the metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: The server-assigned name, which is only unique within the same service - // that originally returns it. If you use the default HTTP mapping, the `name` - // should be a resource name ending with `operations/{unique_id}`. +// AgentCard: AgentCard conveys key information: - Overall details (version, +// name, description, uses) - Skills; a set of actions/solutions the agent can +// perform - Default modalities/content types supported by the agent. - +// Authentication requirements Next ID: 19 +type AgentCard struct { + // AdditionalInterfaces: Announcement of additional supported transports. + // Client can use any of the supported transports. + AdditionalInterfaces []*AgentInterface `json:"additionalInterfaces,omitempty"` + // Capabilities: A2A Capability set supported by the agent. + Capabilities *AgentCapabilities `json:"capabilities,omitempty"` + // DefaultInputModes: protolint:enable REPEATED_FIELD_NAMES_PLURALIZED The set + // of interaction modes that the agent supports across all skills. This can be + // overridden per skill. Defined as mime types. + DefaultInputModes []string `json:"defaultInputModes,omitempty"` + // DefaultOutputModes: The mime types supported as outputs from this agent. + DefaultOutputModes []string `json:"defaultOutputModes,omitempty"` + // Description: A description of the agent's domain of action/solution space. + // Example: "Agent that helps users with recipes and cooking." + Description string `json:"description,omitempty"` + // DocumentationUrl: A url to provide additional documentation about the agent. + DocumentationUrl string `json:"documentationUrl,omitempty"` + // IconUrl: An optional URL to an icon for the agent. + IconUrl string `json:"iconUrl,omitempty"` + // Name: A human readable name for the agent. Example: "Recipe Agent" Name string `json:"name,omitempty"` - // Response: The normal, successful response of the operation. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` is the - // original method name. For example, if the original method name is - // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` + // PreferredTransport: The transport of the preferred endpoint. If empty, + // defaults to JSONRPC. + PreferredTransport string `json:"preferredTransport,omitempty"` + // ProtocolVersion: The version of the A2A protocol this agent supports. + ProtocolVersion string `json:"protocolVersion,omitempty"` + // Provider: The service provider of the agent. + Provider *AgentProvider `json:"provider,omitempty"` + // Security: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Security + // requirements for contacting the agent. This list can be seen as an OR of + // ANDs. Each object in the list describes one possible set of security + // requirements that must be present on a request. This allows specifying, for + // example, "callers must either use OAuth OR an API Key AND mTLS." Example: + // security { schemes { key: "oauth" value { list: ["read"] } } } security { + // schemes { key: "api-key" } schemes { key: "mtls" } } + Security []*Security `json:"security,omitempty"` + // SecuritySchemes: The security scheme details used for authenticating with + // this agent. + SecuritySchemes map[string]SecurityScheme `json:"securitySchemes,omitempty"` + // Signatures: JSON Web Signatures computed for this AgentCard. + Signatures []*AgentCardSignature `json:"signatures,omitempty"` + // Skills: Skills represent a unit of ability an agent can perform. This may + // somewhat abstract but represents a more focused set of actions that the + // agent is highly likely to succeed at. + Skills []*AgentSkill `json:"skills,omitempty"` + // SupportsAuthenticatedExtendedCard: Whether the agent supports providing an + // extended agent card when the user is authenticated, i.e. is the card from + // .well-known different than the card from GetAgentCard. + SupportsAuthenticatedExtendedCard bool `json:"supportsAuthenticatedExtendedCard,omitempty"` + // Url: A URL to the address the agent is hosted at. This represents the + // preferred endpoint as declared by the agent. + Url string `json:"url,omitempty"` + // Version: The version of the agent. Example: "1.0.0" + Version string `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. "Done") to unconditionally + // ForceSendFields is a list of field names (e.g. "AdditionalInterfaces") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalInterfaces") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AgentCard) MarshalJSON() ([]byte, error) { + type NoMethod AgentCard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AgentCardSignature: AgentCardSignature represents a JWS signature of an +// AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature +// (JWS). +type AgentCardSignature struct { + // Header: The unprotected JWS header values. + Header googleapi.RawMessage `json:"header,omitempty"` + // Protected: Required. The protected JWS header for the signature. This is + // always a base64url-encoded JSON object. Required. + Protected string `json:"protected,omitempty"` + // Signature: Required. The computed signature, base64url-encoded. Required. + Signature string `json:"signature,omitempty"` + // ForceSendFields is a list of field names (e.g. "Header") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Header") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation +func (s AgentCardSignature) MarshalJSON() ([]byte, error) { + type NoMethod AgentCardSignature return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PayloadOptions: Options about what data to include in the event payload. -// Only supported for Google Chat and Google Drive events. -type PayloadOptions struct { - // FieldMask: Optional. If `include_resource` is set to `true`, the list of - // fields to include in the event payload. Separate fields with a comma. For - // example, to include a Google Chat message's sender and create time, enter - // `message.sender,message.createTime`. If omitted, the payload includes all - // fields for the resource. If you specify a field that doesn't exist for the - // resource, the system ignores the field. - FieldMask string `json:"fieldMask,omitempty"` - // IncludeResource: Optional. Whether the event payload includes data about the - // resource that changed. For example, for an event where a Google Chat message - // was created, whether the payload contains data about the `Message` - // (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) - // resource. If false, the event payload only includes the name of the changed - // resource. - IncludeResource bool `json:"includeResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldMask") to +// AgentExtension: A declaration of an extension supported by an Agent. +type AgentExtension struct { + // Description: A description of how this agent uses this extension. Example: + // "Google OAuth 2.0 authentication" + Description string `json:"description,omitempty"` + // Params: Optional configuration for the extension. + Params googleapi.RawMessage `json:"params,omitempty"` + // Required: Whether the client must follow specific requirements of the + // extension. Example: false + Required bool `json:"required,omitempty"` + // Uri: The URI of the extension. Example: + // "https://developers.google.com/identity/protocols/oauth2" + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldMask") to include in API + // NullFields is a list of field names (e.g. "Description") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s PayloadOptions) MarshalJSON() ([]byte, error) { - type NoMethod PayloadOptions +func (s AgentExtension) MarshalJSON() ([]byte, error) { + type NoMethod AgentExtension return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ReactivateSubscriptionRequest: The request message for -// SubscriptionsService.ReactivateSubscription. -type ReactivateSubscriptionRequest struct { +// AgentInterface: Defines additional transport information for the agent. +type AgentInterface struct { + // Transport: The transport supported this url. This is an open form string, to + // be easily extended for many transport protocols. The core ones officially + // supported are JSONRPC, GRPC and HTTP+JSON. + Transport string `json:"transport,omitempty"` + // Url: The url this interface is found at. + Url string `json:"url,omitempty"` + // ForceSendFields is a list of field names (e.g. "Transport") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Transport") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// 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 +func (s AgentInterface) MarshalJSON() ([]byte, error) { + type NoMethod AgentInterface + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AgentProvider: Represents information about the service provider of an +// agent. +type AgentProvider struct { + // Organization: The providers organization name Example: "Google" + Organization string `json:"organization,omitempty"` + // Url: The providers reference url Example: "https://ai.google.dev" + Url string `json:"url,omitempty"` + // ForceSendFields is a list of field names (e.g. "Organization") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Organization") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AgentProvider) MarshalJSON() ([]byte, error) { + type NoMethod AgentProvider + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AgentSkill: AgentSkill represents a unit of action/solution that the agent +// can perform. One can think of this as a type of highly reliable solution +// that an agent can be tasked to provide. Agents have the autonomy to choose +// how and when to use specific skills, but clients should have confidence that +// if the skill is defined that unit of action can be reliably performed. +type AgentSkill struct { + // Description: A human (or llm) readable description of the skill details and + // behaviors. + Description string `json:"description,omitempty"` + // Examples: A set of example queries that this skill is designed to address. + // These examples should help the caller to understand how to craft requests to + // the agent to achieve specific goals. Example: ["I need a recipe for bread"] + Examples []string `json:"examples,omitempty"` + // Id: Unique identifier of the skill within this agent. + Id string `json:"id,omitempty"` + // InputModes: Possible input modalities supported. + InputModes []string `json:"inputModes,omitempty"` + // Name: A human readable name for the skill. + Name string `json:"name,omitempty"` + // OutputModes: Possible output modalities produced + OutputModes []string `json:"outputModes,omitempty"` + // Security: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Security schemes + // necessary for the agent to leverage this skill. As in the overall + // AgentCard.security, this list represents a logical OR of security + // requirement objects. Each object is a set of security schemes that must be + // used together (a logical AND). protolint:enable + // REPEATED_FIELD_NAMES_PLURALIZED + Security []*Security `json:"security,omitempty"` + // Tags: A set of tags for the skill to enhance categorization/utilization. + // Example: ["cooking", "customer support", "billing"] + Tags []string `json:"tags,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AgentSkill) MarshalJSON() ([]byte, error) { + type NoMethod AgentSkill + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Artifact: Artifacts are the container for task completed results. These are +// similar to Messages but are intended to be the product of a task, as opposed +// to point-to-point communication. +type Artifact struct { + // ArtifactId: Unique identifier (e.g. UUID) for the artifact. It must be at + // least unique within a task. + ArtifactId string `json:"artifactId,omitempty"` + // Description: A human readable description of the artifact, optional. + Description string `json:"description,omitempty"` + // Extensions: The URIs of extensions that are present or contributed to this + // Artifact. + Extensions []string `json:"extensions,omitempty"` + // Metadata: Optional metadata included with the artifact. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: A human readable name for the artifact. + Name string `json:"name,omitempty"` + // Parts: The content of the artifact. + Parts []*Part `json:"parts,omitempty"` + // ForceSendFields is a list of field names (e.g. "ArtifactId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ArtifactId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Artifact) MarshalJSON() ([]byte, error) { + type NoMethod Artifact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AuthenticationInfo: Defines authentication details, used for push +// notifications. +type AuthenticationInfo struct { + // Credentials: Optional credentials + Credentials string `json:"credentials,omitempty"` + // Schemes: Supported authentication schemes - e.g. Basic, Bearer, etc + Schemes []string `json:"schemes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Credentials") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Credentials") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AuthenticationInfo) MarshalJSON() ([]byte, error) { + type NoMethod AuthenticationInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type AuthorizationCodeOAuthFlow struct { + // AuthorizationUrl: The authorization URL to be used for this flow. This MUST + // be in the form of a URL. The OAuth2 standard requires the use of TLS + AuthorizationUrl string `json:"authorizationUrl,omitempty"` + // RefreshUrl: The URL to be used for obtaining refresh tokens. This MUST be in + // the form of a URL. The OAuth2 standard requires the use of TLS. + RefreshUrl string `json:"refreshUrl,omitempty"` + // Scopes: The available scopes for the OAuth2 security scheme. A map between + // the scope name and a short description for it. The map MAY be empty. + Scopes map[string]string `json:"scopes,omitempty"` + // TokenUrl: The token URL to be used for this flow. This MUST be in the form + // of a URL. The OAuth2 standard requires the use of TLS. + TokenUrl string `json:"tokenUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorizationUrl") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizationUrl") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AuthorizationCodeOAuthFlow) MarshalJSON() ([]byte, error) { + type NoMethod AuthorizationCodeOAuthFlow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CancelTaskRequest struct { +} + +type ClientCredentialsOAuthFlow struct { + // RefreshUrl: The URL to be used for obtaining refresh tokens. This MUST be in + // the form of a URL. The OAuth2 standard requires the use of TLS. + RefreshUrl string `json:"refreshUrl,omitempty"` + // Scopes: The available scopes for the OAuth2 security scheme. A map between + // the scope name and a short description for it. The map MAY be empty. + Scopes map[string]string `json:"scopes,omitempty"` + // TokenUrl: The token URL to be used for this flow. This MUST be in the form + // of a URL. The OAuth2 standard requires the use of TLS. + TokenUrl string `json:"tokenUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. "RefreshUrl") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RefreshUrl") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClientCredentialsOAuthFlow) MarshalJSON() ([]byte, error) { + type NoMethod ClientCredentialsOAuthFlow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DataPart: DataPart represents a structured blob. This is most commonly a +// JSON payload. +type DataPart struct { + Data googleapi.RawMessage `json:"data,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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status +func (s DataPart) MarshalJSON() ([]byte, error) { + type NoMethod DataPart return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Subscription: A subscription to receive events about a Google Workspace -// resource. To learn more about subscriptions, see the Google Workspace Events -// API overview (https://developers.google.com/workspace/events). -type Subscription struct { - // Authority: Output only. The user who authorized the creation of the - // subscription. When a user authorizes the subscription, this field and the - // `user_authority` field have the same value and the format is: Format: - // `users/{user}` For Google Workspace users, the `{user}` value is the - // `user.id` - // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) - // field from the Directory API. When a Chat app authorizes the subscription, - // only `service_account_authority` field populates and this field is empty. - Authority string `json:"authority,omitempty"` - // CreateTime: Output only. The time when the subscription is created. - CreateTime string `json:"createTime,omitempty"` - // Etag: Optional. This checksum is computed by the server based on the value - // of other fields, and might be sent on update requests to ensure the client - // has an up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - // EventTypes: Required. Unordered list. Input for creating a subscription. - // Otherwise, output only. One or more types of events to receive about the - // target resource. Formatted according to the CloudEvents specification. The - // supported event types depend on the target resource of your subscription. - // For details, see Supported Google Workspace events - // (https://developers.google.com/workspace/events/guides#supported-events). By - // default, you also receive events about the lifecycle of your subscription - // (https://developers.google.com/workspace/events/guides/events-lifecycle). - // You don't need to specify lifecycle events for this field. If you specify an - // event type that doesn't exist for the target resource, the request returns - // an HTTP `400 Bad Request` status code. - EventTypes []string `json:"eventTypes,omitempty"` - // ExpireTime: Non-empty default. The timestamp in UTC when the subscription - // expires. Always displayed on output, regardless of what was used on input. - ExpireTime string `json:"expireTime,omitempty"` - // Name: Identifier. Resource name of the subscription. Format: - // `subscriptions/{subscription}` - Name string `json:"name,omitempty"` - // NotificationEndpoint: Required. Immutable. The endpoint where the - // subscription delivers events, such as a Pub/Sub topic. - NotificationEndpoint *NotificationEndpoint `json:"notificationEndpoint,omitempty"` - // PayloadOptions: Optional. Options about what data to include in the event - // payload. Only supported for Google Chat and Google Drive events. - PayloadOptions *PayloadOptions `json:"payloadOptions,omitempty"` - // Reconciling: Output only. If `true`, the subscription is in the process of - // being updated. - Reconciling bool `json:"reconciling,omitempty"` - // State: Output only. The state of the subscription. Determines whether the - // subscription can receive events and deliver them to the notification - // endpoint. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "ACTIVE" - The subscription is active and can receive and deliver events - // to its notification endpoint. - // "SUSPENDED" - The subscription is unable to receive events due to an - // error. To identify the error, see the `suspension_reason` field. - // "DELETED" - The subscription is deleted. - State string `json:"state,omitempty"` - // SuspensionReason: Output only. The error that suspended the subscription. To - // reactivate the subscription, resolve the error and call the - // `ReactivateSubscription` method. +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// FilePart: FilePart represents the different ways files can be provided. If +// files are small, directly feeding the bytes is supported via +// file_with_bytes. If the file is large, the agent should read the content as +// appropriate directly from the file_with_uri source. +type FilePart struct { + FileWithBytes string `json:"fileWithBytes,omitempty"` + FileWithUri string `json:"fileWithUri,omitempty"` + MimeType string `json:"mimeType,omitempty"` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "FileWithBytes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FileWithBytes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FilePart) MarshalJSON() ([]byte, error) { + type NoMethod FilePart + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HTTPAuthSecurityScheme struct { + // BearerFormat: A hint to the client to identify how the bearer token is + // formatted. Bearer tokens are usually generated by an authorization server, + // so this information is primarily for documentation purposes. + BearerFormat string `json:"bearerFormat,omitempty"` + // Description: Description of this security scheme. + Description string `json:"description,omitempty"` + // Scheme: The name of the HTTP Authentication scheme to be used in the + // Authorization header as defined in RFC7235. The values used SHOULD be + // registered in the IANA Authentication Scheme registry. The value is + // case-insensitive, as defined in RFC7235. + Scheme string `json:"scheme,omitempty"` + // ForceSendFields is a list of field names (e.g. "BearerFormat") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BearerFormat") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s HTTPAuthSecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod HTTPAuthSecurityScheme + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ImplicitOAuthFlow struct { + // AuthorizationUrl: The authorization URL to be used for this flow. This MUST + // be in the form of a URL. The OAuth2 standard requires the use of TLS + AuthorizationUrl string `json:"authorizationUrl,omitempty"` + // RefreshUrl: The URL to be used for obtaining refresh tokens. This MUST be in + // the form of a URL. The OAuth2 standard requires the use of TLS. + RefreshUrl string `json:"refreshUrl,omitempty"` + // Scopes: The available scopes for the OAuth2 security scheme. A map between + // the scope name and a short description for it. The map MAY be empty. + Scopes map[string]string `json:"scopes,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorizationUrl") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizationUrl") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ImplicitOAuthFlow) MarshalJSON() ([]byte, error) { + type NoMethod ImplicitOAuthFlow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListSubscriptionsResponse: The response message for +// SubscriptionsService.ListSubscriptions. +type ListSubscriptionsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Subscriptions: List of subscriptions. + Subscriptions []*Subscription `json:"subscriptions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubscriptionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ListTaskPushNotificationConfigResponse struct { + // Configs: The list of push notification configurations. + Configs []*TaskPushNotificationConfig `json:"configs,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. "Configs") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListTaskPushNotificationConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTaskPushNotificationConfigResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Message: Message is one unit of communication between client and server. It +// is associated with a context and optionally a task. Since the server is +// responsible for the context definition, it must always provide a context_id +// in its messages. The client can optionally provide the context_id if it +// knows the context to associate the message to. Similarly for task_id, except +// the server decides if a task is created and whether to include the task_id. +type Message struct { + // Content: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the + // container of the message content. + Content []*Part `json:"content,omitempty"` + // ContextId: The context id of the message. This is optional and if set, the + // message will be associated with the given context. + ContextId string `json:"contextId,omitempty"` + // Extensions: The URIs of extensions that are present or contributed to this + // Message. + Extensions []string `json:"extensions,omitempty"` + // MessageId: The unique identifier (e.g. UUID)of the message. This is required + // and created by the message creator. + MessageId string `json:"messageId,omitempty"` + // Metadata: protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional + // metadata to provide along with the message. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Role: A role for the message. // // Possible values: - // "ERROR_TYPE_UNSPECIFIED" - Default value. This value is unused. - // "USER_SCOPE_REVOKED" - The authorizing user has revoked the grant of one - // or more OAuth scopes. To learn more about authorization for Google - // Workspace, see [Configure the OAuth consent - // screen](https://developers.google.com/workspace/guides/configure-oauth-consen - // t#choose-scopes). - // "RESOURCE_DELETED" - The target resource for the subscription no longer - // exists. - // "USER_AUTHORIZATION_FAILURE" - The user that authorized the creation of - // the subscription no longer has access to the subscription's target resource. - // "ENDPOINT_PERMISSION_DENIED" - The Google Workspace application doesn't - // have access to deliver events to your subscription's notification endpoint. - // "ENDPOINT_NOT_FOUND" - The subscription's notification endpoint doesn't - // exist, or the endpoint can't be found in the Google Cloud project where you - // created the subscription. - // "ENDPOINT_RESOURCE_EXHAUSTED" - The subscription's notification endpoint - // failed to receive events due to insufficient quota or reaching rate - // limiting. - // "OTHER" - An unidentified error has occurred. - SuspensionReason string `json:"suspensionReason,omitempty"` - // TargetResource: Required. Immutable. The Google Workspace resource that's - // monitored for events, formatted as the full resource name - // (https://google.aip.dev/122#full-resource-names). To learn about target - // resources and the events that they support, see Supported Google Workspace - // events (https://developers.google.com/workspace/events#supported-events). A - // user can only authorize your app to create one subscription for a given - // target resource. If your app tries to create another subscription with the - // same user credentials, the request returns an `ALREADY_EXISTS` error. - TargetResource string `json:"targetResource,omitempty"` - // Ttl: Input only. The time-to-live (TTL) or duration for the subscription. If - // unspecified or set to `0`, uses the maximum possible duration. - Ttl string `json:"ttl,omitempty"` - // Uid: Output only. System-assigned unique identifier for the subscription. - Uid string `json:"uid,omitempty"` - // UpdateTime: Output only. The last time that the subscription is updated. - UpdateTime string `json:"updateTime,omitempty"` + // "ROLE_UNSPECIFIED" + // "ROLE_USER" - USER role refers to communication from the client to the + // server. + // "ROLE_AGENT" - AGENT role refers to communication from the server to the + // client. + Role string `json:"role,omitempty"` + // TaskId: The task id of the message. This is optional and if set, the message + // will be associated with the given task. + TaskId string `json:"taskId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Message) MarshalJSON() ([]byte, error) { + type NoMethod Message + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type MutualTlsSecurityScheme struct { + // Description: Description of this security scheme. + Description string `json:"description,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MutualTlsSecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod MutualTlsSecurityScheme + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// NotificationEndpoint: The endpoint where the subscription delivers events. +type NotificationEndpoint struct { + // PubsubTopic: Immutable. The Pub/Sub topic that receives events for the + // subscription. Format: `projects/{project}/topics/{topic}` You must create + // the topic in the same Google Cloud project where you create this + // subscription. Note: The Google Workspace Events API uses ordering keys + // (https://cloud.google.com/pubsub/docs/ordering) for the benefit of + // sequential events. If the Cloud Pub/Sub topic has a message storage policy + // (https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions) + // configured to exclude the nearest Google Cloud region, publishing events + // with ordering keys will fail. When the topic receives events, the events are + // encoded as Pub/Sub messages. For details, see the Google Cloud Pub/Sub + // Protocol Binding for CloudEvents + // (https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). + PubsubTopic string `json:"pubsubTopic,omitempty"` + // ForceSendFields is a list of field names (e.g. "PubsubTopic") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PubsubTopic") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NotificationEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type OAuth2SecurityScheme struct { + // Description: Description of this security scheme. + Description string `json:"description,omitempty"` + // Flows: An object containing configuration information for the flow types + // supported + Flows *OAuthFlows `json:"flows,omitempty"` + // Oauth2MetadataUrl: URL to the oauth2 authorization server metadata RFC8414 + // (https://datatracker.ietf.org/doc/html/rfc8414). TLS is required. + Oauth2MetadataUrl string `json:"oauth2MetadataUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OAuth2SecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod OAuth2SecurityScheme + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type OAuthFlows struct { + AuthorizationCode *AuthorizationCodeOAuthFlow `json:"authorizationCode,omitempty"` + ClientCredentials *ClientCredentialsOAuthFlow `json:"clientCredentials,omitempty"` + Implicit *ImplicitOAuthFlow `json:"implicit,omitempty"` + Password *PasswordOAuthFlow `json:"password,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthorizationCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizationCode") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OAuthFlows) MarshalJSON() ([]byte, error) { + type NoMethod OAuthFlows + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type OpenIdConnectSecurityScheme struct { + // Description: Description of this security scheme. + Description string `json:"description,omitempty"` + // OpenIdConnectUrl: Well-known URL to discover the + // [[OpenID-Connect-Discovery]] provider metadata. + OpenIdConnectUrl string `json:"openIdConnectUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OpenIdConnectSecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod OpenIdConnectSecurityScheme + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Part: Part represents a container for a section of communication content. +// Parts can be purely textual, some sort of file (image, video, etc) or a +// structured data blob (i.e. JSON). +type Part struct { + Data *DataPart `json:"data,omitempty"` + File *FilePart `json:"file,omitempty"` + // Metadata: Optional metadata associated with this part. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + Text string `json:"text,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Part) MarshalJSON() ([]byte, error) { + type NoMethod Part + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type PasswordOAuthFlow struct { + // RefreshUrl: The URL to be used for obtaining refresh tokens. This MUST be in + // the form of a URL. The OAuth2 standard requires the use of TLS. + RefreshUrl string `json:"refreshUrl,omitempty"` + // Scopes: The available scopes for the OAuth2 security scheme. A map between + // the scope name and a short description for it. The map MAY be empty. + Scopes map[string]string `json:"scopes,omitempty"` + // TokenUrl: The token URL to be used for this flow. This MUST be in the form + // of a URL. The OAuth2 standard requires the use of TLS. + TokenUrl string `json:"tokenUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. "RefreshUrl") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RefreshUrl") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PasswordOAuthFlow) MarshalJSON() ([]byte, error) { + type NoMethod PasswordOAuthFlow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PayloadOptions: Options about what data to include in the event payload. +// Only supported for Google Chat and Google Drive events. +type PayloadOptions struct { + // FieldMask: Optional. If `include_resource` is set to `true`, the list of + // fields to include in the event payload. Separate fields with a comma. For + // example, to include a Google Chat message's sender and create time, enter + // `message.sender,message.createTime`. If omitted, the payload includes all + // fields for the resource. If you specify a field that doesn't exist for the + // resource, the system ignores the field. + FieldMask string `json:"fieldMask,omitempty"` + // IncludeResource: Optional. Whether the event payload includes data about the + // resource that changed. For example, for an event where a Google Chat message + // was created, whether the payload contains data about the `Message` + // (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) + // resource. If false, the event payload only includes the name of the changed + // resource. + IncludeResource bool `json:"includeResource,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldMask") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FieldMask") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PayloadOptions) MarshalJSON() ([]byte, error) { + type NoMethod PayloadOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PushNotificationConfig: Configuration for setting up push notifications for +// task updates. +type PushNotificationConfig struct { + // Authentication: Information about the authentication to sent with the + // notification + Authentication *AuthenticationInfo `json:"authentication,omitempty"` + // Id: A unique identifier (e.g. UUID) for this push notification. + Id string `json:"id,omitempty"` + // Token: Token unique for this task/session + Token string `json:"token,omitempty"` + // Url: Url to send the notification too + Url string `json:"url,omitempty"` + // ForceSendFields is a list of field names (e.g. "Authentication") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Authentication") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PushNotificationConfig) MarshalJSON() ([]byte, error) { + type NoMethod PushNotificationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReactivateSubscriptionRequest: The request message for +// SubscriptionsService.ReactivateSubscription. +type ReactivateSubscriptionRequest struct { +} + +type Security struct { + Schemes map[string]StringList `json:"schemes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Schemes") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Schemes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Security) MarshalJSON() ([]byte, error) { + type NoMethod Security + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type SecurityScheme struct { + ApiKeySecurityScheme *APIKeySecurityScheme `json:"apiKeySecurityScheme,omitempty"` + HttpAuthSecurityScheme *HTTPAuthSecurityScheme `json:"httpAuthSecurityScheme,omitempty"` + MtlsSecurityScheme *MutualTlsSecurityScheme `json:"mtlsSecurityScheme,omitempty"` + Oauth2SecurityScheme *OAuth2SecurityScheme `json:"oauth2SecurityScheme,omitempty"` + OpenIdConnectSecurityScheme *OpenIdConnectSecurityScheme `json:"openIdConnectSecurityScheme,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeySecurityScheme") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiKeySecurityScheme") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SecurityScheme) MarshalJSON() ([]byte, error) { + type NoMethod SecurityScheme + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SendMessageConfiguration: Configuration of a send message request. +type SendMessageConfiguration struct { + // AcceptedOutputModes: The output modes that the agent is expected to respond + // with. + AcceptedOutputModes []string `json:"acceptedOutputModes,omitempty"` + // Blocking: If true, the message will be blocking until the task is completed. + // If false, the message will be non-blocking and the task will be returned + // immediately. It is the caller's responsibility to check for any task + // updates. + Blocking bool `json:"blocking,omitempty"` + // HistoryLength: The maximum number of messages to include in the history. if + // 0, the history will be unlimited. + HistoryLength int64 `json:"historyLength,omitempty"` + // PushNotification: A configuration of a webhook that can be used to receive + // updates + PushNotification *PushNotificationConfig `json:"pushNotification,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptedOutputModes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptedOutputModes") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SendMessageConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod SendMessageConfiguration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SendMessageRequest: /////////// Request Messages /////////// +type SendMessageRequest struct { + // Configuration: Configuration for the send request. + Configuration *SendMessageConfiguration `json:"configuration,omitempty"` + // Message: Required. The message to send to the agent. + Message *Message `json:"message,omitempty"` + // Metadata: Optional metadata for the request. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "Configuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Configuration") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SendMessageRequest) MarshalJSON() ([]byte, error) { + type NoMethod SendMessageRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by gRPC (https://github.com/grpc). Each `Status` message contains three +// pieces of data: error code, error message, and error details. You can find +// out more about this error model and how to work with it in the API Design +// Guide (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StreamResponse: The stream response for a message. The stream should be one +// of the following sequences: If the response is a message, the stream should +// contain one, and only one, message and then close If the response is a task +// lifecycle, the first response should be a Task object followed by zero or +// more TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should +// complete when the Task if in an interrupted or terminal state. A stream that +// ends before these conditions are met are +type StreamResponse struct { + ArtifactUpdate *TaskArtifactUpdateEvent `json:"artifactUpdate,omitempty"` + Message *Message `json:"message,omitempty"` + StatusUpdate *TaskStatusUpdateEvent `json:"statusUpdate,omitempty"` + Task *Task `json:"task,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ArtifactUpdate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ArtifactUpdate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StreamResponse) MarshalJSON() ([]byte, error) { + type NoMethod StreamResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// StringList: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED +type StringList struct { + List []string `json:"list,omitempty"` + // ForceSendFields is a list of field names (e.g. "List") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "List") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s StringList) MarshalJSON() ([]byte, error) { + type NoMethod StringList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Subscription: A subscription to receive events about a Google Workspace +// resource. To learn more about subscriptions, see the Google Workspace Events +// API overview (https://developers.google.com/workspace/events). +type Subscription struct { + // Authority: Output only. The user who authorized the creation of the + // subscription. When a user authorizes the subscription, this field and the + // `user_authority` field have the same value and the format is: Format: + // `users/{user}` For Google Workspace users, the `{user}` value is the + // `user.id` + // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) + // field from the Directory API. When a Chat app authorizes the subscription, + // only `service_account_authority` field populates and this field is empty. + Authority string `json:"authority,omitempty"` + // CreateTime: Output only. The time when the subscription is created. + CreateTime string `json:"createTime,omitempty"` + // Etag: Optional. This checksum is computed by the server based on the value + // of other fields, and might be sent on update requests to ensure the client + // has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // EventTypes: Required. Unordered list. Input for creating a subscription. + // Otherwise, output only. One or more types of events to receive about the + // target resource. Formatted according to the CloudEvents specification. The + // supported event types depend on the target resource of your subscription. + // For details, see Supported Google Workspace events + // (https://developers.google.com/workspace/events/guides#supported-events). By + // default, you also receive events about the lifecycle of your subscription + // (https://developers.google.com/workspace/events/guides/events-lifecycle). + // You don't need to specify lifecycle events for this field. If you specify an + // event type that doesn't exist for the target resource, the request returns + // an HTTP `400 Bad Request` status code. + EventTypes []string `json:"eventTypes,omitempty"` + // ExpireTime: Non-empty default. The timestamp in UTC when the subscription + // expires. Always displayed on output, regardless of what was used on input. + ExpireTime string `json:"expireTime,omitempty"` + // Name: Identifier. Resource name of the subscription. Format: + // `subscriptions/{subscription}` + Name string `json:"name,omitempty"` + // NotificationEndpoint: Required. Immutable. The endpoint where the + // subscription delivers events, such as a Pub/Sub topic. + NotificationEndpoint *NotificationEndpoint `json:"notificationEndpoint,omitempty"` + // PayloadOptions: Optional. Options about what data to include in the event + // payload. Only supported for Google Chat and Google Drive events. + PayloadOptions *PayloadOptions `json:"payloadOptions,omitempty"` + // Reconciling: Output only. If `true`, the subscription is in the process of + // being updated. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. The state of the subscription. Determines whether the + // subscription can receive events and deliver them to the notification + // endpoint. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - The subscription is active and can receive and deliver events + // to its notification endpoint. + // "SUSPENDED" - The subscription is unable to receive events due to an + // error. To identify the error, see the `suspension_reason` field. + // "DELETED" - The subscription is deleted. + State string `json:"state,omitempty"` + // SuspensionReason: Output only. The error that suspended the subscription. To + // reactivate the subscription, resolve the error and call the + // `ReactivateSubscription` method. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "USER_SCOPE_REVOKED" - The authorizing user has revoked the grant of one + // or more OAuth scopes. To learn more about authorization for Google + // Workspace, see [Configure the OAuth consent + // screen](https://developers.google.com/workspace/guides/configure-oauth-consen + // t#choose-scopes). + // "RESOURCE_DELETED" - The target resource for the subscription no longer + // exists. + // "USER_AUTHORIZATION_FAILURE" - The user that authorized the creation of + // the subscription no longer has access to the subscription's target resource. + // "ENDPOINT_PERMISSION_DENIED" - The Google Workspace application doesn't + // have access to deliver events to your subscription's notification endpoint. + // "ENDPOINT_NOT_FOUND" - The subscription's notification endpoint doesn't + // exist, or the endpoint can't be found in the Google Cloud project where you + // created the subscription. + // "ENDPOINT_RESOURCE_EXHAUSTED" - The subscription's notification endpoint + // failed to receive events due to insufficient quota or reaching rate + // limiting. + // "OTHER" - An unidentified error has occurred. + SuspensionReason string `json:"suspensionReason,omitempty"` + // TargetResource: Required. Immutable. The Google Workspace resource that's + // monitored for events, formatted as the full resource name + // (https://google.aip.dev/122#full-resource-names). To learn about target + // resources and the events that they support, see Supported Google Workspace + // events (https://developers.google.com/workspace/events#supported-events). A + // user can only authorize your app to create one subscription for a given + // target resource. If your app tries to create another subscription with the + // same user credentials, the request returns an `ALREADY_EXISTS` error. + TargetResource string `json:"targetResource,omitempty"` + // Ttl: Input only. The time-to-live (TTL) or duration for the subscription. If + // unspecified or set to `0`, uses the maximum possible duration. + Ttl string `json:"ttl,omitempty"` + // Uid: Output only. System-assigned unique identifier for the subscription. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The last time that the subscription is updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Authority") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Authority") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Subscription) MarshalJSON() ([]byte, error) { + type NoMethod Subscription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Task: Task is the core unit of action for A2A. It has a current status and +// when results are created for the task they are stored in the artifact. If +// there are multiple turns for a task, these are stored in history. +type Task struct { + // Artifacts: A set of output artifacts for a Task. + Artifacts []*Artifact `json:"artifacts,omitempty"` + // ContextId: Unique identifier (e.g. UUID) for the contextual collection of + // interactions (tasks and messages). Created by the A2A server. + ContextId string `json:"contextId,omitempty"` + // History: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of + // interactions from a task. + History []*Message `json:"history,omitempty"` + // Id: Unique identifier (e.g. UUID) for the task, generated by the server for + // a new task. + Id string `json:"id,omitempty"` + // Metadata: protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value + // object to store custom metadata about a task. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Status: The current status of a Task, including state and a message. + Status *TaskStatus `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. "Artifacts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Artifacts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Task) MarshalJSON() ([]byte, error) { + type NoMethod Task + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TaskArtifactUpdateEvent: TaskArtifactUpdateEvent represents a task delta +// where an artifact has been generated. +type TaskArtifactUpdateEvent struct { + // Append: Whether this should be appended to a prior one produced + Append bool `json:"append,omitempty"` + // Artifact: The artifact itself + Artifact *Artifact `json:"artifact,omitempty"` + // ContextId: The id of the context that this task belongs too + ContextId string `json:"contextId,omitempty"` + // LastChunk: Whether this represents the last part of an artifact + LastChunk bool `json:"lastChunk,omitempty"` + // Metadata: Optional metadata associated with the artifact update. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // TaskId: The id of the task for this artifact + TaskId string `json:"taskId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Append") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Append") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TaskArtifactUpdateEvent) MarshalJSON() ([]byte, error) { + type NoMethod TaskArtifactUpdateEvent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type TaskPushNotificationConfig struct { + // Name: The resource name of the config. Format: + // tasks/{task_id}/pushNotificationConfigs/{config_id} + Name string `json:"name,omitempty"` + // PushNotificationConfig: The push notification configuration details. + PushNotificationConfig *PushNotificationConfig `json:"pushNotificationConfig,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TaskPushNotificationConfig) MarshalJSON() ([]byte, error) { + type NoMethod TaskPushNotificationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TaskStatus: A container for the status of a task +type TaskStatus struct { + // Message: A message associated with the status. + Message *Message `json:"message,omitempty"` + // State: The current state of this task + // + // Possible values: + // "TASK_STATE_UNSPECIFIED" + // "TASK_STATE_SUBMITTED" - Represents the status that acknowledges a task is + // created + // "TASK_STATE_WORKING" - Represents the status that a task is actively being + // processed + // "TASK_STATE_COMPLETED" - Represents the status a task is finished. This is + // a terminal state + // "TASK_STATE_FAILED" - Represents the status a task is done but failed. + // This is a terminal state + // "TASK_STATE_CANCELLED" - Represents the status a task was cancelled before + // it finished. This is a terminal state. + // "TASK_STATE_INPUT_REQUIRED" - Represents the status that the task requires + // information to complete. This is an interrupted state. + // "TASK_STATE_REJECTED" - Represents the status that the agent has decided + // to not perform the task. This may be done during initial task creation or + // later once an agent has determined it can't or won't proceed. This is a + // terminal state. + // "TASK_STATE_AUTH_REQUIRED" - Represents the state that some authentication + // is needed from the upstream client. Authentication is expected to come + // out-of-band thus this is not an interrupted or terminal state. + State string `json:"state,omitempty"` + // Timestamp: Timestamp when the status was recorded. Example: + // "2023-10-27T10:00:00Z" + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "Message") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Message") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TaskStatus) MarshalJSON() ([]byte, error) { + type NoMethod TaskStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TaskStatusUpdateEvent: TaskStatusUpdateEvent is a delta even on a task +// indicating that a task has changed. +type TaskStatusUpdateEvent struct { + // ContextId: The id of the context that the task belongs to + ContextId string `json:"contextId,omitempty"` + // Final: Whether this is the last status update expected for this task. + Final bool `json:"final,omitempty"` + // Metadata: Optional metadata to associate with the task update. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Status: The new status of the task. + Status *TaskStatus `json:"status,omitempty"` + // TaskId: The id of the task that is changed + TaskId string `json:"taskId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContextId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContextId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TaskStatusUpdateEvent) MarshalJSON() ([]byte, error) { + type NoMethod TaskStatusUpdateEvent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type MessageStreamCall struct { + s *Service + sendmessagerequest *SendMessageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stream: SendStreamingMessage is a streaming call that will return a stream +// of task update events until the Task is in an interrupted or terminal state. +func (r *MessageService) Stream(sendmessagerequest *SendMessageRequest) *MessageStreamCall { + c := &MessageStreamCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sendmessagerequest = sendmessagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *MessageStreamCall) Fields(s ...googleapi.Field) *MessageStreamCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *MessageStreamCall) Context(ctx context.Context) *MessageStreamCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *MessageStreamCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MessageStreamCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sendmessagerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/message:stream") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.message.stream", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.message.stream" call. +// Any non-2xx status code is an error. Response headers are in either +// *StreamResponse.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *MessageStreamCall) Do(opts ...googleapi.CallOption) (*StreamResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &StreamResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.message.stream", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.operations.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.operations.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type SubscriptionsCreateCall struct { + s *Service + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Google Workspace subscription. To learn how to use this +// method, see Create a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/create-subscription). +// For a subscription on a Chat target resource +// (https://developers.google.com/workspace/events/guides/events-chat), you can +// create a subscription as: - A Chat app by specifying an authorization scope +// that begins with `chat.app` and getting one-time administrator approval +// (Developer Preview (https://developers.google.com/workspace/preview)). To +// learn more, see Authorize as a Chat app with administrator approval +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). +// - A user by specifying an authorization scope that doesn't include `app` in +// its name. To learn more, see Authorize as a Chat user +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). +func (r *SubscriptionsService) Create(subscription *Subscription) *SubscriptionsCreateCall { + c := &SubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.subscription = subscription + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, +// validates and previews the request, but doesn't create the subscription. +func (c *SubscriptionsCreateCall) ValidateOnly(validateOnly bool) *SubscriptionsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsCreateCall) Fields(s ...googleapi.Field) *SubscriptionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *SubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type SubscriptionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Google Workspace subscription. To learn how to use this +// method, see Delete a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/delete-subscription). +// +// - name: Resource name of the subscription to delete. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Delete(name string) *SubscriptionsDeleteCall { + c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the subscription isn't found, the request succeeds but doesn't delete +// the subscription. +func (c *SubscriptionsDeleteCall) AllowMissing(allowMissing bool) *SubscriptionsDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": Etag of the subscription. If +// present, it must match with the server's etag. Otherwise, request fails with +// the status `ABORTED`. +func (c *SubscriptionsDeleteCall) Etag(etag string) *SubscriptionsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, +// validates and previews the request, but doesn't delete the subscription. +func (c *SubscriptionsDeleteCall) ValidateOnly(validateOnly bool) *SubscriptionsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type SubscriptionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Google Workspace subscription. To learn how to use +// this method, see Get details about a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/get-subscription). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Get(name string) *SubscriptionsGetCall { + c := &SubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsGetCall) Fields(s ...googleapi.Field) *SubscriptionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *SubscriptionsGetCall) IfNoneMatch(entityTag string) *SubscriptionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Subscription.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Subscription{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type SubscriptionsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Google Workspace subscriptions. To learn how to use this method, +// see List Google Workspace subscriptions +// (https://developers.google.com/workspace/events/guides/list-subscriptions). +func (r *SubscriptionsService) List() *SubscriptionsListCall { + c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": Required. A query filter. You +// can filter subscriptions by event type (`event_types`) and target resource +// (`target_resource`). You must specify at least one event type in your query. +// To filter for multiple event types, use the `OR` operator. To filter by both +// event type and target resource, use the `AND` operator and specify the full +// resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, +// the following queries are valid: ``` +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" +// event_types:"google.workspace.chat.message.v1.created" AND +// target_resource="//chat.googleapis.com/spaces/{space}" ( +// event_types:"google.workspace.chat.membership.v1.updated" OR +// event_types:"google.workspace.chat.message.v1.created" ) AND +// target_resource="//chat.googleapis.com/spaces/{space}" ``` The server +// rejects invalid queries with an `INVALID_ARGUMENT` error. +func (c *SubscriptionsListCall) Filter(filter string) *SubscriptionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// subscriptions to return. The service might return fewer than this value. If +// unspecified or set to `0`, up to 50 subscriptions are returned. The maximum +// value is 100. If you specify a value more than 100, the system only returns +// 100 subscriptions. +func (c *SubscriptionsListCall) PageSize(pageSize int64) *SubscriptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous list subscriptions call. Provide this parameter to retrieve +// the subsequent page. When paginating, the filter value should match the call +// that provided the page token. Passing a different value might lead to +// unexpected results. +func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSubscriptionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSubscriptionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type SubscriptionsPatchCall struct { + s *Service + name string + subscription *Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates or renews a Google Workspace subscription. To learn how to +// use this method, see Update or renew a Google Workspace subscription +// (https://developers.google.com/workspace/events/guides/update-subscription). +// For a subscription on a Chat target resource +// (https://developers.google.com/workspace/events/guides/events-chat), you can +// update a subscription as: - A Chat app by specifying an authorization scope +// that begins with `chat.app` andgetting one-time administrator approval +// (Developer Preview (https://developers.google.com/workspace/preview)). To +// learn more, see Authorize as a Chat app with administrator approval +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). +// - A user by specifying an authorization scope that doesn't include `app` in +// its name. To learn more, see Authorize as a Chat user +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). +// +// - name: Identifier. Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Patch(name string, subscription *Subscription) *SubscriptionsPatchCall { + c := &SubscriptionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscription = subscription + return c +} + +// UpdateMask sets the optional parameter "updateMask": The field to update. If +// omitted, updates any fields included in the request. You can update one of +// the following fields in a subscription: * `expire_time`: The timestamp when +// the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the +// subscription. * `event_types`: The list of event types to receive about the +// target resource. When using the `*` wildcard (equivalent to `PUT`), omitted +// fields are set to empty values and rejected if they're invalid. +func (c *SubscriptionsPatchCall) UpdateMask(updateMask string) *SubscriptionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, +// validates and previews the request, but doesn't update the subscription. +func (c *SubscriptionsPatchCall) ValidateOnly(validateOnly bool) *SubscriptionsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsPatchCall) Fields(s ...googleapi.Field) *SubscriptionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsPatchCall) Context(ctx context.Context) *SubscriptionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type SubscriptionsReactivateCall struct { + s *Service + name string + reactivatesubscriptionrequest *ReactivateSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reactivate: Reactivates a suspended Google Workspace subscription. This +// method resets your subscription's `State` field to `ACTIVE`. Before you use +// this method, you must fix the error that suspended the subscription. This +// method will ignore or reject any subscription that isn't currently in a +// suspended state. To learn how to use this method, see Reactivate a Google +// Workspace subscription +// (https://developers.google.com/workspace/events/guides/reactivate-subscription). +// For a subscription on a Chat target resource +// (https://developers.google.com/workspace/events/guides/events-chat), you can +// reactivate a subscription as: - A Chat app by specifying an authorization +// scope that begins with `chat.app` andgetting one-time administrator approval +// (Developer Preview (https://developers.google.com/workspace/preview)). To +// learn more, see Authorize as a Chat app with administrator approval +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). +// - A user by specifying an authorization scope that doesn't include `app` in +// its name. To learn more, see Authorize as a Chat user +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). +// +// - name: Resource name of the subscription. Format: +// `subscriptions/{subscription}`. +func (r *SubscriptionsService) Reactivate(name string, reactivatesubscriptionrequest *ReactivateSubscriptionRequest) *SubscriptionsReactivateCall { + c := &SubscriptionsReactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.reactivatesubscriptionrequest = reactivatesubscriptionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *SubscriptionsReactivateCall) Fields(s ...googleapi.Field) *SubscriptionsReactivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SubscriptionsReactivateCall) Context(ctx context.Context) *SubscriptionsReactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *SubscriptionsReactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubscriptionsReactivateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reactivatesubscriptionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reactivate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.reactivate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.subscriptions.reactivate" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *SubscriptionsReactivateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.reactivate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type TasksCancelCall struct { + s *Service + name string + canceltaskrequest *CancelTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancel a task from the agent. If supported one should expect no more +// task updates for the task. +// +// - name: The resource name of the task to cancel. Format: tasks/{task_id}. +func (r *TasksService) Cancel(name string, canceltaskrequest *CancelTaskRequest) *TasksCancelCall { + c := &TasksCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceltaskrequest = canceltaskrequest + return c +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Authority") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *TasksCancelCall) Fields(s ...googleapi.Field) *TasksCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -func (s Subscription) MarshalJSON() ([]byte, error) { - type NoMethod Subscription - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. +func (c *TasksCancelCall) Context(ctx context.Context) *TasksCancelCall { + c.ctx_ = ctx + return c } -type OperationsGetCall struct { +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *TasksCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TasksCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceltaskrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workspaceevents.tasks.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *TasksCancelCall) Do(opts ...googleapi.CallOption) (*Task, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.cancel", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type TasksGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -573,21 +2833,26 @@ type OperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Get: Get the current state of a task from the agent. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the task. Format: tasks/{task_id}. +func (r *TasksService) Get(name string) *TasksGetCall { + c := &TasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// HistoryLength sets the optional parameter "historyLength": The number of +// most recent messages from the task's history to retrieve. +func (c *TasksGetCall) HistoryLength(historyLength int64) *TasksGetCall { + c.urlParams_.Set("historyLength", fmt.Sprint(historyLength)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -595,27 +2860,27 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *TasksGetCall) IfNoneMatch(entityTag string) *TasksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *TasksGetCall) Context(ctx context.Context) *TasksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *TasksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *TasksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -632,16 +2897,16 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.operations.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.operations.get" call. +// Do executes the "workspaceevents.tasks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Task.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -660,7 +2925,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Task{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -671,92 +2936,90 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.operations.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type SubscriptionsCreateCall struct { +type TasksSubscribeCall struct { s *Service - subscription *Subscription + name string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Create: Creates a Google Workspace subscription. To learn how to use this -// method, see Create a Google Workspace subscription -// (https://developers.google.com/workspace/events/guides/create-subscription). -// For a subscription on a Chat target resource -// (https://developers.google.com/workspace/events/guides/events-chat), you can -// create a subscription as: - A Chat app by specifying an authorization scope -// that begins with `chat.app` and getting one-time administrator approval -// (Developer Preview (https://developers.google.com/workspace/preview)). To -// learn more, see Authorize as a Chat app with administrator approval -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). -// - A user by specifying an authorization scope that doesn't include `app` in -// its name. To learn more, see Authorize as a Chat user -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). -func (r *SubscriptionsService) Create(subscription *Subscription) *SubscriptionsCreateCall { - c := &SubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.subscription = subscription - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, -// validates and previews the request, but doesn't create the subscription. -func (c *SubscriptionsCreateCall) ValidateOnly(validateOnly bool) *SubscriptionsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Subscribe: TaskSubscription is a streaming call that will return a stream of +// task update events. This attaches the stream to an existing in process task. +// If the task is complete the stream will return the completed task (like +// GetTask) and close the stream. +// +// - name: The resource name of the task to subscribe to. Format: +// tasks/{task_id}. +func (r *TasksService) Subscribe(name string) *TasksSubscribeCall { + c := &TasksSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *SubscriptionsCreateCall) Fields(s ...googleapi.Field) *SubscriptionsCreateCall { +func (c *TasksSubscribeCall) Fields(s ...googleapi.Field) *TasksSubscribeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *TasksSubscribeCall) IfNoneMatch(entityTag string) *TasksSubscribeCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall { +func (c *TasksSubscribeCall) Context(ctx context.Context) *TasksSubscribeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsCreateCall) Header() http.Header { +func (c *TasksSubscribeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) - if err != nil { - return nil, err +func (c *TasksSubscribeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.create", "request", internallog.HTTPRequest(req, body.Bytes())) + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.subscribe", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.create" call. +// Do executes the "workspaceevents.tasks.subscribe" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *StreamResponse.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *SubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *TasksSubscribeCall) Do(opts ...googleapi.CallOption) (*StreamResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -775,7 +3038,7 @@ func (c *SubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &StreamResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -786,100 +3049,88 @@ func (c *SubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.create", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.subscribe", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type SubscriptionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type TasksPushNotificationConfigsCreateCall struct { + s *Service + parent string + taskpushnotificationconfig *TaskPushNotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Google Workspace subscription. To learn how to use this -// method, see Delete a Google Workspace subscription -// (https://developers.google.com/workspace/events/guides/delete-subscription). +// Create: Set a push notification config for a task. // -// - name: Resource name of the subscription to delete. Format: -// `subscriptions/{subscription}`. -func (r *SubscriptionsService) Delete(name string) *SubscriptionsDeleteCall { - c := &SubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the subscription isn't found, the request succeeds but doesn't delete -// the subscription. -func (c *SubscriptionsDeleteCall) AllowMissing(allowMissing bool) *SubscriptionsDeleteCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// Etag sets the optional parameter "etag": Etag of the subscription. If -// present, it must match with the server's etag. Otherwise, request fails with -// the status `ABORTED`. -func (c *SubscriptionsDeleteCall) Etag(etag string) *SubscriptionsDeleteCall { - c.urlParams_.Set("etag", etag) +// - parent: The parent task resource for this config. Format: tasks/{task_id}. +func (r *TasksPushNotificationConfigsService) Create(parent string, taskpushnotificationconfig *TaskPushNotificationConfig) *TasksPushNotificationConfigsCreateCall { + c := &TasksPushNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.taskpushnotificationconfig = taskpushnotificationconfig return c } -// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, -// validates and previews the request, but doesn't delete the subscription. -func (c *SubscriptionsDeleteCall) ValidateOnly(validateOnly bool) *SubscriptionsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// ConfigId sets the optional parameter "configId": Required. The ID for the +// new config. +func (c *TasksPushNotificationConfigsCreateCall) ConfigId(configId string) *TasksPushNotificationConfigsCreateCall { + c.urlParams_.Set("configId", configId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *SubscriptionsDeleteCall) Fields(s ...googleapi.Field) *SubscriptionsDeleteCall { +func (c *TasksPushNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *TasksPushNotificationConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall { +func (c *TasksPushNotificationConfigsCreateCall) Context(ctx context.Context) *TasksPushNotificationConfigsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsDeleteCall) Header() http.Header { +func (c *TasksPushNotificationConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *TasksPushNotificationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.taskpushnotificationconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + 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, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.create", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.delete" call. +// Do executes the "workspaceevents.tasks.pushNotificationConfigs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TaskPushNotificationConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TasksPushNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*TaskPushNotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -898,7 +3149,7 @@ func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TaskPushNotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -909,27 +3160,24 @@ func (c *SubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.create", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type SubscriptionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type TasksPushNotificationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details about a Google Workspace subscription. To learn how to use -// this method, see Get details about a Google Workspace subscription -// (https://developers.google.com/workspace/events/guides/get-subscription). +// Delete: Delete a push notification config for a task. // -// - name: Resource name of the subscription. Format: -// `subscriptions/{subscription}`. -func (r *SubscriptionsService) Get(name string) *SubscriptionsGetCall { - c := &SubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the config to delete. Format: +// tasks/{task_id}/pushNotificationConfigs/{config_id}. +func (r *TasksPushNotificationConfigsService) Delete(name string) *TasksPushNotificationConfigsDeleteCall { + c := &TasksPushNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -937,44 +3185,33 @@ func (r *SubscriptionsService) Get(name string) *SubscriptionsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *SubscriptionsGetCall) Fields(s ...googleapi.Field) *SubscriptionsGetCall { +func (c *TasksPushNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *TasksPushNotificationConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *SubscriptionsGetCall) IfNoneMatch(entityTag string) *SubscriptionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall { +func (c *TasksPushNotificationConfigsDeleteCall) Context(ctx context.Context) *TasksPushNotificationConfigsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsGetCall) Header() http.Header { +func (c *TasksPushNotificationConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *TasksPushNotificationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } @@ -982,16 +3219,16 @@ func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.get" call. +// Do executes the "workspaceevents.tasks.pushNotificationConfigs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *Subscription.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { +func (c *TasksPushNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1010,7 +3247,7 @@ func (c *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Subscription{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1021,70 +3258,33 @@ func (c *SubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type SubscriptionsListCall struct { +type TasksPushNotificationConfigsGetCall struct { s *Service + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Google Workspace subscriptions. To learn how to use this method, -// see List Google Workspace subscriptions -// (https://developers.google.com/workspace/events/guides/list-subscriptions). -func (r *SubscriptionsService) List() *SubscriptionsListCall { - c := &SubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": Required. A query filter. You -// can filter subscriptions by event type (`event_types`) and target resource -// (`target_resource`). You must specify at least one event type in your query. -// To filter for multiple event types, use the `OR` operator. To filter by both -// event type and target resource, use the `AND` operator and specify the full -// resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, -// the following queries are valid: ``` -// event_types:"google.workspace.chat.membership.v1.updated" OR -// event_types:"google.workspace.chat.message.v1.created" -// event_types:"google.workspace.chat.message.v1.created" AND -// target_resource="//chat.googleapis.com/spaces/{space}" ( -// event_types:"google.workspace.chat.membership.v1.updated" OR -// event_types:"google.workspace.chat.message.v1.created" ) AND -// target_resource="//chat.googleapis.com/spaces/{space}" ``` The server -// rejects invalid queries with an `INVALID_ARGUMENT` error. -func (c *SubscriptionsListCall) Filter(filter string) *SubscriptionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// subscriptions to return. The service might return fewer than this value. If -// unspecified or set to `0`, up to 50 subscriptions are returned. The maximum -// value is 100. If you specify a value more than 100, the system only returns -// 100 subscriptions. -func (c *SubscriptionsListCall) PageSize(pageSize int64) *SubscriptionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous list subscriptions call. Provide this parameter to retrieve -// the subsequent page. When paginating, the filter value should match the call -// that provided the page token. Passing a different value might lead to -// unexpected results. -func (c *SubscriptionsListCall) PageToken(pageToken string) *SubscriptionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Get: Get a push notification config for a task. +// +// - name: The resource name of the config to retrieve. Format: +// tasks/{task_id}/pushNotificationConfigs/{config_id}. +func (r *TasksPushNotificationConfigsService) Get(name string) *TasksPushNotificationConfigsGetCall { + c := &TasksPushNotificationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListCall { +func (c *TasksPushNotificationConfigsGetCall) Fields(s ...googleapi.Field) *TasksPushNotificationConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1092,51 +3292,54 @@ func (c *SubscriptionsListCall) Fields(s ...googleapi.Field) *SubscriptionsListC // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *SubscriptionsListCall) IfNoneMatch(entityTag string) *SubscriptionsListCall { +func (c *TasksPushNotificationConfigsGetCall) IfNoneMatch(entityTag string) *TasksPushNotificationConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall { +func (c *TasksPushNotificationConfigsGetCall) Context(ctx context.Context) *TasksPushNotificationConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsListCall) Header() http.Header { +func (c *TasksPushNotificationConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *TasksPushNotificationConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/subscriptions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.list", "request", internallog.HTTPRequest(req, nil)) + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.list" call. +// Do executes the "workspaceevents.tasks.pushNotificationConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSubscriptionsResponse.ServerResponse.Header or (if a response was +// *TaskPushNotificationConfig.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, error) { +func (c *TasksPushNotificationConfigsGetCall) Do(opts ...googleapi.CallOption) (*TaskPushNotificationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1155,7 +3358,7 @@ func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscript if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSubscriptionsResponse{ + ret := &TaskPushNotificationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1166,133 +3369,105 @@ func (c *SubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscript if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type SubscriptionsPatchCall struct { +type TasksPushNotificationConfigsListCall struct { s *Service - name string - subscription *Subscription + parent string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Updates or renews a Google Workspace subscription. To learn how to -// use this method, see Update or renew a Google Workspace subscription -// (https://developers.google.com/workspace/events/guides/update-subscription). -// For a subscription on a Chat target resource -// (https://developers.google.com/workspace/events/guides/events-chat), you can -// update a subscription as: - A Chat app by specifying an authorization scope -// that begins with `chat.app` andgetting one-time administrator approval -// (Developer Preview (https://developers.google.com/workspace/preview)). To -// learn more, see Authorize as a Chat app with administrator approval -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). -// - A user by specifying an authorization scope that doesn't include `app` in -// its name. To learn more, see Authorize as a Chat user -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). +// List: Get a list of push notifications configured for a task. // -// - name: Identifier. Resource name of the subscription. Format: -// `subscriptions/{subscription}`. -func (r *SubscriptionsService) Patch(name string, subscription *Subscription) *SubscriptionsPatchCall { - c := &SubscriptionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.subscription = subscription +// - parent: The parent task resource. Format: tasks/{task_id}. +func (r *TasksPushNotificationConfigsService) List(parent string) *TasksPushNotificationConfigsListCall { + c := &TasksPushNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": The field to update. If -// omitted, updates any fields included in the request. You can update one of -// the following fields in a subscription: * `expire_time`: The timestamp when -// the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the -// subscription. * `event_types`: The list of event types to receive about the -// target resource. When using the `*` wildcard (equivalent to `PUT`), omitted -// fields are set to empty values and rejected if they're invalid. -func (c *SubscriptionsPatchCall) UpdateMask(updateMask string) *SubscriptionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": For AIP-158 these fields +// are present. Usually not used/needed. The maximum number of configurations +// to return. If unspecified, all configs will be returned. +func (c *TasksPushNotificationConfigsListCall) PageSize(pageSize int64) *TasksPushNotificationConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": If set to `true`, -// validates and previews the request, but doesn't update the subscription. -func (c *SubscriptionsPatchCall) ValidateOnly(validateOnly bool) *SubscriptionsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": A page token received +// from a previous ListTaskPushNotificationConfigRequest call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to `ListTaskPushNotificationConfigRequest` must match the call that provided +// the page token. +func (c *TasksPushNotificationConfigsListCall) PageToken(pageToken string) *TasksPushNotificationConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *SubscriptionsPatchCall) Fields(s ...googleapi.Field) *SubscriptionsPatchCall { +func (c *TasksPushNotificationConfigsListCall) Fields(s ...googleapi.Field) *TasksPushNotificationConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *TasksPushNotificationConfigsListCall) IfNoneMatch(entityTag string) *TasksPushNotificationConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsPatchCall) Context(ctx context.Context) *SubscriptionsPatchCall { +func (c *TasksPushNotificationConfigsListCall) Context(ctx context.Context) *TasksPushNotificationConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsPatchCall) Header() http.Header { +func (c *TasksPushNotificationConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) - if err != nil { - return nil, err +func (c *TasksPushNotificationConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pushNotificationConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.patch" call. +// Do executes the "workspaceevents.tasks.pushNotificationConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ListTaskPushNotificationConfigResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TasksPushNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListTaskPushNotificationConfigResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1311,7 +3486,7 @@ func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListTaskPushNotificationConfigResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1322,97 +3497,100 @@ func (c *SubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.tasks.pushNotificationConfigs.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type SubscriptionsReactivateCall struct { - s *Service - name string - reactivatesubscriptionrequest *ReactivateSubscriptionRequest - urlParams_ gensupport.URLParams - 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 *TasksPushNotificationConfigsListCall) Pages(ctx context.Context, f func(*ListTaskPushNotificationConfigResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Reactivate: Reactivates a suspended Google Workspace subscription. This -// method resets your subscription's `State` field to `ACTIVE`. Before you use -// this method, you must fix the error that suspended the subscription. This -// method will ignore or reject any subscription that isn't currently in a -// suspended state. To learn how to use this method, see Reactivate a Google -// Workspace subscription -// (https://developers.google.com/workspace/events/guides/reactivate-subscription). -// For a subscription on a Chat target resource -// (https://developers.google.com/workspace/events/guides/events-chat), you can -// reactivate a subscription as: - A Chat app by specifying an authorization -// scope that begins with `chat.app` andgetting one-time administrator approval -// (Developer Preview (https://developers.google.com/workspace/preview)). To -// learn more, see Authorize as a Chat app with administrator approval -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). -// - A user by specifying an authorization scope that doesn't include `app` in -// its name. To learn more, see Authorize as a Chat user -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). -// -// - name: Resource name of the subscription. Format: -// `subscriptions/{subscription}`. -func (r *SubscriptionsService) Reactivate(name string, reactivatesubscriptionrequest *ReactivateSubscriptionRequest) *SubscriptionsReactivateCall { - c := &SubscriptionsReactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.reactivatesubscriptionrequest = reactivatesubscriptionrequest +type V1GetCardCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCard: GetAgentCard returns the agent card for the agent. +func (r *V1Service) GetCard() *V1GetCardCall { + c := &V1GetCardCall{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 // details. -func (c *SubscriptionsReactivateCall) Fields(s ...googleapi.Field) *SubscriptionsReactivateCall { +func (c *V1GetCardCall) Fields(s ...googleapi.Field) *V1GetCardCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *V1GetCardCall) IfNoneMatch(entityTag string) *V1GetCardCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *SubscriptionsReactivateCall) Context(ctx context.Context) *SubscriptionsReactivateCall { +func (c *V1GetCardCall) Context(ctx context.Context) *V1GetCardCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *SubscriptionsReactivateCall) Header() http.Header { +func (c *V1GetCardCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SubscriptionsReactivateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reactivatesubscriptionrequest) - if err != nil { - return nil, err +func (c *V1GetCardCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reactivate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/card") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.reactivate", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "workspaceevents.getCard", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workspaceevents.subscriptions.reactivate" call. +// Do executes the "workspaceevents.getCard" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *AgentCard.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *SubscriptionsReactivateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *V1GetCardCall) Do(opts ...googleapi.CallOption) (*AgentCard, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1431,7 +3609,7 @@ func (c *SubscriptionsReactivateCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &AgentCard{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1442,6 +3620,6 @@ func (c *SubscriptionsReactivateCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.subscriptions.reactivate", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "workspaceevents.getCard", "response", internallog.HTTPResponse(res, b)) return ret, nil }