diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index 89f987efbec..0033dad4be0 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -2,6 +2,9 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/cloud-identity": { + "description": "Private Service: https://www.googleapis.com/auth/cloud-identity" + }, "https://www.googleapis.com/auth/cloud-identity.devices": { "description": "Private Service: https://www.googleapis.com/auth/cloud-identity.devices" }, @@ -147,6 +150,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -171,6 +175,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -201,6 +206,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -231,6 +237,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1Device" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -289,6 +296,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1ListDevicesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -318,6 +326,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -350,6 +359,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -378,6 +388,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -406,6 +417,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -436,6 +448,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -466,6 +479,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1DeviceUser" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -518,6 +532,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -598,6 +613,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -632,6 +648,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1ClientState" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -678,6 +695,7 @@ "$ref": "GoogleAppsCloudidentityDevicesV1ListClientStatesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -718,6 +736,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -760,6 +779,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -786,6 +806,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -812,6 +833,7 @@ "$ref": "Group" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -845,6 +867,7 @@ "$ref": "SecuritySettings" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -894,6 +917,7 @@ "$ref": "ListGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -922,6 +946,7 @@ "$ref": "LookupGroupNameResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -958,6 +983,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1006,6 +1032,7 @@ "$ref": "SearchGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1042,6 +1069,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1077,6 +1105,7 @@ "$ref": "CheckTransitiveMembershipResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1107,6 +1136,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1133,6 +1163,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1159,6 +1190,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1191,6 +1223,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1244,6 +1277,7 @@ "$ref": "ListMembershipsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1281,6 +1315,7 @@ "$ref": "LookupMembershipNameResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1311,6 +1346,7 @@ "$ref": "ModifyMembershipRolesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1353,6 +1389,7 @@ "$ref": "SearchTransitiveGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1391,6 +1428,7 @@ "$ref": "SearchTransitiveMembershipsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1401,7 +1439,7 @@ } } }, - "revision": "20220513", + "revision": "20220620", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "CheckTransitiveMembershipResponse": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 8a83cf6b517..32df9aff45c 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -84,6 +84,9 @@ const mtlsBasePath = "https://cloudidentity.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( + // Private Service: https://www.googleapis.com/auth/cloud-identity + CloudIdentityScope = "https://www.googleapis.com/auth/cloud-identity" + // Private Service: // https://www.googleapis.com/auth/cloud-identity.devices CloudIdentityDevicesScope = "https://www.googleapis.com/auth/cloud-identity.devices" @@ -111,6 +114,7 @@ const ( // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.lookup", "https://www.googleapis.com/auth/cloud-identity.devices.readonly", @@ -2788,6 +2792,7 @@ func (c *DevicesCancelWipeCall) Do(opts ...googleapi.CallOption) (*Operation, er // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -2933,6 +2938,7 @@ func (c *DevicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -3084,6 +3090,7 @@ func (c *DevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -3251,6 +3258,7 @@ func (c *DevicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsCloudident // "$ref": "GoogleAppsCloudidentityDevicesV1Device" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -3494,6 +3502,7 @@ func (c *DevicesListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsCloudiden // "$ref": "GoogleAppsCloudidentityDevicesV1ListDevicesResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -3662,6 +3671,7 @@ func (c *DevicesWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -3808,6 +3818,7 @@ func (c *DevicesDeviceUsersApproveCall) Do(opts ...googleapi.CallOption) (*Opera // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -3954,6 +3965,7 @@ func (c *DevicesDeviceUsersBlockCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -4102,6 +4114,7 @@ func (c *DevicesDeviceUsersCancelWipeCall) Do(opts ...googleapi.CallOption) (*Op // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -4255,6 +4268,7 @@ func (c *DevicesDeviceUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operat // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -4423,6 +4437,7 @@ func (c *DevicesDeviceUsersGetCall) Do(opts ...googleapi.CallOption) (*GoogleApp // "$ref": "GoogleAppsCloudidentityDevicesV1DeviceUser" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -4648,6 +4663,7 @@ func (c *DevicesDeviceUsersListCall) Do(opts ...googleapi.CallOption) (*GoogleAp // "$ref": "GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -5078,6 +5094,7 @@ func (c *DevicesDeviceUsersWipeCall) Do(opts ...googleapi.CallOption) (*Operatio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5257,6 +5274,7 @@ func (c *DevicesDeviceUsersClientStatesGetCall) Do(opts ...googleapi.CallOption) // "$ref": "GoogleAppsCloudidentityDevicesV1ClientState" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -5465,6 +5483,7 @@ func (c *DevicesDeviceUsersClientStatesListCall) Do(opts ...googleapi.CallOption // "$ref": "GoogleAppsCloudidentityDevicesV1ListClientStatesResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -5678,6 +5697,7 @@ func (c *DevicesDeviceUsersClientStatesPatchCall) Do(opts ...googleapi.CallOptio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5833,6 +5853,7 @@ func (c *GroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -5968,6 +5989,7 @@ func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -6117,6 +6139,7 @@ func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { // "$ref": "Group" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -6281,6 +6304,7 @@ func (c *GroupsGetSecuritySettingsCall) Do(opts ...googleapi.CallOption) (*Secur // "$ref": "SecuritySettings" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -6487,6 +6511,7 @@ func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, // "$ref": "ListGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -6674,6 +6699,7 @@ func (c *GroupsLookupCall) Do(opts ...googleapi.CallOption) (*LookupGroupNameRes // "$ref": "LookupGroupNameResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -6834,6 +6860,7 @@ func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7041,6 +7068,7 @@ func (c *GroupsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGroupsRespon // "$ref": "SearchGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -7221,6 +7249,7 @@ func (c *GroupsUpdateSecuritySettingsCall) Do(opts ...googleapi.CallOption) (*Op // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7397,6 +7426,7 @@ func (c *GroupsMembershipsCheckTransitiveMembershipCall) Do(opts ...googleapi.Ca // "$ref": "CheckTransitiveMembershipResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -7542,6 +7572,7 @@ func (c *GroupsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7678,6 +7709,7 @@ func (c *GroupsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7828,6 +7860,7 @@ func (c *GroupsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership // "$ref": "Membership" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8008,6 +8041,7 @@ func (c *GroupsMembershipsGetMembershipGraphCall) Do(opts ...googleapi.CallOptio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8216,6 +8250,7 @@ func (c *GroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembe // "$ref": "ListMembershipsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8420,6 +8455,7 @@ func (c *GroupsMembershipsLookupCall) Do(opts ...googleapi.CallOption) (*LookupM // "$ref": "LookupMembershipNameResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8568,6 +8604,7 @@ func (c *GroupsMembershipsModifyMembershipRolesCall) Do(opts ...googleapi.CallOp // "$ref": "ModifyMembershipRolesResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -8769,6 +8806,7 @@ func (c *GroupsMembershipsSearchTransitiveGroupsCall) Do(opts ...googleapi.CallO // "$ref": "SearchTransitiveGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8974,6 +9012,7 @@ func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Do(opts ...googleapi. // "$ref": "SearchTransitiveMembershipsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index 332091f290c..12f91652e4e 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -2,6 +2,9 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/cloud-identity": { + "description": "Private Service: https://www.googleapis.com/auth/cloud-identity" + }, "https://www.googleapis.com/auth/cloud-identity.devices": { "description": "Private Service: https://www.googleapis.com/auth/cloud-identity.devices" }, @@ -17,6 +20,12 @@ "https://www.googleapis.com/auth/cloud-identity.groups.readonly": { "description": "See any Cloud Identity Groups that you can access, including group members and their emails" }, + "https://www.googleapis.com/auth/cloud-identity.userinvitations": { + "description": "See, send, or cancel any Cloud Identity UserInvitations to join your organization to users" + }, + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly": { + "description": "See, send, or cancel any Cloud Identity UserInvitations to join your organization to users" + }, "https://www.googleapis.com/auth/cloud-platform": { "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } @@ -147,7 +156,11 @@ }, "response": { "$ref": "Operation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations" + ] }, "get": { "description": "Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", @@ -169,7 +182,12 @@ "path": "v1beta1/{+name}", "response": { "$ref": "UserInvitation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] }, "isInvitableUser": { "description": "Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it's the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers.", @@ -191,7 +209,12 @@ "path": "v1beta1/{+name}:isInvitableUser", "response": { "$ref": "IsInvitableUserResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] }, "list": { "description": "Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", @@ -234,7 +257,12 @@ "path": "v1beta1/{+parent}/userinvitations", "response": { "$ref": "ListUserInvitationsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + ] }, "send": { "description": "Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True.", @@ -259,7 +287,11 @@ }, "response": { "$ref": "Operation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", + "https://www.googleapis.com/auth/cloud-identity.userinvitations" + ] } } } @@ -292,6 +324,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -310,6 +343,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -335,6 +369,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -360,6 +395,7 @@ "$ref": "Device" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -413,6 +449,7 @@ "$ref": "ListDevicesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -442,6 +479,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -474,6 +512,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -502,6 +541,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -530,6 +570,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -555,6 +596,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] }, @@ -580,6 +622,7 @@ "$ref": "DeviceUser" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -627,6 +670,7 @@ "$ref": "ListDeviceUsersResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -707,6 +751,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -741,6 +786,7 @@ "$ref": "ClientState" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.readonly" ] @@ -781,6 +827,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices" ] } @@ -823,6 +870,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -849,6 +897,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -875,6 +924,7 @@ "$ref": "Group" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -908,6 +958,7 @@ "$ref": "SecuritySettings" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -957,6 +1008,7 @@ "$ref": "ListGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -985,6 +1037,7 @@ "$ref": "LookupGroupNameResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1021,6 +1074,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1067,6 +1121,7 @@ "$ref": "SearchGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1103,6 +1158,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1138,6 +1194,7 @@ "$ref": "CheckTransitiveMembershipResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1168,6 +1225,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1194,6 +1252,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1220,6 +1279,7 @@ "$ref": "Membership" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1252,6 +1312,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1303,6 +1364,7 @@ "$ref": "ListMembershipsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1340,6 +1402,7 @@ "$ref": "LookupMembershipNameResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1370,6 +1433,7 @@ "$ref": "ModifyMembershipRolesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-platform" ] @@ -1412,6 +1476,7 @@ "$ref": "SearchTransitiveGroupsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1450,6 +1515,7 @@ "$ref": "SearchTransitiveMembershipsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", "https://www.googleapis.com/auth/cloud-platform" @@ -1504,7 +1570,10 @@ "path": "v1beta1/{+parent}/memberships", "response": { "$ref": "ListOrgMembershipsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity" + ] }, "move": { "description": "Move an OrgMembership to a new OrgUnit. NOTE: This is an atomic copy-and-delete. The resource will have a new copy under the destination OrgUnit and be deleted from the source OrgUnit. The resource can only be searched under the destination OrgUnit afterwards.", @@ -1529,14 +1598,17 @@ }, "response": { "$ref": "Operation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity" + ] } } } } } }, - "revision": "20220518", + "revision": "20220620", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AndroidAttributes": { diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index e845c9a0ff3..654a316fb77 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -84,6 +84,9 @@ const mtlsBasePath = "https://cloudidentity.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( + // Private Service: https://www.googleapis.com/auth/cloud-identity + CloudIdentityScope = "https://www.googleapis.com/auth/cloud-identity" + // Private Service: // https://www.googleapis.com/auth/cloud-identity.devices CloudIdentityDevicesScope = "https://www.googleapis.com/auth/cloud-identity.devices" @@ -103,6 +106,14 @@ const ( // members and their emails CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly" + // See, send, or cancel any Cloud Identity UserInvitations to join your + // organization to users + CloudIdentityUserinvitationsScope = "https://www.googleapis.com/auth/cloud-identity.userinvitations" + + // See, send, or cancel any Cloud Identity UserInvitations to join your + // organization to users + CloudIdentityUserinvitationsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // See, edit, configure, and delete your Google Cloud data and see the // email address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" @@ -111,11 +122,14 @@ const ( // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-identity", "https://www.googleapis.com/auth/cloud-identity.devices", "https://www.googleapis.com/auth/cloud-identity.devices.lookup", "https://www.googleapis.com/auth/cloud-identity.devices.readonly", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-identity.userinvitations", + "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly", "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. @@ -3782,7 +3796,11 @@ func (c *CustomersUserinvitationsCancelCall) Do(opts ...googleapi.CallOption) (* // }, // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations" + // ] // } } @@ -3929,7 +3947,12 @@ func (c *CustomersUserinvitationsGetCall) Do(opts ...googleapi.CallOption) (*Use // "path": "v1beta1/{+name}", // "response": { // "$ref": "UserInvitation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] // } } @@ -4080,7 +4103,12 @@ func (c *CustomersUserinvitationsIsInvitableUserCall) Do(opts ...googleapi.CallO // "path": "v1beta1/{+name}:isInvitableUser", // "response": { // "$ref": "IsInvitableUserResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] // } } @@ -4287,7 +4315,12 @@ func (c *CustomersUserinvitationsListCall) Do(opts ...googleapi.CallOption) (*Li // "path": "v1beta1/{+parent}/userinvitations", // "response": { // "$ref": "ListUserInvitationsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations.readonly" + // ] // } } @@ -4454,7 +4487,11 @@ func (c *CustomersUserinvitationsSendCall) Do(opts ...googleapi.CallOption) (*Op // }, // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", + // "https://www.googleapis.com/auth/cloud-identity.userinvitations" + // ] // } } @@ -4600,6 +4637,7 @@ func (c *DevicesCancelWipeCall) Do(opts ...googleapi.CallOption) (*Operation, er // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -4728,6 +4766,7 @@ func (c *DevicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -4863,6 +4902,7 @@ func (c *DevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5012,6 +5052,7 @@ func (c *DevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) { // "$ref": "Device" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -5235,6 +5276,7 @@ func (c *DevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse // "$ref": "ListDevicesResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -5403,6 +5445,7 @@ func (c *DevicesWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5549,6 +5592,7 @@ func (c *DevicesDeviceUsersApproveCall) Do(opts ...googleapi.CallOption) (*Opera // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5695,6 +5739,7 @@ func (c *DevicesDeviceUsersBlockCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5843,6 +5888,7 @@ func (c *DevicesDeviceUsersCancelWipeCall) Do(opts ...googleapi.CallOption) (*Op // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -5980,6 +6026,7 @@ func (c *DevicesDeviceUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operat // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -6130,6 +6177,7 @@ func (c *DevicesDeviceUsersGetCall) Do(opts ...googleapi.CallOption) (*DeviceUse // "$ref": "DeviceUser" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -6336,6 +6384,7 @@ func (c *DevicesDeviceUsersListCall) Do(opts ...googleapi.CallOption) (*ListDevi // "$ref": "ListDeviceUsersResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -6757,6 +6806,7 @@ func (c *DevicesDeviceUsersWipeCall) Do(opts ...googleapi.CallOption) (*Operatio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -6935,6 +6985,7 @@ func (c *DevicesDeviceUsersClientStatesGetCall) Do(opts ...googleapi.CallOption) // "$ref": "ClientState" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices", // "https://www.googleapis.com/auth/cloud-identity.devices.readonly" // ] @@ -7116,6 +7167,7 @@ func (c *DevicesDeviceUsersClientStatesPatchCall) Do(opts ...googleapi.CallOptio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.devices" // ] // } @@ -7271,6 +7323,7 @@ func (c *GroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7406,6 +7459,7 @@ func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -7555,6 +7609,7 @@ func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { // "$ref": "Group" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -7719,6 +7774,7 @@ func (c *GroupsGetSecuritySettingsCall) Do(opts ...googleapi.CallOption) (*Secur // "$ref": "SecuritySettings" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -7926,6 +7982,7 @@ func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, // "$ref": "ListGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8113,6 +8170,7 @@ func (c *GroupsLookupCall) Do(opts ...googleapi.CallOption) (*LookupGroupNameRes // "$ref": "LookupGroupNameResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8274,6 +8332,7 @@ func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -8478,6 +8537,7 @@ func (c *GroupsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGroupsRespon // "$ref": "SearchGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8658,6 +8718,7 @@ func (c *GroupsUpdateSecuritySettingsCall) Do(opts ...googleapi.CallOption) (*Op // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -8833,6 +8894,7 @@ func (c *GroupsMembershipsCheckTransitiveMembershipCall) Do(opts ...googleapi.Ca // "$ref": "CheckTransitiveMembershipResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -8978,6 +9040,7 @@ func (c *GroupsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -9114,6 +9177,7 @@ func (c *GroupsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -9264,6 +9328,7 @@ func (c *GroupsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership // "$ref": "Membership" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -9442,6 +9507,7 @@ func (c *GroupsMembershipsGetMembershipGraphCall) Do(opts ...googleapi.CallOptio // "$ref": "Operation" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -9647,6 +9713,7 @@ func (c *GroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembe // "$ref": "ListMembershipsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -9851,6 +9918,7 @@ func (c *GroupsMembershipsLookupCall) Do(opts ...googleapi.CallOption) (*LookupM // "$ref": "LookupMembershipNameResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -9999,6 +10067,7 @@ func (c *GroupsMembershipsModifyMembershipRolesCall) Do(opts ...googleapi.CallOp // "$ref": "ModifyMembershipRolesResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-platform" // ] @@ -10198,6 +10267,7 @@ func (c *GroupsMembershipsSearchTransitiveGroupsCall) Do(opts ...googleapi.CallO // "$ref": "SearchTransitiveGroupsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -10401,6 +10471,7 @@ func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Do(opts ...googleapi. // "$ref": "SearchTransitiveMembershipsResponse" // }, // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity", // "https://www.googleapis.com/auth/cloud-identity.groups", // "https://www.googleapis.com/auth/cloud-identity.groups.readonly", // "https://www.googleapis.com/auth/cloud-platform" @@ -10637,7 +10708,10 @@ func (c *OrgUnitsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListOrg // "path": "v1beta1/{+parent}/memberships", // "response": { // "$ref": "ListOrgMembershipsResponse" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity" + // ] // } } @@ -10814,7 +10888,10 @@ func (c *OrgUnitsMembershipsMoveCall) Do(opts ...googleapi.CallOption) (*Operati // }, // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-identity" + // ] // } } diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 87bbbd39e9a..d61e1f59b13 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -1582,7 +1582,7 @@ } } }, - "revision": "20220513", + "revision": "20220617", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -2548,7 +2548,12 @@ "type": "string" }, "rsaAesWrappedKey": { - "description": "Wrapped key material produced with RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256. This field contains the concatenation of two wrapped keys: 1. An ephemeral AES-256 wrapping key wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label. 2. The key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649). If importing symmetric key material, it is expected that the unwrapped key contains plain bytes. If importing asymmetric key material, it is expected that the unwrapped key is in PKCS#8-encoded DER format (the PrivateKeyInfo structure from RFC 5208). This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.", + "description": "Optional. Wrapped key material produced with RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256. This field contains the concatenation of two wrapped keys: 1. An ephemeral AES-256 wrapping key wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label. 2. The key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649). If importing symmetric key material, it is expected that the unwrapped key contains plain bytes. If importing asymmetric key material, it is expected that the unwrapped key is in PKCS#8-encoded DER format (the PrivateKeyInfo structure from RFC 5208). This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.", + "format": "byte", + "type": "string" + }, + "wrappedKey": { + "description": "Optional. Wrapped key material produced with (RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256) for which, this field contains the concatenation of: 1. An ephemeral AES-256 wrapping key wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label. 2. The key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649), or (RSA_OAEP_3072_SHA256 or RSA_OAEP_4096_SHA256) for which, this field contains the key to be imported, wrapped with the public_key using RSAES-OAEP with SHA-256, MGF1 with SHA-256, and an empty label. If importing symmetric key material, it is expected that the unwrapped key contains plain bytes. If importing asymmetric key material, it is expected that the unwrapped key is in PKCS#8-encoded DER format (the PrivateKeyInfo structure from RFC 5208). This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.", "format": "byte", "type": "string" } @@ -2593,12 +2598,20 @@ "enum": [ "IMPORT_METHOD_UNSPECIFIED", "RSA_OAEP_3072_SHA1_AES_256", - "RSA_OAEP_4096_SHA1_AES_256" + "RSA_OAEP_4096_SHA1_AES_256", + "RSA_OAEP_3072_SHA256_AES_256", + "RSA_OAEP_4096_SHA256_AES_256", + "RSA_OAEP_3072_SHA256", + "RSA_OAEP_4096_SHA256" ], "enumDescriptions": [ "Not specified.", "This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, see [RSA AES key wrap mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).", - "This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, see [RSA AES key wrap mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908)." + "This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, see [RSA AES key wrap mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).", + "This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, see [RSA AES key wrap mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).", + "This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, see [RSA AES key wrap mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).", + "This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import.", + "This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import." ], "type": "string" }, diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index 2b478443380..769d0fbe149 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -1807,9 +1807,10 @@ type ImportCryptoKeyVersionRequest struct { // this key material. ImportJob string `json:"importJob,omitempty"` - // RsaAesWrappedKey: Wrapped key material produced with - // RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256. This field - // contains the concatenation of two wrapped keys: 1. An ephemeral + // RsaAesWrappedKey: Optional. Wrapped key material produced with + // RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or + // RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256. This + // field contains the concatenation of two wrapped keys: 1. An ephemeral // AES-256 wrapping key wrapped with the public_key using RSAES-OAEP // with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label. 2. // The key to be imported, wrapped with the ephemeral AES-256 key using @@ -1821,6 +1822,24 @@ type ImportCryptoKeyVersionRequest struct { // mechanism CKM_RSA_AES_KEY_WRAP. RsaAesWrappedKey string `json:"rsaAesWrappedKey,omitempty"` + // WrappedKey: Optional. Wrapped key material produced with + // (RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or + // RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256) for + // which, this field contains the concatenation of: 1. An ephemeral + // AES-256 wrapping key wrapped with the public_key using RSAES-OAEP + // with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label. 2. + // The key to be imported, wrapped with the ephemeral AES-256 key using + // AES-KWP (RFC 5649), or (RSA_OAEP_3072_SHA256 or RSA_OAEP_4096_SHA256) + // for which, this field contains the key to be imported, wrapped with + // the public_key using RSAES-OAEP with SHA-256, MGF1 with SHA-256, and + // an empty label. If importing symmetric key material, it is expected + // that the unwrapped key contains plain bytes. If importing asymmetric + // key material, it is expected that the unwrapped key is in + // PKCS#8-encoded DER format (the PrivateKeyInfo structure from RFC + // 5208). This format is the same as the format produced by PKCS#11 + // mechanism CKM_RSA_AES_KEY_WRAP. + WrappedKey string `json:"wrappedKey,omitempty"` + // ForceSendFields is a list of field names (e.g. "Algorithm") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1907,6 +1926,28 @@ type ImportJob struct { // RSA key. For more details, see [RSA AES key wrap // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/p // kcs11-curr-v2.40-cos01.html#_Toc408226908). + // "RSA_OAEP_3072_SHA256_AES_256" - This ImportMethod represents the + // CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 + // standard. In summary, this involves wrapping the raw key with an + // ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit + // RSA key. For more details, see [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/p + // kcs11-curr-v2.40-cos01.html#_Toc408226908). + // "RSA_OAEP_4096_SHA256_AES_256" - This ImportMethod represents the + // CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 + // standard. In summary, this involves wrapping the raw key with an + // ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit + // RSA key. For more details, see [RSA AES key wrap + // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/p + // kcs11-curr-v2.40-cos01.html#_Toc408226908). + // "RSA_OAEP_3072_SHA256" - This ImportMethod represents RSAES-OAEP + // with a 3072 bit RSA key. The key material to be imported is wrapped + // directly with the RSA key. Due to technical limitations of RSA + // wrapping, this method cannot be used to wrap RSA keys for import. + // "RSA_OAEP_4096_SHA256" - This ImportMethod represents RSAES-OAEP + // with a 4096 bit RSA key. The key material to be imported is wrapped + // directly with the RSA key. Due to technical limitations of RSA + // wrapping, this method cannot be used to wrap RSA keys for import. ImportMethod string `json:"importMethod,omitempty"` // Name: Output only. The resource name for this ImportJob in the format diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 4f7c8d3b44d..1188e087491 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -550,6 +550,56 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "move": { + "description": "Moves the specified address resource.", + "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", + "httpMethod": "POST", + "id": "compute.addresses.move", + "parameterOrder": [ + "project", + "region", + "address" + ], + "parameters": { + "address": { + "description": "Name of the address resource to move.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Source project ID which the Address is moved from.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/addresses/{address}/move", + "request": { + "$ref": "RegionAddressesMoveRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", @@ -5358,6 +5408,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "move": { + "description": "Moves the specified address resource from one project to another project.", + "flatPath": "projects/{project}/global/addresses/{address}/move", + "httpMethod": "POST", + "id": "compute.globalAddresses.move", + "parameterOrder": [ + "project", + "address" + ], + "parameters": { + "address": { + "description": "Name of the address resource to move.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Source project ID which the Address is moved from.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/addresses/{address}/move", + "request": { + "$ref": "GlobalAddressesMoveRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setLabels": { "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", @@ -8812,7 +8904,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", @@ -24287,7 +24379,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", @@ -25423,6 +25515,205 @@ } } }, + "regionInstanceTemplates": { + "methods": { + "delete": { + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone.", + "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + "httpMethod": "DELETE", + "id": "compute.regionInstanceTemplates.delete", + "parameterOrder": [ + "project", + "region", + "instanceTemplate" + ], + "parameters": { + "instanceTemplate": { + "description": "The name of the instance template to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "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" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + "httpMethod": "GET", + "id": "compute.regionInstanceTemplates.get", + "parameterOrder": [ + "project", + "region", + "instanceTemplate" + ], + "parameters": { + "instanceTemplate": { + "description": "The name of the instance template.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "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" + } + }, + "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + "response": { + "$ref": "InstanceTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates an instance template in the specified project and region using the global instance template whose URL is included in the request.", + "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + "httpMethod": "POST", + "id": "compute.regionInstanceTemplates.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "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" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceTemplates", + "request": { + "$ref": "InstanceTemplate" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of instance templates that are contained within the specified project and region.", + "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + "httpMethod": "GET", + "id": "compute.regionInstanceTemplates.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the regions 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 of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/instanceTemplates", + "response": { + "$ref": "InstanceTemplateList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionInstances": { "methods": { "bulkInsert": { @@ -38930,7 +39221,7 @@ } } }, - "revision": "20220607", + "revision": "20220614", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -45189,6 +45480,28 @@ }, "type": "object" }, + "ErrorInfo": { + "description": "Describes the cause of the error with structured details. Example of an error when contacting the \"pubsub.googleapis.com\" API when it is not enabled: { \"reason\": \"API_DISABLED\" \"domain\": \"googleapis.com\" \"metadata\": { \"resource\": \"projects/123\", \"service\": \"pubsub.googleapis.com\" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { \"reason\": \"STOCKOUT\" \"domain\": \"spanner.googleapis.com\", \"metadata\": { \"availableRegions\": \"us-central1,us-east2\" } }", + "id": "ErrorInfo", + "properties": { + "domain": { + "description": "The logical grouping to which the \"reason\" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: \"pubsub.googleapis.com\". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is \"googleapis.com\".", + "type": "string" + }, + "metadatas": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {\"instanceLimit\": \"100/request\"}, should be returned as, {\"instanceLimitPerRequest\": \"100\"}, if the client exceeds the number of instances that can be created in a single (batch) request.", + "type": "object" + }, + "reason": { + "description": "The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match /[A-Z0-9_]+/.", + "type": "string" + } + }, + "type": "object" + }, "ExchangedPeeringRoute": { "id": "ExchangedPeeringRoute", "properties": { @@ -46203,6 +46516,10 @@ "format": "int32", "type": "integer" }, + "securityProfileGroup": { + "description": "A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_profile_group' and cannot be specified for other actions.", + "type": "string" + }, "targetResources": { "description": "A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.", "items": { @@ -46447,7 +46764,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule.", + "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6.", "enum": [ "IPV4", "IPV6", @@ -46559,6 +46876,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -46566,6 +46884,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer and will not serve traffic going forward.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The connection has been rejected by the producer.", "" @@ -47537,6 +47856,20 @@ }, "type": "object" }, + "GlobalAddressesMoveRequest": { + "id": "GlobalAddressesMoveRequest", + "properties": { + "description": { + "description": "An optional destination address description if intended to be different from the source.", + "type": "string" + }, + "destinationAddress": { + "description": "The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a address: - https://www.googleapis.com/compute/v1/projects/project /global/addresses/address - projects/project/global/addresses/address Note that destination project must be different from the source project. So /global/addresses/address is not valid partial url.", + "type": "string" + } + }, + "type": "object" + }, "GlobalNetworkEndpointGroupsAttachEndpointsRequest": { "id": "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "properties": { @@ -48966,6 +49299,35 @@ }, "type": "object" }, + "Help": { + "description": "Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.", + "id": "Help", + "properties": { + "links": { + "description": "URL(s) pointing to additional information on handling the current error.", + "items": { + "$ref": "HelpLink" + }, + "type": "array" + } + }, + "type": "object" + }, + "HelpLink": { + "description": "Describes a URL link.", + "id": "HelpLink", + "properties": { + "description": { + "description": "Describes what the link offers.", + "type": "string" + }, + "url": { + "description": "The URL of the link.", + "type": "string" + } + }, + "type": "object" + }, "HostRule": { "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", "id": "HostRule", @@ -53301,6 +53663,10 @@ "$ref": "InstanceProperties", "description": "The instance properties for this instance template." }, + "region": { + "description": "[Output Only] URL of the region where the instance template resides. Only applicable for regional resources.", + "type": "string" + }, "selfLink": { "description": "[Output Only] The URL for this instance template. The server defines this URL.", "type": "string" @@ -56583,6 +56949,21 @@ }, "type": "object" }, + "LocalizedMessage": { + "description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.", + "id": "LocalizedMessage", + "properties": { + "locale": { + "description": "The locale used following the specification defined at http://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: \"en-US\", \"fr-CH\", \"es-MX\"", + "type": "string" + }, + "message": { + "description": "The localized error message in the above locale.", + "type": "string" + } + }, + "type": "object" + }, "LocationPolicy": { "description": "Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).", "id": "LocationPolicy", @@ -57616,6 +57997,27 @@ "description": "[Output Only] The error type identifier for this error.", "type": "string" }, + "errorDetails": { + "description": "[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.", + "items": { + "properties": { + "errorInfo": { + "$ref": "ErrorInfo" + }, + "help": { + "$ref": "Help" + }, + "localizedMessage": { + "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" + } + }, + "type": "object" + }, + "type": "array" + }, "location": { "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", "type": "string" @@ -61549,6 +61951,27 @@ "description": "[Output Only] The error type identifier for this error.", "type": "string" }, + "errorDetails": { + "description": "[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.", + "items": { + "properties": { + "errorInfo": { + "$ref": "ErrorInfo" + }, + "help": { + "$ref": "Help" + }, + "localizedMessage": { + "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" + } + }, + "type": "object" + }, + "type": "array" + }, "location": { "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", "type": "string" @@ -64452,6 +64875,33 @@ }, "type": "object" }, + "QuotaExceededInfo": { + "description": "Additional details for quota exceeded error for resource quota.", + "id": "QuotaExceededInfo", + "properties": { + "dimensions": { + "additionalProperties": { + "type": "string" + }, + "description": "The map holding related quota dimensions.", + "type": "object" + }, + "limit": { + "description": "Current effective quota limit. The limit's unit depends on the quota type or metric.", + "format": "double", + "type": "number" + }, + "limitName": { + "description": "The name of the quota limit.", + "type": "string" + }, + "metricName": { + "description": "The Compute Engine quota metric name.", + "type": "string" + } + }, + "type": "object" + }, "RbacPolicy": { "id": "RbacPolicy", "properties": { @@ -64571,6 +65021,20 @@ }, "type": "object" }, + "RegionAddressesMoveRequest": { + "id": "RegionAddressesMoveRequest", + "properties": { + "description": { + "description": "An optional destination address description if intended to be different from the source.", + "type": "string" + }, + "destinationAddress": { + "description": "The URL of the destination address to move to. This can be a full or partial URL. For example, the following are all valid URLs to a address: - https://www.googleapis.com/compute/v1/projects/project/regions/region /addresses/address - projects/project/regions/region/addresses/address Note that destination project must be different from the source project. So /regions/region/addresses/address is not valid partial url.", + "type": "string" + } + }, + "type": "object" + }, "RegionAutoscalerList": { "description": "Contains a list of autoscalers.", "id": "RegionAutoscalerList", @@ -70424,6 +70888,10 @@ "description": "Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are \"deny(status)\", where valid values for status are 403, 404, 429, and 502, and \"redirect\" where the redirect parameters come from exceedRedirectOptions below.", "type": "string" }, + "exceedActionRpcStatus": { + "$ref": "SecurityPolicyRuleRateLimitOptionsRpcStatus", + "description": "Specified gRPC response status for proxyless gRPC requests that are above the configured rate limit threshold" + }, "exceedRedirectOptions": { "$ref": "SecurityPolicyRuleRedirectOptions", "description": "Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect." @@ -70435,6 +70903,22 @@ }, "type": "object" }, + "SecurityPolicyRuleRateLimitOptionsRpcStatus": { + "description": "Simplified google.rpc.Status type (omitting details).", + "id": "SecurityPolicyRuleRateLimitOptionsRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English.", + "type": "string" + } + }, + "type": "object" + }, "SecurityPolicyRuleRateLimitOptionsThreshold": { "id": "SecurityPolicyRuleRateLimitOptionsThreshold", "properties": { @@ -70863,6 +71347,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -70870,6 +71355,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The consumer is still connected but not using the connection.", "" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 7673c824225..9f2bc997cfa 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -201,6 +201,7 @@ func New(client *http.Client) (*Service, error) { s.RegionHealthChecks = NewRegionHealthChecksService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) + s.RegionInstanceTemplates = NewRegionInstanceTemplatesService(s) s.RegionInstances = NewRegionInstancesService(s) s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) @@ -361,6 +362,8 @@ type Service struct { RegionInstanceGroups *RegionInstanceGroupsService + RegionInstanceTemplates *RegionInstanceTemplatesService + RegionInstances *RegionInstancesService RegionInstantSnapshots *RegionInstantSnapshotsService @@ -958,6 +961,15 @@ type RegionInstanceGroupsService struct { s *Service } +func NewRegionInstanceTemplatesService(s *Service) *RegionInstanceTemplatesService { + rs := &RegionInstanceTemplatesService{s: s} + return rs +} + +type RegionInstanceTemplatesService struct { + s *Service +} + func NewRegionInstancesService(s *Service) *RegionInstancesService { rs := &RegionInstancesService{s: s} return rs @@ -11297,6 +11309,64 @@ func (s *Duration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ErrorInfo: Describes the cause of the error with structured details. +// Example of an error when contacting the "pubsub.googleapis.com" API +// when it is not enabled: { "reason": "API_DISABLED" "domain": +// "googleapis.com" "metadata": { "resource": "projects/123", "service": +// "pubsub.googleapis.com" } } This response indicates that the +// pubsub.googleapis.com API is not enabled. Example of an error that is +// returned when attempting to create a Spanner instance in a region +// that is out of stock: { "reason": "STOCKOUT" "domain": +// "spanner.googleapis.com", "metadata": { "availableRegions": +// "us-central1,us-east2" } } +type ErrorInfo struct { + // Domain: The logical grouping to which the "reason" belongs. The error + // domain is typically the registered service name of the tool or + // product that generates the error. Example: "pubsub.googleapis.com". + // If the error is generated by some common infrastructure, the error + // domain must be a globally unique value that identifies the + // infrastructure. For Google API infrastructure, the error domain is + // "googleapis.com". + Domain string `json:"domain,omitempty"` + + // Metadatas: Additional structured details about this error. Keys + // should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + // length. When identifying the current value of an exceeded limit, the + // units should be contained in the key, not the value. For example, + // rather than {"instanceLimit": "100/request"}, should be returned as, + // {"instanceLimitPerRequest": "100"}, if the client exceeds the number + // of instances that can be created in a single (batch) request. + Metadatas map[string]string `json:"metadatas,omitempty"` + + // Reason: The reason of the error. This is a constant value that + // identifies the proximate cause of the error. Error reasons are unique + // within a particular domain of errors. This should be at most 63 + // characters and match /[A-Z0-9_]+/. + Reason string `json:"reason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Domain") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Domain") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ErrorInfo) MarshalJSON() ([]byte, error) { + type NoMethod ErrorInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ExchangedPeeringRoute struct { // DestRange: The destination range of the route. DestRange string `json:"destRange,omitempty"` @@ -12903,6 +12973,13 @@ type FirewallPolicyRule struct { // single firewall policy rule. RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` + // SecurityProfileGroup: A fully-qualified URL of a SecurityProfile + // resource instance. Example: + // https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group + // Must be specified if action = 'apply_profile_group' and cannot be + // specified for other actions. + SecurityProfileGroup string `json:"securityProfileGroup,omitempty"` + // TargetResources: A list of network resource URLs to which this rule // applies. This field allows you to control which network's VMs get // this rule. If this field is left blank, all VMs within the @@ -13255,8 +13332,7 @@ type ForwardingRule struct { Id uint64 `json:"id,omitempty,string"` // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for an - // external global forwarding rule. + // Valid options are IPV4 or IPV6. // // Possible values: // "IPV4" @@ -13401,6 +13477,9 @@ type ForwardingRule struct { // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer and will // not serve traffic going forward. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The connection has been rejected by the producer. // "STATUS_UNSPECIFIED" @@ -14960,6 +15039,43 @@ func (s *GetOwnerInstanceResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GlobalAddressesMoveRequest struct { + // Description: An optional destination address description if intended + // to be different from the source. + Description string `json:"description,omitempty"` + + // DestinationAddress: The URL of the destination address to move to. + // This can be a full or partial URL. For example, the following are all + // valid URLs to a address: - + // https://www.googleapis.com/compute/v1/projects/project + // /global/addresses/address - projects/project/global/addresses/address + // Note that destination project must be different from the source + // project. So /global/addresses/address is not valid partial url. + DestinationAddress string `json:"destinationAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GlobalAddressesMoveRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalAddressesMoveRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { // NetworkEndpoints: The list of network endpoints to be attached. NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` @@ -17166,6 +17282,70 @@ func (s *HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Help: Provides links to documentation or for performing an out of +// band action. For example, if a quota check failed with an error +// indicating the calling project hasn't enabled the accessed service, +// this can contain a URL pointing directly to the right place in the +// developer console to flip the bit. +type Help struct { + // Links: URL(s) pointing to additional information on handling the + // current error. + Links []*HelpLink `json:"links,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Links") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Links") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Help) MarshalJSON() ([]byte, error) { + type NoMethod Help + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HelpLink: Describes a URL link. +type HelpLink struct { + // Description: Describes what the link offers. + Description string `json:"description,omitempty"` + + // Url: The URL of the link. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HelpLink) MarshalJSON() ([]byte, error) { + type NoMethod HelpLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostRule: UrlMaps A host-matching rule for a URL. If matched, will // use the named PathMatcher to select the BackendService. type HostRule struct { @@ -24196,6 +24376,10 @@ type InstanceTemplate struct { // Properties: The instance properties for this instance template. Properties *InstanceProperties `json:"properties,omitempty"` + // Region: [Output Only] URL of the region where the instance template + // resides. Only applicable for regional resources. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] The URL for this instance template. The // server defines this URL. SelfLink string `json:"selfLink,omitempty"` @@ -29323,6 +29507,40 @@ func (s *LocalDisk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LocalizedMessage: Provides a localized error message that is safe to +// return to the user which can be attached to an RPC error. +type LocalizedMessage struct { + // Locale: The locale used following the specification defined at + // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", + // "fr-CH", "es-MX" + Locale string `json:"locale,omitempty"` + + // Message: The localized error message in the above locale. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Locale") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locale") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LocalizedMessage) MarshalJSON() ([]byte, error) { + type NoMethod LocalizedMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LocationPolicy: Configuration for location policy among multiple // possible locations (e.g. preferences for zone selection among zones // in a single region). @@ -30920,6 +31138,13 @@ type ManagedInstanceLastAttemptErrorsErrors struct { // Code: [Output Only] The error type identifier for this error. Code string `json:"code,omitempty"` + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*ManagedInstanceLastAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` + // Location: [Output Only] Indicates the field in the request that // caused the error. This property is optional. Location string `json:"location,omitempty"` @@ -30950,6 +31175,38 @@ func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` + + Help *Help `json:"help,omitempty"` + + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceLastAttemptErrorsErrorsErrorDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedInstanceVersion struct { // InstanceTemplate: [Output Only] The intended template of the // instance. This field is empty when current_action is one of { @@ -37215,6 +37472,13 @@ type OperationErrorErrors struct { // Code: [Output Only] The error type identifier for this error. Code string `json:"code,omitempty"` + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*OperationErrorErrorsErrorDetails `json:"errorDetails,omitempty"` + // Location: [Output Only] Indicates the field in the request that // caused the error. This property is optional. Location string `json:"location,omitempty"` @@ -37245,6 +37509,38 @@ func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type OperationErrorErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` + + Help *Help `json:"help,omitempty"` + + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod OperationErrorErrorsErrorDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type OperationWarnings struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in @@ -41316,6 +41612,59 @@ func (s *Quota) UnmarshalJSON(data []byte) error { return nil } +// QuotaExceededInfo: Additional details for quota exceeded error for +// resource quota. +type QuotaExceededInfo struct { + // Dimensions: The map holding related quota dimensions. + Dimensions map[string]string `json:"dimensions,omitempty"` + + // Limit: Current effective quota limit. The limit's unit depends on the + // quota type or metric. + Limit float64 `json:"limit,omitempty"` + + // LimitName: The name of the quota limit. + LimitName string `json:"limitName,omitempty"` + + // MetricName: The Compute Engine quota metric name. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuotaExceededInfo) MarshalJSON() ([]byte, error) { + type NoMethod QuotaExceededInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { + type NoMethod QuotaExceededInfo + var s1 struct { + Limit gensupport.JSONFloat64 `json:"limit"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Limit = float64(s1.Limit) + return nil +} + type RbacPolicy struct { // Name: Name of the RbacPolicy. Name string `json:"name,omitempty"` @@ -41466,6 +41815,44 @@ func (s *Region) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RegionAddressesMoveRequest struct { + // Description: An optional destination address description if intended + // to be different from the source. + Description string `json:"description,omitempty"` + + // DestinationAddress: The URL of the destination address to move to. + // This can be a full or partial URL. For example, the following are all + // valid URLs to a address: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /addresses/address - + // projects/project/regions/region/addresses/address Note that + // destination project must be different from the source project. So + // /regions/region/addresses/address is not valid partial url. + DestinationAddress string `json:"destinationAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionAddressesMoveRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionAddressesMoveRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RegionAutoscalerList: Contains a list of autoscalers. type RegionAutoscalerList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -50557,6 +50944,10 @@ type SecurityPolicyRuleRateLimitOptions struct { // exceedRedirectOptions below. ExceedAction string `json:"exceedAction,omitempty"` + // ExceedActionRpcStatus: Specified gRPC response status for proxyless + // gRPC requests that are above the configured rate limit threshold + ExceedActionRpcStatus *SecurityPolicyRuleRateLimitOptionsRpcStatus `json:"exceedActionRpcStatus,omitempty"` + // ExceedRedirectOptions: Parameters defining the redirect action that // is used as the exceed action. Cannot be specified if the exceed // action is not redirect. @@ -50589,6 +50980,40 @@ func (s *SecurityPolicyRuleRateLimitOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityPolicyRuleRateLimitOptionsRpcStatus: Simplified +// google.rpc.Status type (omitting details). +type SecurityPolicyRuleRateLimitOptionsRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleRateLimitOptionsRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleRateLimitOptionsRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPolicyRuleRateLimitOptionsThreshold struct { // Count: Number of HTTP(S) requests for calculating the threshold. Count int64 `json:"count,omitempty"` @@ -51223,6 +51648,9 @@ type ServiceAttachmentConnectedEndpoint struct { // Possible values: // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The consumer is still connected but not using the // connection. @@ -66586,6 +67014,194 @@ func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) erro } } +// method id "compute.addresses.move": + +type AddressesMoveCall struct { + s *Service + project string + region string + address string + regionaddressesmoverequest *RegionAddressesMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Move: Moves the specified address resource. +// +// - address: Name of the address resource to move. +// - project: Source project ID which the Address is moved from. +// - region: Name of the region for this request. +func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { + c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + c.regionaddressesmoverequest = regionaddressesmoverequest + 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 *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesMoveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionaddressesmoverequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.move" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Moves the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", + // "httpMethod": "POST", + // "id": "compute.addresses.move", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to move.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Source project ID which the Address is moved from.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{address}/move", + // "request": { + // "$ref": "RegionAddressesMoveRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.addresses.setLabels": type AddressesSetLabelsCall struct { @@ -87365,35 +87981,51 @@ func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList } } -// method id "compute.globalAddresses.setLabels": +// method id "compute.globalAddresses.move": -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalAddressesMoveCall struct { + s *Service + project string + address string + globaladdressesmoverequest *GlobalAddressesMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. +// Move: Moves the specified address resource from one project to +// another project. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - address: Name of the address resource to move. +// - project: Source project ID which the Address is moved from. +func (r *GlobalAddressesService) Move(project string, address string, globaladdressesmoverequest *GlobalAddressesMoveRequest) *GlobalAddressesMoveCall { + c := &GlobalAddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest + c.address = address + c.globaladdressesmoverequest = globaladdressesmoverequest + 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 *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMoveCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { +func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87401,21 +88033,21 @@ func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddre // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { +func (c *GlobalAddressesMoveCall) Context(ctx context.Context) *GlobalAddressesMoveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { +func (c *GlobalAddressesMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -87423,14 +88055,14 @@ func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globaladdressesmoverequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}/move") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87438,20 +88070,20 @@ func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.setLabels" call. +// Do executes the "compute.globalAddresses.move" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87482,33 +88114,38 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", + // "description": "Moves the specified address resource from one project to another project.", + // "flatPath": "projects/{project}/global/addresses/{address}/move", // "httpMethod": "POST", - // "id": "compute.globalAddresses.setLabels", + // "id": "compute.globalAddresses.move", // "parameterOrder": [ // "project", - // "resource" + // "address" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "address": { + // "description": "Name of the address resource to move.", // "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])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Source project ID which the Address is moved from.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses/{resource}/setLabels", + // "path": "projects/{project}/global/addresses/{address}/move", // "request": { - // "$ref": "GlobalSetLabelsRequest" + // "$ref": "GlobalAddressesMoveRequest" // }, // "response": { // "$ref": "Operation" @@ -87521,35 +88158,35 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.globalAddresses.testIamPermissions": +// method id "compute.globalAddresses.setLabels": -type GlobalAddressesTestIamPermissionsCall struct { +type GlobalAddressesSetLabelsCall struct { s *Service project string resource string - testpermissionsrequest *TestPermissionsRequest + globalsetlabelsrequest *GlobalSetLabelsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// SetLabels: Sets the labels on a GlobalAddress. To learn more about +// labels, read the Labeling Resources documentation. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { + c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.globalsetlabelsrequest = globalsetlabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { +func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87557,21 +88194,21 @@ func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *Gl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { +func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { +func (c *GlobalAddressesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -87579,14 +88216,14 @@ func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87600,179 +88237,335 @@ func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. 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 *GlobalAddressesTestIamPermissionsCall) 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, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "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" - // }, - // "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}/global/addresses/{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" - // ] - // } - -} - -// method id "compute.globalForwardingRules.delete": - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to delete. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - 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 *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. +// Do executes the "compute.globalAddresses.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.setLabels", + // "parameterOrder": [ + // "project", + // "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" + // }, + // "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}/global/addresses/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalAddresses.testIamPermissions": + +type GlobalAddressesTestIamPermissionsCall struct { + s *Service + project 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. +func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { + c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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 information. +func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{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, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalAddresses.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. 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 *GlobalAddressesTestIamPermissionsCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.testIamPermissions", + // "parameterOrder": [ + // "project", + // "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" + // }, + // "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}/global/addresses/{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" + // ] + // } + +} + +// method id "compute.globalForwardingRules.delete": + +type GlobalForwardingRulesDeleteCall struct { + s *Service + project string + forwardingRule string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified GlobalForwardingRule resource. +// +// - forwardingRule: Name of the ForwardingRule resource to delete. +// - project: Project ID for this request. +func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { + c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.forwardingRule = forwardingRule + 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 *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "forwardingRule": c.forwardingRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalForwardingRules.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102583,7 +103376,9 @@ type InstanceGroupManagersListManagedInstancesCall struct { // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, // the list displays the errors for that failed action. The orderBy -// query parameter is not supported. +// query parameter is not supported. The `pageToken` query parameter is +// supported only in the alpha and beta API and only if the group's +// `listManagedInstancesResults` field is set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -102769,7 +103564,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", @@ -166758,7 +167553,10 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. The orderBy query parameter is not supported. +// instances. The orderBy query parameter is not supported. The +// `pageToken` query parameter is supported only in the alpha and beta +// API and only if the group's `listManagedInstancesResults` field is +// set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -166943,7 +167741,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", @@ -171355,6 +172153,828 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp } +// method id "compute.regionInstanceTemplates.delete": + +type RegionInstanceTemplatesDeleteCall struct { + s *Service + project string + region string + instanceTemplate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified instance template. Deleting an instance +// template is permanent and cannot be undone. +// +// - instanceTemplate: The name of the instance template to delete. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Delete(project string, region string, instanceTemplate string) *RegionInstanceTemplatesDeleteCall { + c := &RegionInstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceTemplate = instanceTemplate + 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 *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionInstanceTemplatesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceTemplatesDeleteCall) Context(ctx context.Context) *RegionInstanceTemplatesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceTemplatesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceTemplate": c.instanceTemplate, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceTemplates.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "httpMethod": "DELETE", + // "id": "compute.regionInstanceTemplates.delete", + // "parameterOrder": [ + // "project", + // "region", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "The name of the instance template to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceTemplates.get": + +type RegionInstanceTemplatesGetCall struct { + s *Service + project string + region string + instanceTemplate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified instance template. Gets a list of +// available instance templates by making a list() request. +// +// - instanceTemplate: The name of the instance template. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Get(project string, region string, instanceTemplate string) *RegionInstanceTemplatesGetCall { + c := &RegionInstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceTemplate = instanceTemplate + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceTemplatesGetCall) Context(ctx context.Context) *RegionInstanceTemplatesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceTemplatesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceTemplate": c.instanceTemplate, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceTemplates.get" call. +// Exactly one of *InstanceTemplate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &InstanceTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "httpMethod": "GET", + // "id": "compute.regionInstanceTemplates.get", + // "parameterOrder": [ + // "project", + // "region", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "The name of the instance template.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "InstanceTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionInstanceTemplates.insert": + +type RegionInstanceTemplatesInsertCall struct { + s *Service + project string + region string + instancetemplate *InstanceTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an instance template in the specified project and +// region using the global instance template whose URL is included in +// the request. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Insert(project string, region string, instancetemplate *InstanceTemplate) *RegionInstanceTemplatesInsertCall { + c := &RegionInstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instancetemplate = instancetemplate + 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 *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionInstanceTemplatesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceTemplatesInsertCall) Context(ctx context.Context) *RegionInstanceTemplatesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceTemplatesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceTemplates.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an instance template in the specified project and region using the global instance template whose URL is included in the request.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "httpMethod": "POST", + // "id": "compute.regionInstanceTemplates.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates", + // "request": { + // "$ref": "InstanceTemplate" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceTemplates.list": + +type RegionInstanceTemplatesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of instance templates that are contained +// within the specified project and region. +// +// - project: Project ID for this request. +// - region: The name of the regions for this request. +func (r *RegionInstanceTemplatesService) List(project string, region string) *RegionInstanceTemplatesListCall { + c := &RegionInstanceTemplatesListCall{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. 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 `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceTemplatesListCall { + 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 *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionInstanceTemplatesListCall { + 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 *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanceTemplatesListCall { + 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 *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionInstanceTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceTemplatesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceTemplatesListCall) Context(ctx context.Context) *RegionInstanceTemplatesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceTemplatesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceTemplates.list" call. +// Exactly one of *InstanceTemplateList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplateList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &InstanceTemplateList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of instance templates that are contained within the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "httpMethod": "GET", + // "id": "compute.regionInstanceTemplates.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the regions 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 of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates", + // "response": { + // "$ref": "InstanceTemplateList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.regionInstances.bulkInsert": type RegionInstancesBulkInsertCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index fe65f94dfd7..ca0ee49acbc 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -8054,7 +8054,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", @@ -21839,7 +21839,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", @@ -35452,7 +35452,7 @@ } } }, - "revision": "20220607", + "revision": "20220614", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -42418,7 +42418,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule.", + "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6.", "enum": [ "IPV4", "IPV6", @@ -42528,6 +42528,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -42535,6 +42536,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer and will not serve traffic going forward.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The connection has been rejected by the producer.", "" @@ -63267,6 +63269,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -63274,6 +63277,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The consumer is still connected but not using the connection.", "" diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index ed3c8820ed0..3d3f26ed6d2 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -12402,8 +12402,7 @@ type ForwardingRule struct { Id uint64 `json:"id,omitempty,string"` // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for an - // external global forwarding rule. + // Valid options are IPV4 or IPV6. // // Possible values: // "IPV4" @@ -12546,6 +12545,9 @@ type ForwardingRule struct { // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer and will // not serve traffic going forward. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The connection has been rejected by the producer. // "STATUS_UNSPECIFIED" @@ -44929,6 +44931,9 @@ type ServiceAttachmentConnectedEndpoint struct { // Possible values: // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The consumer is still connected but not using the // connection. @@ -92656,7 +92661,9 @@ type InstanceGroupManagersListManagedInstancesCall struct { // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, // the list displays the errors for that failed action. The orderBy -// query parameter is not supported. +// query parameter is not supported. The `pageToken` query parameter is +// supported only in the alpha and beta API and only if the group's +// `listManagedInstancesResults` field is set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -92842,7 +92849,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", @@ -149863,7 +149870,10 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. The orderBy query parameter is not supported. +// instances. The orderBy query parameter is not supported. The +// `pageToken` query parameter is supported only in the alpha and beta +// API and only if the group's `listManagedInstancesResults` field is +// set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -150048,7 +150058,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 4620a30f9ed..ddf6ce56428 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -7308,7 +7308,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", @@ -19492,7 +19492,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", @@ -31172,7 +31172,7 @@ } } }, - "revision": "20220607", + "revision": "20220614", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -37935,7 +37935,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule.", + "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6.", "enum": [ "IPV4", "IPV6", @@ -38045,6 +38045,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -38052,6 +38053,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer and will not serve traffic going forward.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The connection has been rejected by the producer.", "" @@ -57948,6 +57950,7 @@ "enum": [ "ACCEPTED", "CLOSED", + "NEEDS_ATTENTION", "PENDING", "REJECTED", "STATUS_UNSPECIFIED" @@ -57955,6 +57958,7 @@ "enumDescriptions": [ "The connection has been accepted by the producer.", "The connection has been closed by the producer.", + "The connection has been accepted by the producer, but the producer needs to take further action before the forwarding rule can serve traffic.", "The connection is pending acceptance by the producer.", "The consumer is still connected but not using the connection.", "" diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 00d1dd1e1af..2c354061c18 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -12121,8 +12121,7 @@ type ForwardingRule struct { Id uint64 `json:"id,omitempty,string"` // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for an - // external global forwarding rule. + // Valid options are IPV4 or IPV6. // // Possible values: // "IPV4" @@ -12265,6 +12264,9 @@ type ForwardingRule struct { // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer and will // not serve traffic going forward. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The connection has been rejected by the producer. // "STATUS_UNSPECIFIED" @@ -43281,6 +43283,9 @@ type ServiceAttachmentConnectedEndpoint struct { // Possible values: // "ACCEPTED" - The connection has been accepted by the producer. // "CLOSED" - The connection has been closed by the producer. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. // "PENDING" - The connection is pending acceptance by the producer. // "REJECTED" - The consumer is still connected but not using the // connection. @@ -87209,7 +87214,9 @@ type InstanceGroupManagersListManagedInstancesCall struct { // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, // the list displays the errors for that failed action. The orderBy -// query parameter is not supported. +// query parameter is not supported. The `pageToken` query parameter is +// supported only in the alpha and beta API and only if the group's +// `listManagedInstancesResults` field is set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -87395,7 +87402,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", @@ -137734,7 +137741,10 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. The orderBy query parameter is not supported. +// instances. The orderBy query parameter is not supported. The +// `pageToken` query parameter is supported only in the alpha and beta +// API and only if the group's `listManagedInstancesResults` field is +// set to `PAGINATED`. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. @@ -137919,7 +137929,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 3542fca1b46..3c4de59969c 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2459,7 +2459,7 @@ } } }, - "revision": "20220518", + "revision": "20220610", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2660,9 +2660,9 @@ "PROJECT_SINGLETON_POLICY_ENFORCE" ], "enumDescriptions": [ - "Default value, equivalent to DISABLED.", + "Default value", "Disable BinaryAuthorization", - "If enabled, enforce Kubernetes admission requests with BinAuthz using the project's singleton policy. Equivalent to bool enabled=true." + "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy. This is equivalent to setting the enabled boolean to true." ], "type": "string" } diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 913e737e03c..c7207c6e9d6 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -647,12 +647,11 @@ type BinaryAuthorization struct { // unspecified, defaults to DISABLED. // // Possible values: - // "EVALUATION_MODE_UNSPECIFIED" - Default value, equivalent to - // DISABLED. + // "EVALUATION_MODE_UNSPECIFIED" - Default value // "DISABLED" - Disable BinaryAuthorization - // "PROJECT_SINGLETON_POLICY_ENFORCE" - If enabled, enforce Kubernetes - // admission requests with BinAuthz using the project's singleton - // policy. Equivalent to bool enabled=true. + // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission + // requests with BinaryAuthorization using the project's singleton + // policy. This is equivalent to setting the enabled boolean to true. EvaluationMode string `json:"evaluationMode,omitempty"` // ForceSendFields is a list of field names (e.g. "Enabled") to diff --git a/domains/v1alpha2/domains-api.json b/domains/v1alpha2/domains-api.json index bbf7a765ee7..c801e50c474 100644 --- a/domains/v1alpha2/domains-api.json +++ b/domains/v1alpha2/domains-api.json @@ -442,6 +442,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "import": { + "description": "Imports a domain name from [Google Domains](https://domains.google/) for use in Cloud Domains. To transfer a domain from another registrar, use the `TransferDomain` method instead. Since individual users can own domains in Google Domains, the calling user must have ownership permission on the domain.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:import", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the Registration. Must be in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+parent}/registrations:import", + "request": { + "$ref": "ImportDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the `Registration` resources in a project.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations", @@ -598,6 +626,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "retrieveImportableDomains": { + "description": "Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains supported by Google Domains, but not supported by Cloud Domains, are not returned.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:retrieveImportableDomains", + "httpMethod": "GET", + "id": "domains.projects.locations.registrations.retrieveImportableDomains", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location. Must be in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "When set to the `next_page_token` from a prior response, provides the next page of results.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha2/{+location}/registrations:retrieveImportableDomains", + "response": { + "$ref": "RetrieveImportableDomainsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveRegisterParameters": { "description": "Gets parameters needed to register a new domain name, including price and up-to-date availability. Use the returned values to call `RegisterDomain`.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:retrieveRegisterParameters", @@ -629,7 +693,7 @@ ] }, "retrieveTransferParameters": { - "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Use the returned values to call `TransferDomain`.", + "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Use the returned values to call `TransferDomain`.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:retrieveTransferParameters", "httpMethod": "GET", "id": "domains.projects.locations.registrations.retrieveTransferParameters", @@ -745,7 +809,7 @@ ] }, "transfer": { - "description": "Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", + "description": "Transfers a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:transfer", "httpMethod": "POST", "id": "domains.projects.locations.registrations.transfer", @@ -779,7 +843,7 @@ } } }, - "revision": "20220517", + "revision": "20220616", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1035,6 +1099,41 @@ }, "type": "object" }, + "Domain": { + "description": "A domain that the calling user manages in Google Domains.", + "id": "Domain", + "properties": { + "domainName": { + "description": "The domain name. Unicode domain names are expressed in Punycode format.", + "type": "string" + }, + "resourceState": { + "description": "The state of this domain as a `Registration` resource.", + "enum": [ + "RESOURCE_STATE_UNSPECIFIED", + "IMPORTABLE", + "UNSUPPORTED", + "SUSPENDED", + "EXPIRED", + "DELETED" + ], + "enumDescriptions": [ + "The assessment is undefined.", + "A `Registration` resource can be created for this domain by calling `ImportDomain`.", + "A `Registration` resource cannot be created for this domain because it is not supported by Cloud Domains; for example, the top-level domain is not supported or the registry charges non-standard pricing for yearly renewals.", + "A `Registration` resource cannot be created for this domain because it is suspended and needs to be resolved with Google Domains.", + "A `Registration` resource cannot be created for this domain because it is expired and needs to be renewed with Google Domains.", + "A `Registration` resource cannot be created for this domain because it is deleted, but can be restored with Google Domains." + ], + "type": "string" + }, + "yearlyPrice": { + "$ref": "Money", + "description": "Price to renew the domain for one year. Only set when `resource_state` is `IMPORTABLE`." + } + }, + "type": "object" + }, "DsRecord": { "description": "Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that must be present in the domain's DNS zone.", "id": "DsRecord", @@ -1204,6 +1303,24 @@ }, "type": "object" }, + "ImportDomainRequest": { + "description": "Request for the `ImportDomain` method.", + "id": "ImportDomainRequest", + "properties": { + "domainName": { + "description": "Required. The domain name. Unicode domain names must be expressed in Punycode format.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of labels associated with the `Registration`.", + "type": "object" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1623,7 +1740,7 @@ "type": "object" }, "Registration": { - "description": "The `Registration` resource facilitates managing and configuring domain name registrations. There are several ways to create a new `Registration` resource: To create a new `Registration` resource, find a suitable domain name by calling the `SearchDomains` method with a query to see available domain name options. After choosing a name, call `RetrieveRegisterParameters` to ensure availability and obtain information like pricing, which is needed to build a call to `RegisterDomain`. Another way to create a new `Registration` is to transfer an existing domain from another registrar. First, go to the current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to `TransferDomain`.", + "description": "The `Registration` resource facilitates managing and configuring domain name registrations. There are several ways to create a new `Registration` resource: To create a new `Registration` resource, find a suitable domain name by calling the `SearchDomains` method with a query to see available domain name options. After choosing a name, call `RetrieveRegisterParameters` to ensure availability and obtain information like pricing, which is needed to build a call to `RegisterDomain`. Another way to create a new `Registration` is to transfer an existing domain from another registrar. First, go to the current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to `TransferDomain`. Finally, you can create a new `Registration` by importing an existing domain managed with [Google Domains](https://domains.google/). First, call `RetrieveImportableDomains` to list domains to which the calling user has sufficient access. Then call `ImportDomain` on any domain names you want to use with Cloud Domains.", "id": "Registration", "properties": { "contactSettings": { @@ -1689,6 +1806,23 @@ "description": "Output only. Pending contact settings for the `Registration`. Updates to the `contact_settings` field that change its `registrant_contact` or `privacy` fields require email confirmation by the `registrant_contact` before taking effect. This field is set only if there are pending updates to the `contact_settings` that have not been confirmed. To confirm the changes, the `registrant_contact` must follow the instructions in the email they receive.", "readOnly": true }, + "registerFailureReason": { + "description": "Output only. The reason the domain registration failed. Only set for domains in REGISTRATION_FAILED state.", + "enum": [ + "REGISTER_FAILURE_REASON_UNSPECIFIED", + "REGISTER_FAILURE_REASON_UNKNOWN", + "DOMAIN_NOT_AVAILABLE", + "INVALID_CONTACTS" + ], + "enumDescriptions": [ + "Register failure unspecified.", + "Registration failed for an unknown reason.", + "The domain is not available for registration.", + "The provided contact information was rejected." + ], + "readOnly": true, + "type": "string" + }, "state": { "description": "Output only. The state of the `Registration`", "enum": [ @@ -1697,6 +1831,7 @@ "REGISTRATION_FAILED", "TRANSFER_PENDING", "TRANSFER_FAILED", + "IMPORT_PENDING", "ACTIVE", "SUSPENDED", "EXPORTED" @@ -1707,6 +1842,7 @@ "The domain registration failed. You can delete resources in this state to allow registration to be retried.", "The domain is being transferred from another registrar to Cloud Domains.", "The attempt to transfer the domain from another registrar to Cloud Domains failed. You can delete resources in this state and retry the transfer.", + "The domain is being imported from Google Domains to Cloud Domains.", "The domain is registered and operational. The domain renews automatically as long as it remains in this state.", "The domain is suspended and inoperative. For more details, see the `issues` field.", "The domain is no longer managed with Cloud Domains. It may have been transferred to another registrar or exported for management in [Google Domains](https://domains.google/). You can no longer update it with this API, and information shown about it may be stale. Domains in this state are not automatically renewed by Cloud Domains." @@ -1733,6 +1869,37 @@ }, "readOnly": true, "type": "array" + }, + "transferFailureReason": { + "description": "Output only. The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.", + "enum": [ + "TRANSFER_FAILURE_REASON_UNSPECIFIED", + "TRANSFER_FAILURE_REASON_UNKNOWN", + "EMAIL_CONFIRMATION_FAILURE", + "DOMAIN_NOT_REGISTERED", + "DOMAIN_HAS_TRANSFER_LOCK", + "INVALID_AUTHORIZATION_CODE", + "TRANSFER_CANCELLED", + "TRANSFER_REJECTED", + "INVALID_REGISTRANT_EMAIL_ADDRESS", + "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER", + "TRANSFER_ALREADY_PENDING" + ], + "enumDescriptions": [ + "Transfer failure unspecified.", + "Transfer failed for an unknown reason.", + "An email confirmation sent to the user was rejected or expired.", + "The domain is available for registration.", + "The domain has a transfer lock with its current registrar which must be removed prior to transfer.", + "The authorization code entered is not valid.", + "The transfer was cancelled by the domain owner, current registrar, or TLD registry.", + "The transfer was rejected by the current registrar. Contact the current registrar for more information.", + "The registrant email address cannot be parsed from the domain's current public contact data.", + "The domain is not eligible for transfer due requirements imposed by the current registrar or TLD registry.", + "Another transfer is already pending for this domain. The existing transfer attempt must expire or be cancelled in order to proceed." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1743,6 +1910,24 @@ "properties": {}, "type": "object" }, + "RetrieveImportableDomainsResponse": { + "description": "Response for the `RetrieveImportableDomains` method.", + "id": "RetrieveImportableDomainsResponse", + "properties": { + "domains": { + "description": "A list of domains that the calling user manages in Google Domains.", + "items": { + "$ref": "Domain" + }, + "type": "array" + }, + "nextPageToken": { + "description": "When present, there are more results to retrieve. Set `page_token` to this value on a subsequent call to get the next page of results.", + "type": "string" + } + }, + "type": "object" + }, "RetrieveRegisterParametersResponse": { "description": "Response for the `RetrieveRegisterParameters` method.", "id": "RetrieveRegisterParametersResponse", @@ -1896,6 +2081,10 @@ "description": "The registrar that currently manages the domain.", "type": "string" }, + "currentRegistrarUri": { + "description": "The URL of registrar that currently manages the domain.", + "type": "string" + }, "domainName": { "description": "The domain name. Unicode domain names are expressed in Punycode format.", "type": "string" diff --git a/domains/v1alpha2/domains-gen.go b/domains/v1alpha2/domains-gen.go index 0894eb0be65..5c68ce96f4b 100644 --- a/domains/v1alpha2/domains-gen.go +++ b/domains/v1alpha2/domains-gen.go @@ -692,6 +692,60 @@ func (s *DnsSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Domain: A domain that the calling user manages in Google Domains. +type Domain struct { + // DomainName: The domain name. Unicode domain names are expressed in + // Punycode format. + DomainName string `json:"domainName,omitempty"` + + // ResourceState: The state of this domain as a `Registration` resource. + // + // Possible values: + // "RESOURCE_STATE_UNSPECIFIED" - The assessment is undefined. + // "IMPORTABLE" - A `Registration` resource can be created for this + // domain by calling `ImportDomain`. + // "UNSUPPORTED" - A `Registration` resource cannot be created for + // this domain because it is not supported by Cloud Domains; for + // example, the top-level domain is not supported or the registry + // charges non-standard pricing for yearly renewals. + // "SUSPENDED" - A `Registration` resource cannot be created for this + // domain because it is suspended and needs to be resolved with Google + // Domains. + // "EXPIRED" - A `Registration` resource cannot be created for this + // domain because it is expired and needs to be renewed with Google + // Domains. + // "DELETED" - A `Registration` resource cannot be created for this + // domain because it is deleted, but can be restored with Google + // Domains. + ResourceState string `json:"resourceState,omitempty"` + + // YearlyPrice: Price to renew the domain for one year. Only set when + // `resource_state` is `IMPORTABLE`. + YearlyPrice *Money `json:"yearlyPrice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DomainName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DomainName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Domain) MarshalJSON() ([]byte, error) { + type NoMethod Domain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DsRecord: Defines a Delegation Signer (DS) record, which is needed to // enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY // record that must be present in the domain's DNS zone. @@ -925,6 +979,38 @@ func (s *GoogleDomainsDns) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportDomainRequest: Request for the `ImportDomain` method. +type ImportDomainRequest struct { + // DomainName: Required. The domain name. Unicode domain names must be + // expressed in Punycode format. + DomainName string `json:"domainName,omitempty"` + + // Labels: Set of labels associated with the `Registration`. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DomainName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DomainName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportDomainRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -1673,7 +1759,12 @@ func (s *RegisterParameters) MarshalJSON() ([]byte, error) { // for transfer and retrieve the domain's transfer authorization code. // Then call `RetrieveTransferParameters` to confirm that the domain is // unlocked and to get values needed to build a call to -// `TransferDomain`. +// `TransferDomain`. Finally, you can create a new `Registration` by +// importing an existing domain managed with Google Domains +// (https://domains.google/). First, call `RetrieveImportableDomains` to +// list domains to which the calling user has sufficient access. Then +// call `ImportDomain` on any domain names you want to use with Cloud +// Domains. type Registration struct { // ContactSettings: Required. Settings for contact information linked to // the `Registration`. You cannot update these with the @@ -1740,6 +1831,20 @@ type Registration struct { // email they receive. PendingContactSettings *ContactSettings `json:"pendingContactSettings,omitempty"` + // RegisterFailureReason: Output only. The reason the domain + // registration failed. Only set for domains in REGISTRATION_FAILED + // state. + // + // Possible values: + // "REGISTER_FAILURE_REASON_UNSPECIFIED" - Register failure + // unspecified. + // "REGISTER_FAILURE_REASON_UNKNOWN" - Registration failed for an + // unknown reason. + // "DOMAIN_NOT_AVAILABLE" - The domain is not available for + // registration. + // "INVALID_CONTACTS" - The provided contact information was rejected. + RegisterFailureReason string `json:"registerFailureReason,omitempty"` + // State: Output only. The state of the `Registration` // // Possible values: @@ -1752,6 +1857,8 @@ type Registration struct { // "TRANSFER_FAILED" - The attempt to transfer the domain from another // registrar to Cloud Domains failed. You can delete resources in this // state and retry the transfer. + // "IMPORT_PENDING" - The domain is being imported from Google Domains + // to Cloud Domains. // "ACTIVE" - The domain is registered and operational. The domain // renews automatically as long as it remains in this state. // "SUSPENDED" - The domain is suspended and inoperative. For more @@ -1785,6 +1892,35 @@ type Registration struct { // article](https://support.google.com/domains/answer/3251242). SupportedPrivacy []string `json:"supportedPrivacy,omitempty"` + // TransferFailureReason: Output only. The reason the domain transfer + // failed. Only set for domains in TRANSFER_FAILED state. + // + // Possible values: + // "TRANSFER_FAILURE_REASON_UNSPECIFIED" - Transfer failure + // unspecified. + // "TRANSFER_FAILURE_REASON_UNKNOWN" - Transfer failed for an unknown + // reason. + // "EMAIL_CONFIRMATION_FAILURE" - An email confirmation sent to the + // user was rejected or expired. + // "DOMAIN_NOT_REGISTERED" - The domain is available for registration. + // "DOMAIN_HAS_TRANSFER_LOCK" - The domain has a transfer lock with + // its current registrar which must be removed prior to transfer. + // "INVALID_AUTHORIZATION_CODE" - The authorization code entered is + // not valid. + // "TRANSFER_CANCELLED" - The transfer was cancelled by the domain + // owner, current registrar, or TLD registry. + // "TRANSFER_REJECTED" - The transfer was rejected by the current + // registrar. Contact the current registrar for more information. + // "INVALID_REGISTRANT_EMAIL_ADDRESS" - The registrant email address + // cannot be parsed from the domain's current public contact data. + // "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER" - The domain is not eligible for + // transfer due requirements imposed by the current registrar or TLD + // registry. + // "TRANSFER_ALREADY_PENDING" - Another transfer is already pending + // for this domain. The existing transfer attempt must expire or be + // cancelled in order to proceed. + TransferFailureReason string `json:"transferFailureReason,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1818,6 +1954,45 @@ func (s *Registration) MarshalJSON() ([]byte, error) { type ResetAuthorizationCodeRequest struct { } +// RetrieveImportableDomainsResponse: Response for the +// `RetrieveImportableDomains` method. +type RetrieveImportableDomainsResponse struct { + // Domains: A list of domains that the calling user manages in Google + // Domains. + Domains []*Domain `json:"domains,omitempty"` + + // NextPageToken: When present, there are more results to retrieve. Set + // `page_token` to this value on a subsequent call to get the next page + // of results. + 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. "Domains") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Domains") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RetrieveImportableDomainsResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrieveImportableDomainsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RetrieveRegisterParametersResponse: Response for the // `RetrieveRegisterParameters` method. type RetrieveRegisterParametersResponse struct { @@ -2132,6 +2307,10 @@ type TransferParameters struct { // CurrentRegistrar: The registrar that currently manages the domain. CurrentRegistrar string `json:"currentRegistrar,omitempty"` + // CurrentRegistrarUri: The URL of registrar that currently manages the + // domain. + CurrentRegistrarUri string `json:"currentRegistrarUri,omitempty"` + // DomainName: The domain name. Unicode domain names are expressed in // Punycode format. DomainName string `json:"domainName,omitempty"` @@ -3966,6 +4145,153 @@ func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Do(opts ...googleapi.Ca } +// method id "domains.projects.locations.registrations.import": + +type ProjectsLocationsRegistrationsImportCall struct { + s *Service + parent string + importdomainrequest *ImportDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports a domain name from Google Domains +// (https://domains.google/) for use in Cloud Domains. To transfer a +// domain from another registrar, use the `TransferDomain` method +// instead. Since individual users can own domains in Google Domains, +// the calling user must have ownership permission on the domain. +// +// - parent: The parent resource of the Registration. Must be in the +// format `projects/*/locations/*`. +func (r *ProjectsLocationsRegistrationsService) Import(parent string, importdomainrequest *ImportDomainRequest) *ProjectsLocationsRegistrationsImportCall { + c := &ProjectsLocationsRegistrationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importdomainrequest = importdomainrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistrationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistrationsImportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsImportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistrationsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdomainrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/registrations:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.import" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Imports a domain name from [Google Domains](https://domains.google/) for use in Cloud Domains. To transfer a domain from another registrar, use the `TransferDomain` method instead. Since individual users can own domains in Google Domains, the calling user must have ownership permission on the domain.", + // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:import", + // "httpMethod": "POST", + // "id": "domains.projects.locations.registrations.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the Registration. Must be in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha2/{+parent}/registrations:import", + // "request": { + // "$ref": "ImportDomainRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "domains.projects.locations.registrations.list": type ProjectsLocationsRegistrationsListCall struct { @@ -4796,6 +5122,206 @@ func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts .. } +// method id "domains.projects.locations.registrations.retrieveImportableDomains": + +type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveImportableDomains: Lists domain names from Google Domains +// (https://domains.google/) that can be imported to Cloud Domains using +// the `ImportDomain` method. Since individual users can own domains in +// Google Domains, the list of domains returned depends on the +// individual user making the call. Domains supported by Google Domains, +// but not supported by Cloud Domains, are not returned. +// +// - location: The location. Must be in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsRegistrationsService) RetrieveImportableDomains(location string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c := &ProjectsLocationsRegistrationsRetrieveImportableDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": When set to the +// `next_page_token` from a prior response, provides the next page of +// results. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+location}/registrations:retrieveImportableDomains") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.retrieveImportableDomains" call. +// Exactly one of *RetrieveImportableDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RetrieveImportableDomainsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Do(opts ...googleapi.CallOption) (*RetrieveImportableDomainsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RetrieveImportableDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains supported by Google Domains, but not supported by Cloud Domains, are not returned.", + // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:retrieveImportableDomains", + // "httpMethod": "GET", + // "id": "domains.projects.locations.registrations.retrieveImportableDomains", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location. Must be in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "When set to the `next_page_token` from a prior response, provides the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha2/{+location}/registrations:retrieveImportableDomains", + // "response": { + // "$ref": "RetrieveImportableDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Pages(ctx context.Context, f func(*RetrieveImportableDomainsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "domains.projects.locations.registrations.retrieveRegisterParameters": type ProjectsLocationsRegistrationsRetrieveRegisterParametersCall struct { @@ -4972,8 +5498,9 @@ type ProjectsLocationsRegistrationsRetrieveTransferParametersCall struct { // RetrieveTransferParameters: Gets parameters needed to transfer a // domain name from another registrar to Cloud Domains. For domains -// managed by Google Domains, transferring to Cloud Domains is not -// supported. Use the returned values to call `TransferDomain`. +// already managed by Google Domains (https://domains.google/), use +// `ImportDomain` instead. Use the returned values to call +// `TransferDomain`. // // - location: The location. Must be in the format // `projects/*/locations/*`. @@ -5091,7 +5618,7 @@ func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Do(opts . } return ret, nil // { - // "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Use the returned values to call `TransferDomain`.", + // "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Use the returned values to call `TransferDomain`.", // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:retrieveTransferParameters", // "httpMethod": "GET", // "id": "domains.projects.locations.registrations.retrieveTransferParameters", @@ -5594,22 +6121,23 @@ type ProjectsLocationsRegistrationsTransferCall struct { } // Transfer: Transfers a domain name from another registrar to Cloud -// Domains. For domains managed by Google Domains, transferring to Cloud -// Domains is not supported. Before calling this method, go to the -// domain's current registrar to unlock the domain for transfer and -// retrieve the domain's transfer authorization code. Then call -// `RetrieveTransferParameters` to confirm that the domain is unlocked -// and to get values needed to build a call to this method. A successful -// call creates a `Registration` resource in state `TRANSFER_PENDING`. -// It can take several days to complete the transfer process. The -// registrant can often speed up this process by approving the transfer -// through the current registrar, either by clicking a link in an email -// from the registrar or by visiting the registrar's website. A few -// minutes after transfer approval, the resource transitions to state -// `ACTIVE`, indicating that the transfer was successful. If the -// transfer is rejected or the request expires without being approved, -// the resource can end up in state `TRANSFER_FAILED`. If transfer -// fails, you can safely delete the resource and retry the transfer. +// Domains. For domains already managed by Google Domains +// (https://domains.google/), use `ImportDomain` instead. Before calling +// this method, go to the domain's current registrar to unlock the +// domain for transfer and retrieve the domain's transfer authorization +// code. Then call `RetrieveTransferParameters` to confirm that the +// domain is unlocked and to get values needed to build a call to this +// method. A successful call creates a `Registration` resource in state +// `TRANSFER_PENDING`. It can take several days to complete the transfer +// process. The registrant can often speed up this process by approving +// the transfer through the current registrar, either by clicking a link +// in an email from the registrar or by visiting the registrar's +// website. A few minutes after transfer approval, the resource +// transitions to state `ACTIVE`, indicating that the transfer was +// successful. If the transfer is rejected or the request expires +// without being approved, the resource can end up in state +// `TRANSFER_FAILED`. If transfer fails, you can safely delete the +// resource and retry the transfer. // // - parent: The parent resource of the `Registration`. Must be in the // format `projects/*/locations/*`. @@ -5711,7 +6239,7 @@ func (c *ProjectsLocationsRegistrationsTransferCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", + // "description": "Transfers a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/registrations:transfer", // "httpMethod": "POST", // "id": "domains.projects.locations.registrations.transfer", diff --git a/domains/v1beta1/domains-api.json b/domains/v1beta1/domains-api.json index 61a164917ef..41e42bc5311 100644 --- a/domains/v1beta1/domains-api.json +++ b/domains/v1beta1/domains-api.json @@ -442,6 +442,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "import": { + "description": "Imports a domain name from [Google Domains](https://domains.google/) for use in Cloud Domains. To transfer a domain from another registrar, use the `TransferDomain` method instead. Since individual users can own domains in Google Domains, the calling user must have ownership permission on the domain.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:import", + "httpMethod": "POST", + "id": "domains.projects.locations.registrations.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the Registration. Must be in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/registrations:import", + "request": { + "$ref": "ImportDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the `Registration` resources in a project.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations", @@ -598,6 +626,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "retrieveImportableDomains": { + "description": "Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains supported by Google Domains, but not supported by Cloud Domains, are not returned.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:retrieveImportableDomains", + "httpMethod": "GET", + "id": "domains.projects.locations.registrations.retrieveImportableDomains", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location. Must be in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "When set to the `next_page_token` from a prior response, provides the next page of results.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+location}/registrations:retrieveImportableDomains", + "response": { + "$ref": "RetrieveImportableDomainsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveRegisterParameters": { "description": "Gets parameters needed to register a new domain name, including price and up-to-date availability. Use the returned values to call `RegisterDomain`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:retrieveRegisterParameters", @@ -629,7 +693,7 @@ ] }, "retrieveTransferParameters": { - "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Use the returned values to call `TransferDomain`.", + "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Use the returned values to call `TransferDomain`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:retrieveTransferParameters", "httpMethod": "GET", "id": "domains.projects.locations.registrations.retrieveTransferParameters", @@ -745,7 +809,7 @@ ] }, "transfer": { - "description": "Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", + "description": "Transfers a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:transfer", "httpMethod": "POST", "id": "domains.projects.locations.registrations.transfer", @@ -779,7 +843,7 @@ } } }, - "revision": "20220517", + "revision": "20220616", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1035,6 +1099,41 @@ }, "type": "object" }, + "Domain": { + "description": "A domain that the calling user manages in Google Domains.", + "id": "Domain", + "properties": { + "domainName": { + "description": "The domain name. Unicode domain names are expressed in Punycode format.", + "type": "string" + }, + "resourceState": { + "description": "The state of this domain as a `Registration` resource.", + "enum": [ + "RESOURCE_STATE_UNSPECIFIED", + "IMPORTABLE", + "UNSUPPORTED", + "SUSPENDED", + "EXPIRED", + "DELETED" + ], + "enumDescriptions": [ + "The assessment is undefined.", + "A `Registration` resource can be created for this domain by calling `ImportDomain`.", + "A `Registration` resource cannot be created for this domain because it is not supported by Cloud Domains; for example, the top-level domain is not supported or the registry charges non-standard pricing for yearly renewals.", + "A `Registration` resource cannot be created for this domain because it is suspended and needs to be resolved with Google Domains.", + "A `Registration` resource cannot be created for this domain because it is expired and needs to be renewed with Google Domains.", + "A `Registration` resource cannot be created for this domain because it is deleted, but can be restored with Google Domains." + ], + "type": "string" + }, + "yearlyPrice": { + "$ref": "Money", + "description": "Price to renew the domain for one year. Only set when `resource_state` is `IMPORTABLE`." + } + }, + "type": "object" + }, "DsRecord": { "description": "Defines a Delegation Signer (DS) record, which is needed to enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that must be present in the domain's DNS zone.", "id": "DsRecord", @@ -1204,6 +1303,24 @@ }, "type": "object" }, + "ImportDomainRequest": { + "description": "Request for the `ImportDomain` method.", + "id": "ImportDomainRequest", + "properties": { + "domainName": { + "description": "Required. The domain name. Unicode domain names must be expressed in Punycode format.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of labels associated with the `Registration`.", + "type": "object" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1623,7 +1740,7 @@ "type": "object" }, "Registration": { - "description": "The `Registration` resource facilitates managing and configuring domain name registrations. There are several ways to create a new `Registration` resource: To create a new `Registration` resource, find a suitable domain name by calling the `SearchDomains` method with a query to see available domain name options. After choosing a name, call `RetrieveRegisterParameters` to ensure availability and obtain information like pricing, which is needed to build a call to `RegisterDomain`. Another way to create a new `Registration` is to transfer an existing domain from another registrar. First, go to the current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to `TransferDomain`.", + "description": "The `Registration` resource facilitates managing and configuring domain name registrations. There are several ways to create a new `Registration` resource: To create a new `Registration` resource, find a suitable domain name by calling the `SearchDomains` method with a query to see available domain name options. After choosing a name, call `RetrieveRegisterParameters` to ensure availability and obtain information like pricing, which is needed to build a call to `RegisterDomain`. Another way to create a new `Registration` is to transfer an existing domain from another registrar. First, go to the current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to `TransferDomain`. Finally, you can create a new `Registration` by importing an existing domain managed with [Google Domains](https://domains.google/). First, call `RetrieveImportableDomains` to list domains to which the calling user has sufficient access. Then call `ImportDomain` on any domain names you want to use with Cloud Domains.", "id": "Registration", "properties": { "contactSettings": { @@ -1689,6 +1806,23 @@ "description": "Output only. Pending contact settings for the `Registration`. Updates to the `contact_settings` field that change its `registrant_contact` or `privacy` fields require email confirmation by the `registrant_contact` before taking effect. This field is set only if there are pending updates to the `contact_settings` that have not been confirmed. To confirm the changes, the `registrant_contact` must follow the instructions in the email they receive.", "readOnly": true }, + "registerFailureReason": { + "description": "Output only. The reason the domain registration failed. Only set for domains in REGISTRATION_FAILED state.", + "enum": [ + "REGISTER_FAILURE_REASON_UNSPECIFIED", + "REGISTER_FAILURE_REASON_UNKNOWN", + "DOMAIN_NOT_AVAILABLE", + "INVALID_CONTACTS" + ], + "enumDescriptions": [ + "Register failure unspecified.", + "Registration failed for an unknown reason.", + "The domain is not available for registration.", + "The provided contact information was rejected." + ], + "readOnly": true, + "type": "string" + }, "state": { "description": "Output only. The state of the `Registration`", "enum": [ @@ -1697,6 +1831,7 @@ "REGISTRATION_FAILED", "TRANSFER_PENDING", "TRANSFER_FAILED", + "IMPORT_PENDING", "ACTIVE", "SUSPENDED", "EXPORTED" @@ -1707,6 +1842,7 @@ "The domain registration failed. You can delete resources in this state to allow registration to be retried.", "The domain is being transferred from another registrar to Cloud Domains.", "The attempt to transfer the domain from another registrar to Cloud Domains failed. You can delete resources in this state and retry the transfer.", + "The domain is being imported from Google Domains to Cloud Domains.", "The domain is registered and operational. The domain renews automatically as long as it remains in this state.", "The domain is suspended and inoperative. For more details, see the `issues` field.", "The domain is no longer managed with Cloud Domains. It may have been transferred to another registrar or exported for management in [Google Domains](https://domains.google/). You can no longer update it with this API, and information shown about it may be stale. Domains in this state are not automatically renewed by Cloud Domains." @@ -1733,6 +1869,37 @@ }, "readOnly": true, "type": "array" + }, + "transferFailureReason": { + "description": "Output only. The reason the domain transfer failed. Only set for domains in TRANSFER_FAILED state.", + "enum": [ + "TRANSFER_FAILURE_REASON_UNSPECIFIED", + "TRANSFER_FAILURE_REASON_UNKNOWN", + "EMAIL_CONFIRMATION_FAILURE", + "DOMAIN_NOT_REGISTERED", + "DOMAIN_HAS_TRANSFER_LOCK", + "INVALID_AUTHORIZATION_CODE", + "TRANSFER_CANCELLED", + "TRANSFER_REJECTED", + "INVALID_REGISTRANT_EMAIL_ADDRESS", + "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER", + "TRANSFER_ALREADY_PENDING" + ], + "enumDescriptions": [ + "Transfer failure unspecified.", + "Transfer failed for an unknown reason.", + "An email confirmation sent to the user was rejected or expired.", + "The domain is available for registration.", + "The domain has a transfer lock with its current registrar which must be removed prior to transfer.", + "The authorization code entered is not valid.", + "The transfer was cancelled by the domain owner, current registrar, or TLD registry.", + "The transfer was rejected by the current registrar. Contact the current registrar for more information.", + "The registrant email address cannot be parsed from the domain's current public contact data.", + "The domain is not eligible for transfer due requirements imposed by the current registrar or TLD registry.", + "Another transfer is already pending for this domain. The existing transfer attempt must expire or be cancelled in order to proceed." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1743,6 +1910,24 @@ "properties": {}, "type": "object" }, + "RetrieveImportableDomainsResponse": { + "description": "Response for the `RetrieveImportableDomains` method.", + "id": "RetrieveImportableDomainsResponse", + "properties": { + "domains": { + "description": "A list of domains that the calling user manages in Google Domains.", + "items": { + "$ref": "Domain" + }, + "type": "array" + }, + "nextPageToken": { + "description": "When present, there are more results to retrieve. Set `page_token` to this value on a subsequent call to get the next page of results.", + "type": "string" + } + }, + "type": "object" + }, "RetrieveRegisterParametersResponse": { "description": "Response for the `RetrieveRegisterParameters` method.", "id": "RetrieveRegisterParametersResponse", @@ -1896,6 +2081,10 @@ "description": "The registrar that currently manages the domain.", "type": "string" }, + "currentRegistrarUri": { + "description": "The URL of registrar that currently manages the domain.", + "type": "string" + }, "domainName": { "description": "The domain name. Unicode domain names are expressed in Punycode format.", "type": "string" diff --git a/domains/v1beta1/domains-gen.go b/domains/v1beta1/domains-gen.go index 49842ffb41b..e6699949f9d 100644 --- a/domains/v1beta1/domains-gen.go +++ b/domains/v1beta1/domains-gen.go @@ -692,6 +692,60 @@ func (s *DnsSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Domain: A domain that the calling user manages in Google Domains. +type Domain struct { + // DomainName: The domain name. Unicode domain names are expressed in + // Punycode format. + DomainName string `json:"domainName,omitempty"` + + // ResourceState: The state of this domain as a `Registration` resource. + // + // Possible values: + // "RESOURCE_STATE_UNSPECIFIED" - The assessment is undefined. + // "IMPORTABLE" - A `Registration` resource can be created for this + // domain by calling `ImportDomain`. + // "UNSUPPORTED" - A `Registration` resource cannot be created for + // this domain because it is not supported by Cloud Domains; for + // example, the top-level domain is not supported or the registry + // charges non-standard pricing for yearly renewals. + // "SUSPENDED" - A `Registration` resource cannot be created for this + // domain because it is suspended and needs to be resolved with Google + // Domains. + // "EXPIRED" - A `Registration` resource cannot be created for this + // domain because it is expired and needs to be renewed with Google + // Domains. + // "DELETED" - A `Registration` resource cannot be created for this + // domain because it is deleted, but can be restored with Google + // Domains. + ResourceState string `json:"resourceState,omitempty"` + + // YearlyPrice: Price to renew the domain for one year. Only set when + // `resource_state` is `IMPORTABLE`. + YearlyPrice *Money `json:"yearlyPrice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DomainName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DomainName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Domain) MarshalJSON() ([]byte, error) { + type NoMethod Domain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DsRecord: Defines a Delegation Signer (DS) record, which is needed to // enable DNSSEC for a domain. It contains a digest (hash) of a DNSKEY // record that must be present in the domain's DNS zone. @@ -925,6 +979,38 @@ func (s *GoogleDomainsDns) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportDomainRequest: Request for the `ImportDomain` method. +type ImportDomainRequest struct { + // DomainName: Required. The domain name. Unicode domain names must be + // expressed in Punycode format. + DomainName string `json:"domainName,omitempty"` + + // Labels: Set of labels associated with the `Registration`. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DomainName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DomainName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportDomainRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -1673,7 +1759,12 @@ func (s *RegisterParameters) MarshalJSON() ([]byte, error) { // for transfer and retrieve the domain's transfer authorization code. // Then call `RetrieveTransferParameters` to confirm that the domain is // unlocked and to get values needed to build a call to -// `TransferDomain`. +// `TransferDomain`. Finally, you can create a new `Registration` by +// importing an existing domain managed with Google Domains +// (https://domains.google/). First, call `RetrieveImportableDomains` to +// list domains to which the calling user has sufficient access. Then +// call `ImportDomain` on any domain names you want to use with Cloud +// Domains. type Registration struct { // ContactSettings: Required. Settings for contact information linked to // the `Registration`. You cannot update these with the @@ -1740,6 +1831,20 @@ type Registration struct { // email they receive. PendingContactSettings *ContactSettings `json:"pendingContactSettings,omitempty"` + // RegisterFailureReason: Output only. The reason the domain + // registration failed. Only set for domains in REGISTRATION_FAILED + // state. + // + // Possible values: + // "REGISTER_FAILURE_REASON_UNSPECIFIED" - Register failure + // unspecified. + // "REGISTER_FAILURE_REASON_UNKNOWN" - Registration failed for an + // unknown reason. + // "DOMAIN_NOT_AVAILABLE" - The domain is not available for + // registration. + // "INVALID_CONTACTS" - The provided contact information was rejected. + RegisterFailureReason string `json:"registerFailureReason,omitempty"` + // State: Output only. The state of the `Registration` // // Possible values: @@ -1752,6 +1857,8 @@ type Registration struct { // "TRANSFER_FAILED" - The attempt to transfer the domain from another // registrar to Cloud Domains failed. You can delete resources in this // state and retry the transfer. + // "IMPORT_PENDING" - The domain is being imported from Google Domains + // to Cloud Domains. // "ACTIVE" - The domain is registered and operational. The domain // renews automatically as long as it remains in this state. // "SUSPENDED" - The domain is suspended and inoperative. For more @@ -1785,6 +1892,35 @@ type Registration struct { // article](https://support.google.com/domains/answer/3251242). SupportedPrivacy []string `json:"supportedPrivacy,omitempty"` + // TransferFailureReason: Output only. The reason the domain transfer + // failed. Only set for domains in TRANSFER_FAILED state. + // + // Possible values: + // "TRANSFER_FAILURE_REASON_UNSPECIFIED" - Transfer failure + // unspecified. + // "TRANSFER_FAILURE_REASON_UNKNOWN" - Transfer failed for an unknown + // reason. + // "EMAIL_CONFIRMATION_FAILURE" - An email confirmation sent to the + // user was rejected or expired. + // "DOMAIN_NOT_REGISTERED" - The domain is available for registration. + // "DOMAIN_HAS_TRANSFER_LOCK" - The domain has a transfer lock with + // its current registrar which must be removed prior to transfer. + // "INVALID_AUTHORIZATION_CODE" - The authorization code entered is + // not valid. + // "TRANSFER_CANCELLED" - The transfer was cancelled by the domain + // owner, current registrar, or TLD registry. + // "TRANSFER_REJECTED" - The transfer was rejected by the current + // registrar. Contact the current registrar for more information. + // "INVALID_REGISTRANT_EMAIL_ADDRESS" - The registrant email address + // cannot be parsed from the domain's current public contact data. + // "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER" - The domain is not eligible for + // transfer due requirements imposed by the current registrar or TLD + // registry. + // "TRANSFER_ALREADY_PENDING" - Another transfer is already pending + // for this domain. The existing transfer attempt must expire or be + // cancelled in order to proceed. + TransferFailureReason string `json:"transferFailureReason,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1818,6 +1954,45 @@ func (s *Registration) MarshalJSON() ([]byte, error) { type ResetAuthorizationCodeRequest struct { } +// RetrieveImportableDomainsResponse: Response for the +// `RetrieveImportableDomains` method. +type RetrieveImportableDomainsResponse struct { + // Domains: A list of domains that the calling user manages in Google + // Domains. + Domains []*Domain `json:"domains,omitempty"` + + // NextPageToken: When present, there are more results to retrieve. Set + // `page_token` to this value on a subsequent call to get the next page + // of results. + 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. "Domains") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Domains") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RetrieveImportableDomainsResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrieveImportableDomainsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RetrieveRegisterParametersResponse: Response for the // `RetrieveRegisterParameters` method. type RetrieveRegisterParametersResponse struct { @@ -2132,6 +2307,10 @@ type TransferParameters struct { // CurrentRegistrar: The registrar that currently manages the domain. CurrentRegistrar string `json:"currentRegistrar,omitempty"` + // CurrentRegistrarUri: The URL of registrar that currently manages the + // domain. + CurrentRegistrarUri string `json:"currentRegistrarUri,omitempty"` + // DomainName: The domain name. Unicode domain names are expressed in // Punycode format. DomainName string `json:"domainName,omitempty"` @@ -3966,6 +4145,153 @@ func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Do(opts ...googleapi.Ca } +// method id "domains.projects.locations.registrations.import": + +type ProjectsLocationsRegistrationsImportCall struct { + s *Service + parent string + importdomainrequest *ImportDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports a domain name from Google Domains +// (https://domains.google/) for use in Cloud Domains. To transfer a +// domain from another registrar, use the `TransferDomain` method +// instead. Since individual users can own domains in Google Domains, +// the calling user must have ownership permission on the domain. +// +// - parent: The parent resource of the Registration. Must be in the +// format `projects/*/locations/*`. +func (r *ProjectsLocationsRegistrationsService) Import(parent string, importdomainrequest *ImportDomainRequest) *ProjectsLocationsRegistrationsImportCall { + c := &ProjectsLocationsRegistrationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importdomainrequest = importdomainrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistrationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistrationsImportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsImportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistrationsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdomainrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/registrations:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.import" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Imports a domain name from [Google Domains](https://domains.google/) for use in Cloud Domains. To transfer a domain from another registrar, use the `TransferDomain` method instead. Since individual users can own domains in Google Domains, the calling user must have ownership permission on the domain.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:import", + // "httpMethod": "POST", + // "id": "domains.projects.locations.registrations.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the Registration. Must be in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/registrations:import", + // "request": { + // "$ref": "ImportDomainRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "domains.projects.locations.registrations.list": type ProjectsLocationsRegistrationsListCall struct { @@ -4796,6 +5122,206 @@ func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts .. } +// method id "domains.projects.locations.registrations.retrieveImportableDomains": + +type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveImportableDomains: Lists domain names from Google Domains +// (https://domains.google/) that can be imported to Cloud Domains using +// the `ImportDomain` method. Since individual users can own domains in +// Google Domains, the list of domains returned depends on the +// individual user making the call. Domains supported by Google Domains, +// but not supported by Cloud Domains, are not returned. +// +// - location: The location. Must be in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsRegistrationsService) RetrieveImportableDomains(location string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c := &ProjectsLocationsRegistrationsRetrieveImportableDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": When set to the +// `next_page_token` from a prior response, provides the next page of +// results. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+location}/registrations:retrieveImportableDomains") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "domains.projects.locations.registrations.retrieveImportableDomains" call. +// Exactly one of *RetrieveImportableDomainsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RetrieveImportableDomainsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Do(opts ...googleapi.CallOption) (*RetrieveImportableDomainsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RetrieveImportableDomainsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists domain names from [Google Domains](https://domains.google/) that can be imported to Cloud Domains using the `ImportDomain` method. Since individual users can own domains in Google Domains, the list of domains returned depends on the individual user making the call. Domains supported by Google Domains, but not supported by Cloud Domains, are not returned.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:retrieveImportableDomains", + // "httpMethod": "GET", + // "id": "domains.projects.locations.registrations.retrieveImportableDomains", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location. Must be in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "When set to the `next_page_token` from a prior response, provides the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+location}/registrations:retrieveImportableDomains", + // "response": { + // "$ref": "RetrieveImportableDomainsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Pages(ctx context.Context, f func(*RetrieveImportableDomainsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "domains.projects.locations.registrations.retrieveRegisterParameters": type ProjectsLocationsRegistrationsRetrieveRegisterParametersCall struct { @@ -4972,8 +5498,9 @@ type ProjectsLocationsRegistrationsRetrieveTransferParametersCall struct { // RetrieveTransferParameters: Gets parameters needed to transfer a // domain name from another registrar to Cloud Domains. For domains -// managed by Google Domains, transferring to Cloud Domains is not -// supported. Use the returned values to call `TransferDomain`. +// already managed by Google Domains (https://domains.google/), use +// `ImportDomain` instead. Use the returned values to call +// `TransferDomain`. // // - location: The location. Must be in the format // `projects/*/locations/*`. @@ -5091,7 +5618,7 @@ func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Do(opts . } return ret, nil // { - // "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Use the returned values to call `TransferDomain`.", + // "description": "Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Use the returned values to call `TransferDomain`.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:retrieveTransferParameters", // "httpMethod": "GET", // "id": "domains.projects.locations.registrations.retrieveTransferParameters", @@ -5594,22 +6121,23 @@ type ProjectsLocationsRegistrationsTransferCall struct { } // Transfer: Transfers a domain name from another registrar to Cloud -// Domains. For domains managed by Google Domains, transferring to Cloud -// Domains is not supported. Before calling this method, go to the -// domain's current registrar to unlock the domain for transfer and -// retrieve the domain's transfer authorization code. Then call -// `RetrieveTransferParameters` to confirm that the domain is unlocked -// and to get values needed to build a call to this method. A successful -// call creates a `Registration` resource in state `TRANSFER_PENDING`. -// It can take several days to complete the transfer process. The -// registrant can often speed up this process by approving the transfer -// through the current registrar, either by clicking a link in an email -// from the registrar or by visiting the registrar's website. A few -// minutes after transfer approval, the resource transitions to state -// `ACTIVE`, indicating that the transfer was successful. If the -// transfer is rejected or the request expires without being approved, -// the resource can end up in state `TRANSFER_FAILED`. If transfer -// fails, you can safely delete the resource and retry the transfer. +// Domains. For domains already managed by Google Domains +// (https://domains.google/), use `ImportDomain` instead. Before calling +// this method, go to the domain's current registrar to unlock the +// domain for transfer and retrieve the domain's transfer authorization +// code. Then call `RetrieveTransferParameters` to confirm that the +// domain is unlocked and to get values needed to build a call to this +// method. A successful call creates a `Registration` resource in state +// `TRANSFER_PENDING`. It can take several days to complete the transfer +// process. The registrant can often speed up this process by approving +// the transfer through the current registrar, either by clicking a link +// in an email from the registrar or by visiting the registrar's +// website. A few minutes after transfer approval, the resource +// transitions to state `ACTIVE`, indicating that the transfer was +// successful. If the transfer is rejected or the request expires +// without being approved, the resource can end up in state +// `TRANSFER_FAILED`. If transfer fails, you can safely delete the +// resource and retry the transfer. // // - parent: The parent resource of the `Registration`. Must be in the // format `projects/*/locations/*`. @@ -5711,7 +6239,7 @@ func (c *ProjectsLocationsRegistrationsTransferCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", + // "description": "Transfers a domain name from another registrar to Cloud Domains. For domains already managed by [Google Domains](https://domains.google/), use `ImportDomain` instead. Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call `RetrieveTransferParameters` to confirm that the domain is unlocked and to get values needed to build a call to this method. A successful call creates a `Registration` resource in state `TRANSFER_PENDING`. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website. A few minutes after transfer approval, the resource transitions to state `ACTIVE`, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and retry the transfer.", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registrations:transfer", // "httpMethod": "POST", // "id": "domains.projects.locations.registrations.transfer", diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index 46e44c888c9..cc46c606619 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -244,6 +244,164 @@ } } }, + "photoSequence": { + "methods": { + "create": { + "description": "After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id set in the `Operation.name` field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.", + "flatPath": "v1/photoSequence", + "httpMethod": "POST", + "id": "streetviewpublish.photoSequence.create", + "parameterOrder": [], + "parameters": { + "inputType": { + "description": "Required. The input form of PhotoSequence.", + "enum": [ + "INPUT_TYPE_UNSPECIFIED", + "VIDEO", + "XDM" + ], + "enumDescriptions": [ + "Not specified. Server will return google.rpc.Code.INVALID_ARGUMENT.", + "360 Video.", + "Extensible Device Metadata, http://www.xdm.org" + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/photoSequence", + "request": { + "$ref": "PhotoSequence" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + }, + "delete": { + "description": "Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.", + "flatPath": "v1/photoSequence/{sequenceId}", + "httpMethod": "DELETE", + "id": "streetviewpublish.photoSequence.delete", + "parameterOrder": [ + "sequenceId" + ], + "parameters": { + "sequenceId": { + "description": "Required. ID of the PhotoSequence.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/photoSequence/{sequenceId}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + }, + "get": { + "description": "Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` is poulated, which contains a PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.", + "flatPath": "v1/photoSequence/{sequenceId}", + "httpMethod": "GET", + "id": "streetviewpublish.photoSequence.get", + "parameterOrder": [ + "sequenceId" + ], + "parameters": { + "filter": { + "description": "Optional. The filter expression. For example: `published_status=PUBLISHED`. The filters supported are: `published_status`. See https://google.aip.dev/160 for more information.", + "location": "query", + "type": "string" + }, + "sequenceId": { + "description": "Required. ID of the photo sequence.", + "location": "path", + "required": true, + "type": "string" + }, + "view": { + "description": "Specifies if a download URL for the photo sequence should be returned in `download_url` of individual photos in the PhotoSequence response. \u003e Note: Currently not implemented.", + "enum": [ + "BASIC", + "INCLUDE_DOWNLOAD_URL" + ], + "enumDescriptions": [ + "Server responses do not include the download URL for the photo bytes. The default value.", + "Server responses include the download URL for the photo bytes." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/photoSequence/{sequenceId}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + }, + "startUpload": { + "description": "Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the `photoSequence`. After the upload is complete, the UploadRef is used with CreatePhotoSequence to create the PhotoSequence object entry.", + "flatPath": "v1/photoSequence:startUpload", + "httpMethod": "POST", + "id": "streetviewpublish.photoSequence.startUpload", + "parameterOrder": [], + "parameters": {}, + "path": "v1/photoSequence:startUpload", + "request": { + "$ref": "Empty" + }, + "response": { + "$ref": "UploadRef" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + } + } + }, + "photoSequences": { + "methods": { + "list": { + "description": "Lists all the PhotoSequences that belong to the user, in descending CreatePhotoSequence timestamp order.", + "flatPath": "v1/photoSequences", + "httpMethod": "GET", + "id": "streetviewpublish.photoSequences.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "Optional. The filter expression. For example: `imagery_type=SPHERICAL`. The filters supported are: `imagery_type`, `processing_state`, `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`, and `filename_query`. See https://google.aip.dev/160 for more information. Filename queries should sent as a Phrase in order to support multple words and special characters by adding escaped quotes. Ex: filename_query=\"example of a phrase.mp4\"", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of photo sequences to return. `pageSize` must be non-negative. If `pageSize` is zero or is not provided, the default page size of 100 is used. The number of photo sequences returned in the response may be less than `pageSize` if the number of matches is less than `pageSize`. This is currently unimplemented but is in process.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The nextPageToken value returned from a previous ListPhotoSequences request, if any.", + "location": "query", + "type": "string" + } + }, + "path": "v1/photoSequences", + "response": { + "$ref": "ListPhotoSequencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + } + } + }, "photos": { "methods": { "batchDelete": { @@ -375,7 +533,7 @@ } } }, - "revision": "20220321", + "revision": "20220623", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -465,6 +623,34 @@ "properties": {}, "type": "object" }, + "Imu": { + "description": "IMU data from the device sensors.", + "id": "Imu", + "properties": { + "accelMpsps": { + "description": "The accelerometer measurements in meters/sec^2 with increasing timestamps from devices.", + "items": { + "$ref": "Measurement3d" + }, + "type": "array" + }, + "gyroRps": { + "description": "The gyroscope measurements in radians/sec with increasing timestamps from devices.", + "items": { + "$ref": "Measurement3d" + }, + "type": "array" + }, + "magUt": { + "description": "The magnetometer measurements of the magnetic field in microtesla (uT) with increasing timestamps from devices.", + "items": { + "$ref": "Measurement3d" + }, + "type": "array" + } + }, + "type": "object" + }, "LatLng": { "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", "id": "LatLng", @@ -482,6 +668,21 @@ }, "type": "object" }, + "LatLngBounds": { + "description": "A rectangle in geographical coordinates.", + "id": "LatLngBounds", + "properties": { + "northeast": { + "$ref": "LatLng", + "description": "The northeast corner of these bounds." + }, + "southwest": { + "$ref": "LatLng", + "description": "The southwest corner of these bounds." + } + }, + "type": "object" + }, "Level": { "description": "Level information containing level number and its corresponding name.", "id": "Level", @@ -498,6 +699,24 @@ }, "type": "object" }, + "ListPhotoSequencesResponse": { + "description": "Response to list all photo sequences that belong to a user.", + "id": "ListPhotoSequencesResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "photoSequences": { + "description": "List of photo sequences via Operation interface. The maximum number of items returned is based on the pageSize field in the request. Each item in the list can have three possible states, * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` contains a PhotoSequence message, In each sequence, only Id is populated.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, "ListPhotosResponse": { "description": "Response to list all photos that belong to a user.", "id": "ListPhotosResponse", @@ -516,6 +735,33 @@ }, "type": "object" }, + "Measurement3d": { + "description": "A Generic 3d measurement sample.", + "id": "Measurement3d", + "properties": { + "captureTime": { + "description": "The timestamp of the IMU measurement.", + "format": "google-datetime", + "type": "string" + }, + "x": { + "description": "The sensor measurement in the x axis.", + "format": "float", + "type": "number" + }, + "y": { + "description": "The sensor measurement in the y axis.", + "format": "float", + "type": "number" + }, + "z": { + "description": "The sensor measurement in the z axis.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -683,6 +929,140 @@ }, "type": "object" }, + "PhotoSequence": { + "description": "A sequence of 360 photos along with metadata.", + "id": "PhotoSequence", + "properties": { + "captureTimeOverride": { + "description": "Optional. Absolute time when the photo sequence starts to be captured. If the photo sequence is a video, this is the start time of the video. If this field is populated in input, it overrides the capture time in the video or XDM file.", + "format": "google-datetime", + "type": "string" + }, + "distanceMeters": { + "description": "Output only. The computed distance of the photo sequence in meters.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "failureReason": { + "description": "Output only. If this sequence has processing_state = FAILED, this will contain the reason why it failed. If the processing_state is any other value, this field will be unset.", + "enum": [ + "PROCESSING_FAILURE_REASON_UNSPECIFIED", + "LOW_RESOLUTION", + "DUPLICATE", + "INSUFFICIENT_GPS", + "NO_OVERLAP_GPS", + "INVALID_GPS", + "FAILED_TO_REFINE_POSITIONS", + "TAKEDOWN", + "CORRUPT_VIDEO", + "INTERNAL", + "INVALID_VIDEO_FORMAT", + "INVALID_VIDEO_DIMENSIONS", + "INVALID_CAPTURE_TIME" + ], + "enumDescriptions": [ + "The failure reason is unspecified, this is the default value.", + "Video frame's resolution is too small.", + "This video has been uploaded before.", + "Too few GPS points.", + "No overlap between the time frame of GPS track and the time frame of video.", + "GPS is invalid (e.x. all GPS points are at (0,0))", + "The sequence of photos could not be accurately located in the world.", + "The sequence was taken down for policy reasons.", + "The video file was corrupt.", + "A permanent failure in the underlying system occurred.", + "The video format is invalid or unsupported.", + "Invalid image aspect ratio found.", + "Invalid capture time. Timestamps were from the future." + ], + "readOnly": true, + "type": "string" + }, + "filename": { + "description": "Output only. The filename of the upload. Does not include the directory path. Only available if the sequence was uploaded on a platform that provides the filename.", + "readOnly": true, + "type": "string" + }, + "gpsSource": { + "description": "Input only. If both raw_gps_timeline and the Camera Motion Metadata Track (CAMM) contain GPS measurements, indicate which takes precedence.", + "enum": [ + "PHOTO_SEQUENCE", + "CAMERA_MOTION_METADATA_TRACK" + ], + "enumDescriptions": [ + "GPS in raw_gps_timeline takes precedence if it exists.", + "GPS in Camera Motion Metadata Track (CAMM) takes precedence if it exists." + ], + "type": "string" + }, + "id": { + "description": "Output only. Unique identifier for the photo sequence. This also acts as a long running operation ID if uploading is performed asynchronously.", + "readOnly": true, + "type": "string" + }, + "imu": { + "$ref": "Imu", + "description": "Input only. Three axis IMU data for the collection. If this data is too large to put in the request, then it should be put in the CAMM track for the video. This data always takes precedence over the equivalent CAMM data, if it exists." + }, + "photos": { + "description": "Output only. Photos with increasing timestamps.", + "items": { + "$ref": "Photo" + }, + "readOnly": true, + "type": "array" + }, + "processingState": { + "description": "Output only. The processing state of this sequence.", + "enum": [ + "PROCESSING_STATE_UNSPECIFIED", + "PENDING", + "PROCESSING", + "PROCESSED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified, this is the default value.", + "The sequence has not yet started processing.", + "The sequence is currently in processing.", + "The sequence has finished processing including refining position.", + "The sequence failed processing. See FailureReason for more details." + ], + "readOnly": true, + "type": "string" + }, + "rawGpsTimeline": { + "description": "Input only. Raw GPS measurements with increasing timestamps from the device that aren't time synced with each photo. These raw measurements will be used to infer the pose of each frame. Required in input when InputType is VIDEO and raw GPS measurements are not in Camera Motion Metadata Track (CAMM). User can indicate which takes precedence using gps_source if raw GPS measurements are provided in both raw_gps_timeline and Camera Motion Metadata Track (CAMM).", + "items": { + "$ref": "Pose" + }, + "type": "array" + }, + "sequenceBounds": { + "$ref": "LatLngBounds", + "description": "Output only. A rectangular box that encapsulates every image in this photo sequence.", + "readOnly": true + }, + "uploadReference": { + "$ref": "UploadRef", + "description": "Input only. Required when creating photo sequence. The resource name where the bytes of the photo sequence (in the form of video) are uploaded." + }, + "uploadTime": { + "description": "Output only. The time this photo sequence was created in uSV Store service.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "viewCount": { + "description": "Output only. The total number of views that all the published images in this PhotoSequence have received.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Place": { "description": "Place metadata for an entity.", "id": "Place", diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 62defd221d7..2babe1a803b 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -118,6 +118,8 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Photo = NewPhotoService(s) + s.PhotoSequence = NewPhotoSequenceService(s) + s.PhotoSequences = NewPhotoSequencesService(s) s.Photos = NewPhotosService(s) return s, nil } @@ -129,6 +131,10 @@ type Service struct { Photo *PhotoService + PhotoSequence *PhotoSequenceService + + PhotoSequences *PhotoSequencesService + Photos *PhotosService } @@ -148,6 +154,24 @@ type PhotoService struct { s *Service } +func NewPhotoSequenceService(s *Service) *PhotoSequenceService { + rs := &PhotoSequenceService{s: s} + return rs +} + +type PhotoSequenceService struct { + s *Service +} + +func NewPhotoSequencesService(s *Service) *PhotoSequencesService { + rs := &PhotoSequencesService{s: s} + return rs +} + +type PhotoSequencesService struct { + s *Service +} + func NewPhotosService(s *Service) *PhotosService { rs := &PhotosService{s: s} return rs @@ -359,6 +383,43 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Imu: IMU data from the device sensors. +type Imu struct { + // AccelMpsps: The accelerometer measurements in meters/sec^2 with + // increasing timestamps from devices. + AccelMpsps []*Measurement3d `json:"accelMpsps,omitempty"` + + // GyroRps: The gyroscope measurements in radians/sec with increasing + // timestamps from devices. + GyroRps []*Measurement3d `json:"gyroRps,omitempty"` + + // MagUt: The magnetometer measurements of the magnetic field in + // microtesla (uT) with increasing timestamps from devices. + MagUt []*Measurement3d `json:"magUt,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccelMpsps") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccelMpsps") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Imu) MarshalJSON() ([]byte, error) { + type NoMethod Imu + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LatLng: An object that represents a latitude/longitude pair. This is // expressed as a pair of doubles to represent degrees latitude and // degrees longitude. Unless specified otherwise, this object must @@ -412,6 +473,37 @@ func (s *LatLng) UnmarshalJSON(data []byte) error { return nil } +// LatLngBounds: A rectangle in geographical coordinates. +type LatLngBounds struct { + // Northeast: The northeast corner of these bounds. + Northeast *LatLng `json:"northeast,omitempty"` + + // Southwest: The southwest corner of these bounds. + Southwest *LatLng `json:"southwest,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Northeast") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Northeast") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LatLngBounds) MarshalJSON() ([]byte, error) { + type NoMethod LatLngBounds + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Level: Level information containing level number and its // corresponding name. type Level struct { @@ -463,6 +555,50 @@ func (s *Level) UnmarshalJSON(data []byte) error { return nil } +// ListPhotoSequencesResponse: Response to list all photo sequences that +// belong to a user. +type ListPhotoSequencesResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PhotoSequences: List of photo sequences via Operation interface. The + // maximum number of items returned is based on the pageSize field in + // the request. Each item in the list can have three possible states, * + // `Operation.done` = false, if the processing of PhotoSequence is not + // finished yet. * `Operation.done` = true and `Operation.error` is + // populated, if there was an error in processing. * `Operation.done` = + // true and `Operation.response` contains a PhotoSequence message, In + // each sequence, only Id is populated. + PhotoSequences []*Operation `json:"photoSequences,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPhotoSequencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPhotoSequencesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListPhotosResponse: Response to list all photos that belong to a // user. type ListPhotosResponse struct { @@ -501,6 +637,61 @@ func (s *ListPhotosResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Measurement3d: A Generic 3d measurement sample. +type Measurement3d struct { + // CaptureTime: The timestamp of the IMU measurement. + CaptureTime string `json:"captureTime,omitempty"` + + // X: The sensor measurement in the x axis. + X float64 `json:"x,omitempty"` + + // Y: The sensor measurement in the y axis. + Y float64 `json:"y,omitempty"` + + // Z: The sensor measurement in the z axis. + Z float64 `json:"z,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaptureTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaptureTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Measurement3d) MarshalJSON() ([]byte, error) { + type NoMethod Measurement3d + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Measurement3d) UnmarshalJSON(data []byte) error { + type NoMethod Measurement3d + var s1 struct { + X gensupport.JSONFloat64 `json:"x"` + Y gensupport.JSONFloat64 `json:"y"` + Z gensupport.JSONFloat64 `json:"z"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.X = float64(s1.X) + s.Y = float64(s1.Y) + s.Z = float64(s1.Z) + return nil +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -536,6 +727,10 @@ type Operation struct { // response type is `TakeSnapshotResponse`. Response googleapi.RawMessage `json:"response,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -721,6 +916,151 @@ func (s *PhotoResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PhotoSequence: A sequence of 360 photos along with metadata. +type PhotoSequence struct { + // CaptureTimeOverride: Optional. Absolute time when the photo sequence + // starts to be captured. If the photo sequence is a video, this is the + // start time of the video. If this field is populated in input, it + // overrides the capture time in the video or XDM file. + CaptureTimeOverride string `json:"captureTimeOverride,omitempty"` + + // DistanceMeters: Output only. The computed distance of the photo + // sequence in meters. + DistanceMeters float64 `json:"distanceMeters,omitempty"` + + // FailureReason: Output only. If this sequence has processing_state = + // FAILED, this will contain the reason why it failed. If the + // processing_state is any other value, this field will be unset. + // + // Possible values: + // "PROCESSING_FAILURE_REASON_UNSPECIFIED" - The failure reason is + // unspecified, this is the default value. + // "LOW_RESOLUTION" - Video frame's resolution is too small. + // "DUPLICATE" - This video has been uploaded before. + // "INSUFFICIENT_GPS" - Too few GPS points. + // "NO_OVERLAP_GPS" - No overlap between the time frame of GPS track + // and the time frame of video. + // "INVALID_GPS" - GPS is invalid (e.x. all GPS points are at (0,0)) + // "FAILED_TO_REFINE_POSITIONS" - The sequence of photos could not be + // accurately located in the world. + // "TAKEDOWN" - The sequence was taken down for policy reasons. + // "CORRUPT_VIDEO" - The video file was corrupt. + // "INTERNAL" - A permanent failure in the underlying system occurred. + // "INVALID_VIDEO_FORMAT" - The video format is invalid or + // unsupported. + // "INVALID_VIDEO_DIMENSIONS" - Invalid image aspect ratio found. + // "INVALID_CAPTURE_TIME" - Invalid capture time. Timestamps were from + // the future. + FailureReason string `json:"failureReason,omitempty"` + + // Filename: Output only. The filename of the upload. Does not include + // the directory path. Only available if the sequence was uploaded on a + // platform that provides the filename. + Filename string `json:"filename,omitempty"` + + // GpsSource: Input only. If both raw_gps_timeline and the Camera Motion + // Metadata Track (CAMM) contain GPS measurements, indicate which takes + // precedence. + // + // Possible values: + // "PHOTO_SEQUENCE" - GPS in raw_gps_timeline takes precedence if it + // exists. + // "CAMERA_MOTION_METADATA_TRACK" - GPS in Camera Motion Metadata + // Track (CAMM) takes precedence if it exists. + GpsSource string `json:"gpsSource,omitempty"` + + // Id: Output only. Unique identifier for the photo sequence. This also + // acts as a long running operation ID if uploading is performed + // asynchronously. + Id string `json:"id,omitempty"` + + // Imu: Input only. Three axis IMU data for the collection. If this data + // is too large to put in the request, then it should be put in the CAMM + // track for the video. This data always takes precedence over the + // equivalent CAMM data, if it exists. + Imu *Imu `json:"imu,omitempty"` + + // Photos: Output only. Photos with increasing timestamps. + Photos []*Photo `json:"photos,omitempty"` + + // ProcessingState: Output only. The processing state of this sequence. + // + // Possible values: + // "PROCESSING_STATE_UNSPECIFIED" - The state is unspecified, this is + // the default value. + // "PENDING" - The sequence has not yet started processing. + // "PROCESSING" - The sequence is currently in processing. + // "PROCESSED" - The sequence has finished processing including + // refining position. + // "FAILED" - The sequence failed processing. See FailureReason for + // more details. + ProcessingState string `json:"processingState,omitempty"` + + // RawGpsTimeline: Input only. Raw GPS measurements with increasing + // timestamps from the device that aren't time synced with each photo. + // These raw measurements will be used to infer the pose of each frame. + // Required in input when InputType is VIDEO and raw GPS measurements + // are not in Camera Motion Metadata Track (CAMM). User can indicate + // which takes precedence using gps_source if raw GPS measurements are + // provided in both raw_gps_timeline and Camera Motion Metadata Track + // (CAMM). + RawGpsTimeline []*Pose `json:"rawGpsTimeline,omitempty"` + + // SequenceBounds: Output only. A rectangular box that encapsulates + // every image in this photo sequence. + SequenceBounds *LatLngBounds `json:"sequenceBounds,omitempty"` + + // UploadReference: Input only. Required when creating photo sequence. + // The resource name where the bytes of the photo sequence (in the form + // of video) are uploaded. + UploadReference *UploadRef `json:"uploadReference,omitempty"` + + // UploadTime: Output only. The time this photo sequence was created in + // uSV Store service. + UploadTime string `json:"uploadTime,omitempty"` + + // ViewCount: Output only. The total number of views that all the + // published images in this PhotoSequence have received. + ViewCount int64 `json:"viewCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CaptureTimeOverride") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaptureTimeOverride") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PhotoSequence) MarshalJSON() ([]byte, error) { + type NoMethod PhotoSequence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PhotoSequence) UnmarshalJSON(data []byte) error { + type NoMethod PhotoSequence + var s1 struct { + DistanceMeters gensupport.JSONFloat64 `json:"distanceMeters"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DistanceMeters = float64(s1.DistanceMeters) + return nil +} + // Place: Place metadata for an entity. type Place struct { // LanguageCode: Output only. The language_code that the name is @@ -1747,6 +2087,829 @@ func (c *PhotoUpdateCall) Do(opts ...googleapi.CallOption) (*Photo, error) { } +// method id "streetviewpublish.photoSequence.create": + +type PhotoSequenceCreateCall struct { + s *Service + photosequence *PhotoSequence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: After the client finishes uploading the PhotoSequence with +// the returned UploadRef, CreatePhotoSequence extracts a sequence of +// 360 photos from a video or Extensible Device Metadata (XDM, +// http://www.xdm.org/) to be published to Street View on Google Maps. +// `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id +// set in the `Operation.name` field. This method returns the following +// error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is +// malformed. * google.rpc.Code.NOT_FOUND if the upload reference does +// not exist. +func (r *PhotoSequenceService) Create(photosequence *PhotoSequence) *PhotoSequenceCreateCall { + c := &PhotoSequenceCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.photosequence = photosequence + return c +} + +// InputType sets the optional parameter "inputType": Required. The +// input form of PhotoSequence. +// +// Possible values: +// "INPUT_TYPE_UNSPECIFIED" - Not specified. Server will return +// google.rpc.Code.INVALID_ARGUMENT. +// "VIDEO" - 360 Video. +// "XDM" - Extensible Device Metadata, http://www.xdm.org +func (c *PhotoSequenceCreateCall) InputType(inputType string) *PhotoSequenceCreateCall { + c.urlParams_.Set("inputType", inputType) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PhotoSequenceCreateCall) Fields(s ...googleapi.Field) *PhotoSequenceCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PhotoSequenceCreateCall) Context(ctx context.Context) *PhotoSequenceCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PhotoSequenceCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PhotoSequenceCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.photosequence) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "streetviewpublish.photoSequence.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PhotoSequenceCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id set in the `Operation.name` field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.", + // "flatPath": "v1/photoSequence", + // "httpMethod": "POST", + // "id": "streetviewpublish.photoSequence.create", + // "parameterOrder": [], + // "parameters": { + // "inputType": { + // "description": "Required. The input form of PhotoSequence.", + // "enum": [ + // "INPUT_TYPE_UNSPECIFIED", + // "VIDEO", + // "XDM" + // ], + // "enumDescriptions": [ + // "Not specified. Server will return google.rpc.Code.INVALID_ARGUMENT.", + // "360 Video.", + // "Extensible Device Metadata, http://www.xdm.org" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/photoSequence", + // "request": { + // "$ref": "PhotoSequence" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/streetviewpublish" + // ] + // } + +} + +// method id "streetviewpublish.photoSequence.delete": + +type PhotoSequenceDeleteCall struct { + s *Service + sequenceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a PhotoSequence and its metadata. This method returns +// the following error codes: * google.rpc.Code.PERMISSION_DENIED if the +// requesting user did not create the requested photo sequence. * +// google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * +// google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not +// yet finished processing. +// +// - sequenceId: ID of the PhotoSequence. +func (r *PhotoSequenceService) Delete(sequenceId string) *PhotoSequenceDeleteCall { + c := &PhotoSequenceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sequenceId = sequenceId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PhotoSequenceDeleteCall) Fields(s ...googleapi.Field) *PhotoSequenceDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PhotoSequenceDeleteCall) Context(ctx context.Context) *PhotoSequenceDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PhotoSequenceDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PhotoSequenceDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence/{sequenceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sequenceId": c.sequenceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "streetviewpublish.photoSequence.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *PhotoSequenceDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.", + // "flatPath": "v1/photoSequence/{sequenceId}", + // "httpMethod": "DELETE", + // "id": "streetviewpublish.photoSequence.delete", + // "parameterOrder": [ + // "sequenceId" + // ], + // "parameters": { + // "sequenceId": { + // "description": "Required. ID of the PhotoSequence.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/photoSequence/{sequenceId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/streetviewpublish" + // ] + // } + +} + +// method id "streetviewpublish.photoSequence.get": + +type PhotoSequenceGetCall struct { + s *Service + sequenceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the metadata of the specified PhotoSequence via the +// Operation interface. This method returns the following three types of +// responses: * `Operation.done` = false, if the processing of +// PhotoSequence is not finished yet. * `Operation.done` = true and +// `Operation.error` is populated, if there was an error in processing. +// * `Operation.done` = true and `Operation.response` is poulated, which +// contains a PhotoSequence message. This method returns the following +// error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting +// user did not create the requested PhotoSequence. * +// google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not +// exist. +// +// - sequenceId: ID of the photo sequence. +func (r *PhotoSequenceService) Get(sequenceId string) *PhotoSequenceGetCall { + c := &PhotoSequenceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sequenceId = sequenceId + return c +} + +// Filter sets the optional parameter "filter": The filter expression. +// For example: `published_status=PUBLISHED`. The filters supported are: +// `published_status`. See https://google.aip.dev/160 for more +// information. +func (c *PhotoSequenceGetCall) Filter(filter string) *PhotoSequenceGetCall { + c.urlParams_.Set("filter", filter) + return c +} + +// View sets the optional parameter "view": Specifies if a download URL +// for the photo sequence should be returned in `download_url` of +// individual photos in the PhotoSequence response. > Note: Currently +// not implemented. +// +// Possible values: +// "BASIC" - Server responses do not include the download URL for the +// photo bytes. The default value. +// "INCLUDE_DOWNLOAD_URL" - Server responses include the download URL +// for the photo bytes. +func (c *PhotoSequenceGetCall) View(view string) *PhotoSequenceGetCall { + 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 information. +func (c *PhotoSequenceGetCall) Fields(s ...googleapi.Field) *PhotoSequenceGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PhotoSequenceGetCall) IfNoneMatch(entityTag string) *PhotoSequenceGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PhotoSequenceGetCall) Context(ctx context.Context) *PhotoSequenceGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PhotoSequenceGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PhotoSequenceGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence/{sequenceId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sequenceId": c.sequenceId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "streetviewpublish.photoSequence.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PhotoSequenceGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` is poulated, which contains a PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.", + // "flatPath": "v1/photoSequence/{sequenceId}", + // "httpMethod": "GET", + // "id": "streetviewpublish.photoSequence.get", + // "parameterOrder": [ + // "sequenceId" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The filter expression. For example: `published_status=PUBLISHED`. The filters supported are: `published_status`. See https://google.aip.dev/160 for more information.", + // "location": "query", + // "type": "string" + // }, + // "sequenceId": { + // "description": "Required. ID of the photo sequence.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Specifies if a download URL for the photo sequence should be returned in `download_url` of individual photos in the PhotoSequence response. \u003e Note: Currently not implemented.", + // "enum": [ + // "BASIC", + // "INCLUDE_DOWNLOAD_URL" + // ], + // "enumDescriptions": [ + // "Server responses do not include the download URL for the photo bytes. The default value.", + // "Server responses include the download URL for the photo bytes." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/photoSequence/{sequenceId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/streetviewpublish" + // ] + // } + +} + +// method id "streetviewpublish.photoSequence.startUpload": + +type PhotoSequenceStartUploadCall struct { + s *Service + empty *Empty + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartUpload: Creates an upload session to start uploading photo +// sequence data. The upload URL of the returned UploadRef is used to +// upload the data for the `photoSequence`. After the upload is +// complete, the UploadRef is used with CreatePhotoSequence to create +// the PhotoSequence object entry. +func (r *PhotoSequenceService) StartUpload(empty *Empty) *PhotoSequenceStartUploadCall { + c := &PhotoSequenceStartUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.empty = empty + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PhotoSequenceStartUploadCall) Fields(s ...googleapi.Field) *PhotoSequenceStartUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PhotoSequenceStartUploadCall) Context(ctx context.Context) *PhotoSequenceStartUploadCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PhotoSequenceStartUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PhotoSequenceStartUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.empty) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequence:startUpload") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "streetviewpublish.photoSequence.startUpload" call. +// Exactly one of *UploadRef or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UploadRef.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PhotoSequenceStartUploadCall) Do(opts ...googleapi.CallOption) (*UploadRef, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UploadRef{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the `photoSequence`. After the upload is complete, the UploadRef is used with CreatePhotoSequence to create the PhotoSequence object entry.", + // "flatPath": "v1/photoSequence:startUpload", + // "httpMethod": "POST", + // "id": "streetviewpublish.photoSequence.startUpload", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/photoSequence:startUpload", + // "request": { + // "$ref": "Empty" + // }, + // "response": { + // "$ref": "UploadRef" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/streetviewpublish" + // ] + // } + +} + +// method id "streetviewpublish.photoSequences.list": + +type PhotoSequencesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the PhotoSequences that belong to the user, in +// descending CreatePhotoSequence timestamp order. +func (r *PhotoSequencesService) List() *PhotoSequencesListCall { + c := &PhotoSequencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": The filter expression. +// For example: `imagery_type=SPHERICAL`. The filters supported are: +// `imagery_type`, `processing_state`, `min_latitude`, `max_latitude`, +// `min_longitude`, `max_longitude`, and `filename_query`. See +// https://google.aip.dev/160 for more information. Filename queries +// should sent as a Phrase in order to support multple words and special +// characters by adding escaped quotes. Ex: filename_query="example of a +// phrase.mp4" +func (c *PhotoSequencesListCall) Filter(filter string) *PhotoSequencesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of photo sequences to return. `pageSize` must be non-negative. If +// `pageSize` is zero or is not provided, the default page size of 100 +// is used. The number of photo sequences returned in the response may +// be less than `pageSize` if the number of matches is less than +// `pageSize`. This is currently unimplemented but is in process. +func (c *PhotoSequencesListCall) PageSize(pageSize int64) *PhotoSequencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The nextPageToken +// value returned from a previous ListPhotoSequences request, if any. +func (c *PhotoSequencesListCall) PageToken(pageToken string) *PhotoSequencesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PhotoSequencesListCall) Fields(s ...googleapi.Field) *PhotoSequencesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PhotoSequencesListCall) IfNoneMatch(entityTag string) *PhotoSequencesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PhotoSequencesListCall) Context(ctx context.Context) *PhotoSequencesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PhotoSequencesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PhotoSequencesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/photoSequences") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "streetviewpublish.photoSequences.list" call. +// Exactly one of *ListPhotoSequencesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPhotoSequencesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PhotoSequencesListCall) Do(opts ...googleapi.CallOption) (*ListPhotoSequencesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListPhotoSequencesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the PhotoSequences that belong to the user, in descending CreatePhotoSequence timestamp order.", + // "flatPath": "v1/photoSequences", + // "httpMethod": "GET", + // "id": "streetviewpublish.photoSequences.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "Optional. The filter expression. For example: `imagery_type=SPHERICAL`. The filters supported are: `imagery_type`, `processing_state`, `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`, and `filename_query`. See https://google.aip.dev/160 for more information. Filename queries should sent as a Phrase in order to support multple words and special characters by adding escaped quotes. Ex: filename_query=\"example of a phrase.mp4\"", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of photo sequences to return. `pageSize` must be non-negative. If `pageSize` is zero or is not provided, the default page size of 100 is used. The number of photo sequences returned in the response may be less than `pageSize` if the number of matches is less than `pageSize`. This is currently unimplemented but is in process.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The nextPageToken value returned from a previous ListPhotoSequences request, if any.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/photoSequences", + // "response": { + // "$ref": "ListPhotoSequencesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/streetviewpublish" + // ] + // } + +} + +// 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 *PhotoSequencesListCall) Pages(ctx context.Context, f func(*ListPhotoSequencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "streetviewpublish.photos.batchDelete": type PhotosBatchDeleteCall struct {